From: Zygo Blaxell Date: Mon, 2 Mar 2009 05:42:21 +0000 (-0500) Subject: ftp://ftp.uni-heidelberg.de/pub/X11/contrib/applications/xscreensaver-2.07.tar.gz X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=commitdiff_plain;h=f3e0240915ed9f9b3a61781f5c7002d587563fe0 ftp://ftp.uni-heidelberg.de/pub/X11/contrib/applications/xscreensaver-2.07.tar.gz -rw-r--r-- 1 zblaxell zblaxell 627973 Feb 27 13:23 xscreensaver-2.07.tar.gz 7b3caf8378ccfdf6bac3845319392a0b4c4b3ff7 xscreensaver-2.07.tar.gz --- diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..50dbe439 --- /dev/null +++ b/INSTALL @@ -0,0 +1,183 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..50b2d235 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,73 @@ +# Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# the `../configure' script generates `Makefile' from this file. + +@SET_MAKE@ +srcdir = @srcdir@ +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 +TAR = gtar +COMPRESS = gzip --verbose --best +COMPRESS_EXT = gz +# COMPRESS = compress +# COMPRESS_EXT = Z + +MAKE_SUBDIR = for dir in $(SUBDIRS) ; do ( cd $$dir ; $(MAKE) $@ ) ; done + +all:: + @$(MAKE_SUBDIR) +install: + @$(MAKE_SUBDIR) +install-program: + @$(MAKE_SUBDIR) +install-man: + @$(MAKE_SUBDIR) +install-strip: + @$(MAKE_SUBDIR) +uninstall: + @$(MAKE_SUBDIR) +uninstall-program: + @$(MAKE_SUBDIR) +uninstall-man: + @$(MAKE_SUBDIR) +depend: + @$(MAKE_SUBDIR) +distdepend: + @$(MAKE_SUBDIR) +TAGS: tags +tags: + @$(MAKE_SUBDIR) +clean: + @$(MAKE_SUBDIR) +distclean: clean + -rm -f Makefile config.status config.cache config.log *~ "#"* + @$(MAKE_SUBDIR) + +dist: tar + +# This really makes me sick... +tar: + @$(MAKE) distdepend ; \ + sh config.status ; \ + NAME=`sed -n \ + 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \ + rm -f $$NAME ; ln -s . $$NAME ; \ + FILES= ; \ + for subdir in $(SUBDIRS) ; do \ + d=`pwd` ; \ + cd $$subdir ; \ + FILES="$$FILES `$(MAKE) echo_tarfiles \ + | grep -v '^.*make\[' \ + | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \ + ` "; \ + cd $$d ; done ; \ + echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ; \ + $(TAR) -vchf - \ + `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \ + | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \ + rm $$NAME diff --git a/README b/README new file mode 100644 index 00000000..a8e65ba7 --- /dev/null +++ b/README @@ -0,0 +1,270 @@ + + XScreenSaver + + a screen saver and locker for the X window system + by Jamie Zawinski + +To build on Unix: + + - ./configure + - make + - make install + +The `configure' shell script will attempt to figure out which options are +appropriate for your system, and will create config.h and the various +Makefiles for you. Run `configure --help' to see how to override these +choices, or to specify things like the default installation directory. +The file `INSTALL' gives a general overview of use of these sorts of +configure scripts (those generated by the GNU autoconf system.) +The most important hint is probably this: + + ./configure --includedir=/opt/Motif/include --libdir=/opt/Motif/lib + +To build on VMS, see README.VMS. + + ============ + +The xscreensaver program waits until the keyboard and mouse have been idle +for a period, and then runs a graphics demo chosen at random. It turns off +as soon as there is any mouse or keyboard activity. + +The purpose of xscreensaver is to display pretty pictures on your screen +when it is not in use, in keeping with the philosophy that unattended +monitors should always be doing something interesting, just like they do +in the movies. + +However, xscreensaver can also be used as a screen locker, to prevent +others from using your terminal while your are away. + +The benefit that this program has over the combination of the xlock and +xautolock programs is the ease with which new graphics hacks can be +installed: you don't need to recompile this program to add a new display +mode, you just change some resource settings. Any program which can be +invoked in such a way that it draws on the root window of the screen can +now be used as a screensaver without modification. The programs that +are being run as screensavers don't need to have any special knowledge +about what it means to be a screensaver. + +The XIDLE, MIT-SCREEN-SAVER, and/or SGI SCREEN_SAVER server extensions +will be used if you have them. + +The dialog boxes (for locking and demo-mode) look best using Motif, but +can be configured to use Athena widgets instead. + +Also included are several graphics hacks for use as screensavers. There's +nothing magic about these: they're just programs that draw on the root +window, which are pointed at by the screensaver's default resource settings. + + qix - My own implementation of this, with many more options + than you would have thought qix could have. + helix - Generates spirally "stringart" patterns. + pedal - Draws a different kind of spirally pattern. + rorschach - Random inkblot patterns. + attraction - A bouncing ball demo, or a qix-like demo, or a wild + color-cycling thing, with some odd rules. + greynetic - Random colored/stippled rectangles. + rocks - Flying through an asteroid field. + blitspin - Rotate a bitmap using bitblts. + imsmap - Generates random maps or cloud formations. + 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. + halo - Random circular patterns. + pyro - Fireworks. Looks a lot like the version in xlock. + hopalong - Fractals. I snarfed this code from xlock. + flame - Fractals. Also from xlock. + noseguy - A guy with a big nose wanders around the screen saying + things. I snarfed this code from xnlock. + maze - This is the X maze demo modified to take a -root option + so that it works with xscreensaver. + lmorph - morphing line drawings. + bubbles - condensation forms on your monitor, then pops. + deco - Generates Brady-Bunch-era wall paneling. + moire - Circular interference patterns. + kaleidescope - Groovy, man. + swirl - Swirly color-cycling patterns. + 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. + galaxy - Spinning, colliding galaxies. + grav - Orbital simulation and/or cloud chamber. + ifs - Spinning, colliding iterated-function-system shapes. + julia - Animated rendition of the Julia set. + laser - Moving radiating lines. + lightning - Crackling fractal lightning bolts. + penrose - Quasiperiodic tilings. + sierpinski - two-dimensional Sierpinski triangle. + slip - Sucks your desktop through a jet engine. + 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. + forest - grows a fractal forest. + lisa - draws animated full-loop lisajous figures. + goop - Squishy transparent oil-and-bubble images + starfish - Radially-symmetric throbbing colormap-hacking blobs. + munch - The classic 1962-vintage "munching squares" hack. + fadeplot - Draws a swimming ribbon. + escher - Draws some escher-like scenes (GLX only.) + gears - Draws interlocking rotating gears (GLX only.) + morph3d - Draws shiny shape-changing 3d forms (GLX only.) + superquadrics - More shiny shape-changing 3d forms (GLX only.) + pipes - Generates a field of intertwined plumbing (GLX only.) + rubik - Solves a Rubik's Cube (GLX only.) + sproingies - Marble Madness meets Q-Bert (GLX only.) + +All of these will pop up their own window unless given that -root option. +See their man pages for more details. + +Other reasonable things to use as screensavers, if you have them, are + + xdaliclock -root -builtin2 - melting digital clock + xswarm -r 2>&- - swimming sperm + xwave -root - random 3d graphs + xbouncebits - bounce arbitrary bitmaps around + ico -r -p8 -faces -sleep 1 - it's dull, but it's there + 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) + xtacy -root - various eye candy + /usr/demos/bin/bongo -wbongo - an SGI GL demo + +You can get all 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! + +The latest version of xscreensaver is always available on the web at +http://people.netscape.com/jwz/xscreensaver/. + + -- Jamie Zawinski + + +Changes since 2.06: Minor header tweaks in windows.c and flag.c. + Made multi-architecture (VPATH) builds work properly. + Merged new GL stuff from xlockmore (rubik, morph3d.) + Fixed intermittent crashes in `imsmap' and `munch'. + Added `fadeplot' hack from xlockmore. +Changes since 2.05: Merged in VMS support from Patrick Moreau. +Changes since 2.04: Fixed a MIT-SCREEN-SAVER-related crash, and tweaked + configure to detect the extra-random -Xss library. +Changes since 2.03: HP configure tweaks. Detect and warn about LessTif. + Fixed low-color behavior of `goop', `pyro', `starfish', + `greynetic', `flame', `halo', and `moire'. +Changes since 2.02: Fixed flicker in `pipes'. Fixed 3d in `bouboule'. + Added `munch' hack. + Added basic dependencies to the Makefile.in files. +Changes since 2.01: Fixes for compiling with the MIT saver extension. + Made the yow/fortune program be a configure option. + Various configure tweaks. +Changes since 2.00: Added `goop' and `starfish' hacks. + Added colomap cycling to `halo'. + Made `attraction' use the new colormap allocator. + Added better $PATH diagnostics. + There was a bug in frand! Color selection should be + much improved now. +Changes since 1.34: Converted to use `configure' instead of `imake'. + ANSI C is now required. + Added Kerberos locking support, from Nat Lanza. + Made the stderr text use overlay planes, if possible. + Reworked the xlockmore compatibility stuff again. + Added `gears', `superquadrics', `escher', `pipes', + and `sproingies' hacks (depend on OpenGL.) +Changes since 1.33: Fixed some bugs, made fading be a little smoother. +Changes since 1.32: Made it work with multi-headed displays. + Generalized sub-process management (Unix sucks!) + Added interactive mouse frobbing to Julia. + Added (untested) support for HPUX shadow passwords. + Made normal non-shadow passwords be checked if the + shadow passwords aren't accessible for some reason. +Changes since 1.31: Removed *colorPrograms and *monoPrograms resources: + made it possible to specify the desired visual on a + per-hack basis. + Cleaned up / restructured the driver: no more globals. + Made the Motif and Athena dialogs share more code. + Probably fixed some Athena colormap-installation bugs. + Fixed screen grabbing (cmap) on SGI 12-bit PseudoColor. + Fixed divide-by-zero in bright random colormaps. + Added an improved version of xlock's `flag' hack. + Made unfading work better, and not flicker on SGIs. + Added `sphere', `forest', `lisa' hacks from xlockmore. + Added (untested) support for SunOS Adjunct passwords. +Changes since 1.30: Improved colors and colormap cycling of many hacks. + Cleaned up xlockmore compatibility layer. + Made `blitspin' able to grab an image off the screen. + Ported `swirl' and `bouboule' hacks from xlockmore. + Made the driver more careful about not leaving bits on + the screen, or allowing other windows to raise + themselves: it now re-blanks the screen every so often. + Added `-time' option to `xscreensaver-command'. + Improved SGI screen-grabbing some more: now it can grab + TrueColor screens into PseudoColor windows and have the + colors still come out semi-reasonably. +Changes since 1.29: Made `slidescreen' and `decayscreen' work better on + SGIs when windows of different visuals are present, by + using the XReadDisplay() extension to get a true 24-bit + image out of the frame buffer. + Made `noseguy' be in color, if compiled with XPM. + Ported `braid', `drift', `fract', `galaxy', `grav', + `ifs', `julia', `laser', `lightning', `penrose', + `sierpinski', `slip', `spiral', and `strange' hacks + from xlockmore. + Merged `hopalong' hack with a more recent version. + Added `cde.txt'. +Changes since 1.27: Added `deco', `moire', and `kaleidescope' hacks. + Merged in support for non-Motif locking and demo mode. + Made `blitspin' and `bubbles' work in TrueColor. + Fixed a stupid bug I introduced in `imsmap'. + Added `poly' and `gravity' options to `qix'. +Changes since 1.26: Added support for SGI SCREEN_SAVER extension. + Made `fade' and `unfade' work on 8-bit SGIs. + Made the dialog boxes more Motify. + Added `bubbles' hack. +Changes since 1.25: Added `lmorph' hack. + Added viscosity and mouse-control to attraction. + Fixed possible bad color choices in qix and attraction. + Added ramp-mode to halo. + Added a new RNG, which is faster and more portable + than using the RNG in libc. + Made locking work on SCO. + Various other minor tweaks that I don't remember. +Changes since 1.24: Made it capture the stdout/stderr of its subprocesses + and present them on the screensaver window itself. + Made demo mode work correctly with non-default visuals + and color maps, instead of always using the defaults. + Added -visual argument to all included screenhacks. + Support for the R6 MIT-SCREEN-SAVER server extension. + Made the demo mode list scroll properly. + Added `pedal' hack. +Changes since 1.23: Fixed some private-colormap oddities in slidescreen, + decayscreen, and xroger. Fixed apparent conservation- + of-mass problem in pyro; made the shrapnel round. +Changes since 1.22: Minor tweaks for IRIX5; fixed locking race condition. +Changes since 1.21: Minor tweaks for X11R6. + Fixes for non-default visuals. +Changes since 1.20: Fixed bug in color blitspin; added default image. + Added diagnostics to noseguy. Fixed off-by-one + error in flame. Added some missing casts. +Changes since 1.18: Added `flame' hack. + Fixed a minor Motif dialog text field bug. + Fixed yet another XPointer-not-defined-in-R4 bug. +Changes since 1.17: Added support for shadow password files. + Fixed some Motif-related locking bugs. + Added diagnostics when locking is disabled. + Made blitspin able to use the XPM library. + Added `decayscreen' hack. +Changes since 1.16: Added `halo' hack. +Changes since 1.15: Portability fixes. +Changes since 1.14: Broke the driver up into more source files. + Moved the hacks into their own directory. + Made all `time' parameters accept the 00:00:00 syntax, + so that even the parameters which are normally read as + minutes can be specified in seconds. + Added colormap cycling to `imsmap'. + Made hyper work with K&R compilers. +Changes since 1.13: Added `orbit' option to `attraction' hack. + Added `lock-timeout' option. + Cleaned up options of `maze' hack. +Changes since 1.8: Added demo mode, and locking. + Added `maze' hack. + Added `norotate' option to `rocks' hack. diff --git a/README.VMS b/README.VMS new file mode 100644 index 00000000..262d7dd0 --- /dev/null +++ b/README.VMS @@ -0,0 +1,59 @@ +OpenVMS port of Xscreensavser version 2.05 July 1997 +========================================== + +Xscreensaver distribution can be found in 3 subdirectories: + +[.DRIVER] The Xscreensaver and Xscreensaver-command programs. +[.HACKS] Graphic demos ,can be run either through the xscreensaver program + or standalone. +[.UTILS] A small libraries of various utilities. + +This port has been tested with VAX VMS 6.1 (compiled with DEC 5 5.0 and +Motif 1.2) and AXP VMS 6.2 (compiled with DEC C 5.0 and Motif 1.2-4). + +To rebuild, you need to rebuild [.UTILS] directory first and create the +object library (look at the end of COMPILE*.COM procedure). + +You can now build the [.HACKS] directory and the [.DRIVER] directory. + +A one-step build is now available via the MAKEVMS.COM script. + +WARNING : before building [.HACKS], you may need to correct some of the +DECwindows bitmap files. Some files are bogus !! (they have a long line of +null chars at the end). These files are under +SYS$COMMON:[DECW$INCLUDE.BITMAPS] directory: + +STIPPLE.XBM +HLINES2.XBM +LIGHT_GRAY.XBM +ROOT_WEAVES.XBM +VLINES2.XBM + +These files are all used by Greynetic demo. + +Nota: link procedure automagically select appropriate X and Motif Libraries +(X11R4/Motif 1.1 - X11R5/Motif 1.2). + +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 +directory for a per-user customization basis. You can also install it under +the system-wide user resource directory SYS$COMMON:[DECW$DEFAULT.USER] +(with (W:RE) protections). The new graphics hack must be run in root-window +mode to be accepted by Xscreensaver. + +The graphic demos are spawn into subprocess created by the system() call (in +the Unix version the execvp() call is used). + +The VMS passord checking programs were picked up in the Xlock distribution. + +Enjoy, + +Patrick MOREAU - CENA/Athis-Mons - FRANCE (pmoreau@cena.dgac.fr) + (moreau_p@decus.decus.fr) diff --git a/cde.txt b/cde.txt new file mode 100644 index 00000000..2a5d2169 --- /dev/null +++ b/cde.txt @@ -0,0 +1,98 @@ +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. diff --git a/config.guess b/config.guess new file mode 100755 index 00000000..e9e44559 --- /dev/null +++ b/config.guess @@ -0,0 +1,693 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-cbm-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-atari-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-sun-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-apple-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[3478]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; + 9000/8?? ) HP_ARCH=hppa1.0 ;; + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp3[0-9][05]:OpenBSD:*:*) + echo m68k-hp-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo i386-pc-cygwin32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin32 + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. + ld_help_string=`ld --help 2>&1` + if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then + echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then + echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then + echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then + echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then + echo "powerpc-unknown-linux-gnu" ; exit 0 + elif test "${UNAME_MACHINE}" = "alpha" ; then + echo alpha-unknown-linux-gnu ; exit 0 + elif test "${UNAME_MACHINE}" = "sparc" ; then + echo sparc-unknown-linux-gnu ; exit 0 + else + # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us + # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. + test ! -d /usr/lib/ldscripts/. \ + && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + # Determine whether the default compiler is a.out or elf + cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +rm -f dummy.c dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1 diff --git a/config.h-vms b/config.h-vms new file mode 100644 index 00000000..d91ebfc4 --- /dev/null +++ b/config.h-vms @@ -0,0 +1,251 @@ +/* This is a config.h file that has been pregenerated (from config.h.in) + * with settings that are correct for VMS. + */ + + + +/* config.h.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. + * + * The best way to set these parameters is by running the included `configure' + * script. That examines your system, and generates `config.h' from + * `config.h.in'. + * + * If something goes very wrong, you can edit `config.h' directly, but beware + * that your changes will be lost if you ever run `configure' again. + */ + +/* ************************************************************************* + CONFIGURING SERVER EXTENSIONS + ************************************************************************* */ + +/* Define this if you have the XReadDisplay extension (I think this is an + SGI-only thing; it's in .) A couple of + the screenhacks will take advantage of this if it's available. + */ +#undef HAVE_READ_DISPLAY_EXTENSION + +/* Define this if you have the XHPDisableReset function (an HP only thing.) + */ +#undef HAVE_XHPDISABLERESET + +/* First, some background: there are three distinct server extensions which + * are useful to a screen saver program: they are XIDLE, MIT-SCREEN-SAVER, + * and SCREEN_SAVER. + * + * The XIDLE extension resides in .../contrib/extensions/xidle/ on the X11R5 + * contrib tape. This extension lets the client get accurate idle-time + * information from the X server in a potentially more reliable way than by + * simply watching for keyboard and mouse activity. However, the XIDLE + * extension has apparently not been ported to X11R6. + * + * The SCREEN_SAVER extension is found (as far as I know) only in the SGI + * X server, and it exists in all releases since (at least) Irix 5. The + * relevant header file is /usr/include/X11/extensions/XScreenSaver.h. + * + * The similarly-named MIT-SCREEN-SAVER extension came into existence long + * after the SGI SCREEN_SAVER extension was already in use, and resides in + * .../contrib/extensions/screensaver/ on the X11R6 contrib tape. It is + * also found in certain recent X servers built in to NCD X terminals. + * + * The MIT extension does basically the same thing that the XIDLE extension + * does, but there are two things wrong with it: first, because of the way + * the extension was designed, the `fade' option to XScreenSaver will be + * uglier: just before the screen fades out, there will be an unattractive + * flicker to black, because this extension blanks the screen *before* + * telling us that it is time to do so. Second, this extension is known to + * be buggy; on the systems I use, it works, but some people have reported + * X server crashes as a result of using it. XScreenSaver uses this + * extension rather conservatively, because when I tried to use any of its + * more complicated features, I could get it to crash the server at the + * drop of a hat. + * + * In short, the MIT-SCREEN-SAVER extension is a piece of junk. The older + * SGI SCREEN_SAVER extension works great, as does XIDLE. It would be nice + * If those two existed on more systems, that is, would be adopted by the + * X Consortium in favor of their inferior "not-invented-here" entry. + */ + +/* Define this if you have the XIDLE extension installed. If you have the + * XIDLE extension, this is recommended. (You have this extension if the + * file /usr/include/X11/extensions/xidle.h exists.) Turning on this flag + * lets XScreenSaver work better with servers which support this extension; + * but it will still work with servers which do not suport it, so it's a good + * idea to compile in support for it if you can. + */ +#undef HAVE_XIDLE_EXTENSION + +/* Define this if you have the MIT-SCREEN-SAVER extension installed. See the + * caveats about this extension, above. (It's available if the file + * /usr/include/X11/extensions/scrnsaver.h exists.) + */ +#undef HAVE_MIT_SAVER_EXTENSION + +/* Define this if you have the SGI SCREEN_SAVER extension. This is standard + * on Irix systems, and not available elsewhere. + */ +#undef HAVE_SGI_SAVER_EXTENSION + + + +/* ************************************************************************* + CONFIGURING GRAPHICS TOOLKITS + ************************************************************************* */ + +/* Define this if you have Motif. + */ +#define HAVE_MOTIF + +/* Define this if you don't have Motif, but you have Athena (-Xaw). + */ +#undef HAVE_ATHENA + +/* Define this if you have Athena, and the version you have includes the + * XawViewportSetCoordinates function in Viewport.h (some old versions of + * the library didn't have this function.) + */ +#undef HAVE_XawViewportSetCoordinates + +/* Define this if you have the XPM library installed. Some of the demos can + * make use of this if it is available. + */ +#undef HAVE_XPM + +/* Define this if you have the Xmu library. This is standard part of X, and + * if your vendor doesn't ship it, you should report that as a bug. + */ +#define HAVE_XMU + +/* Define this if you have OpenGL. Some of the demos require it, so if you + * don't have it, then those particular demos won't be built. (This won't + * affect the screen saver as a whole.) + */ +#undef HAVE_GL + +/* Define this if you have GL, but it's the MesaGL variant. (The libraries + have different names.) (HAVE_GL should be defined too.) + */ +#undef HAVE_MESA_GL + +/* Some screenhacks like to run an external program to generate random pieces + of text; set this to the one you like ("yow" and "fortune" are the most + likely prospects.) Note that this is just the default; X resources can + be used to override it. + */ +#define ZIPPY_PROGRAM "fortune" + + + +/* ************************************************************************* + CONFIGURING PASSWORD AUTHENTICATION + ************************************************************************* */ + +/* Define this to remove the option of locking the screen at all. + */ +#undef NO_LOCKING + +/* Define this if you want to use Kerberos authentication to lock/unlock the + * screen instead of your local password. This currently uses Kerberos V4, + * but a V5 server with V4 compatibility will work. WARNING: DO NOT USE AFS + * string-to-key passwords with this option. This option currently *only* + * works with standard Kerberos des_string_to_key. If your password is an + * AFS password and not a kerberos password, it will not authenticate + * properly. See the comments in driver/kpasswd.c for more information if you + * need it. + */ +#undef HAVE_KERBEROS + + +/* Define this if your system uses `shadow' passwords, that is, the passwords + * live in /etc/shadow instead of /etc/passwd, and one reads them with + * getspnam() instead of getpwnam(). (Note that SCO systems do some random + * other thing; others might as well. See the ifdefs in driver/passwd.c if + * you're having trouble related to reading passwords.) + */ +#undef HAVE_SHADOW_PASSWD + +/* Define this if your system is Digital or SCO Unix with so-called ``Enhanced + Security'', that is, the passwords live in /tcb/files/auth// + instead of in /etc/passwd, and one reads them with getprpwnam() instead + of getpwnam(). + */ +#undef HAVE_ENHANCED_PASSWD + +/* Define this if your system is Solaris with ``adjunct'' passwords (this is + the version where one gets at the passwords with getpwanam() instead of + getpwnam().) I haven't tested this one, let me know if it works. + */ +#undef HAVE_ADJUNCT_PASSWD + +/* Define this if you are running HPUX with so-called ``Secure Passwords'' + (if you have /usr/include/hpsecurity.h, you probably have this.) I + haven't tested this one, let me know if it works. + */ +#undef HAVE_HPUX_PASSWD + + +/* ************************************************************************* + OTHER C ENVIRONMENT JUNK + ************************************************************************* */ + +/* Define this to void* if you're using X11R4 or earlier. */ +#undef XPointer + +/* Define if you have the nice function. */ +#undef HAVE_NICE + +/* Define if you have the setpriority function. */ +#undef HAVE_SETPRIORITY + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `int' if doesn't define. */ +#undef mode_t + +/* Define to `int' if doesn't define. */ +#undef pid_t + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS + +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if gettimeofday requires two arguments. */ +#undef GETTIMEOFDAY_TWO_ARGS + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getcwd function. */ +#undef HAVE_GETWD + +/* Define if you have the uname function. */ +#undef HAVE_UNAME + +/* Define if you have the fcntl function. */ +#undef HAVE_FCNTL + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H diff --git a/config.h.in b/config.h.in new file mode 100644 index 00000000..8cac343a --- /dev/null +++ b/config.h.in @@ -0,0 +1,246 @@ +/* config.h.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. + * + * The best way to set these parameters is by running the included `configure' + * script. That examines your system, and generates `config.h' from + * `config.h.in'. + * + * If something goes very wrong, you can edit `config.h' directly, but beware + * that your changes will be lost if you ever run `configure' again. + */ + + +/* ************************************************************************* + CONFIGURING SERVER EXTENSIONS + ************************************************************************* */ + +/* Define this if you have the XReadDisplay extension (I think this is an + SGI-only thing; it's in .) A couple of + the screenhacks will take advantage of this if it's available. + */ +#undef HAVE_READ_DISPLAY_EXTENSION + +/* Define this if you have the XHPDisableReset function (an HP only thing.) + */ +#undef HAVE_XHPDISABLERESET + +/* First, some background: there are three distinct server extensions which + * are useful to a screen saver program: they are XIDLE, MIT-SCREEN-SAVER, + * and SCREEN_SAVER. + * + * The XIDLE extension resides in .../contrib/extensions/xidle/ on the X11R5 + * contrib tape. This extension lets the client get accurate idle-time + * information from the X server in a potentially more reliable way than by + * simply watching for keyboard and mouse activity. However, the XIDLE + * extension has apparently not been ported to X11R6. + * + * The SCREEN_SAVER extension is found (as far as I know) only in the SGI + * X server, and it exists in all releases since (at least) Irix 5. The + * relevant header file is /usr/include/X11/extensions/XScreenSaver.h. + * + * The similarly-named MIT-SCREEN-SAVER extension came into existence long + * after the SGI SCREEN_SAVER extension was already in use, and resides in + * .../contrib/extensions/screensaver/ on the X11R6 contrib tape. It is + * also found in certain recent X servers built in to NCD X terminals. + * + * The MIT extension does basically the same thing that the XIDLE extension + * does, but there are two things wrong with it: first, because of the way + * the extension was designed, the `fade' option to XScreenSaver will be + * uglier: just before the screen fades out, there will be an unattractive + * flicker to black, because this extension blanks the screen *before* + * telling us that it is time to do so. Second, this extension is known to + * be buggy; on the systems I use, it works, but some people have reported + * X server crashes as a result of using it. XScreenSaver uses this + * extension rather conservatively, because when I tried to use any of its + * more complicated features, I could get it to crash the server at the + * drop of a hat. + * + * In short, the MIT-SCREEN-SAVER extension is a piece of junk. The older + * SGI SCREEN_SAVER extension works great, as does XIDLE. It would be nice + * If those two existed on more systems, that is, would be adopted by the + * X Consortium in favor of their inferior "not-invented-here" entry. + */ + +/* Define this if you have the XIDLE extension installed. If you have the + * XIDLE extension, this is recommended. (You have this extension if the + * file /usr/include/X11/extensions/xidle.h exists.) Turning on this flag + * lets XScreenSaver work better with servers which support this extension; + * but it will still work with servers which do not suport it, so it's a good + * idea to compile in support for it if you can. + */ +#undef HAVE_XIDLE_EXTENSION + +/* Define this if you have the MIT-SCREEN-SAVER extension installed. See the + * caveats about this extension, above. (It's available if the file + * /usr/include/X11/extensions/scrnsaver.h exists.) + */ +#undef HAVE_MIT_SAVER_EXTENSION + +/* Define this if you have the SGI SCREEN_SAVER extension. This is standard + * on Irix systems, and not available elsewhere. + */ +#undef HAVE_SGI_SAVER_EXTENSION + + + +/* ************************************************************************* + CONFIGURING GRAPHICS TOOLKITS + ************************************************************************* */ + +/* Define this if you have Motif. + */ +#undef HAVE_MOTIF + +/* Define this if you don't have Motif, but you have Athena (-Xaw). + */ +#undef HAVE_ATHENA + +/* Define this if you have Athena, and the version you have includes the + * XawViewportSetCoordinates function in Viewport.h (some old versions of + * the library didn't have this function.) + */ +#undef HAVE_XawViewportSetCoordinates + +/* Define this if you have the XPM library installed. Some of the demos can + * make use of this if it is available. + */ +#undef HAVE_XPM + +/* Define this if you have the Xmu library. This is standard part of X, and + * if your vendor doesn't ship it, you should report that as a bug. + */ +#undef HAVE_XMU + +/* Define this if you have OpenGL. Some of the demos require it, so if you + * don't have it, then those particular demos won't be built. (This won't + * affect the screen saver as a whole.) + */ +#undef HAVE_GL + +/* Define this if you have GL, but it's the MesaGL variant. (The libraries + have different names.) (HAVE_GL should be defined too.) + */ +#undef HAVE_MESA_GL + +/* Some screenhacks like to run an external program to generate random pieces + of text; set this to the one you like ("yow" and "fortune" are the most + likely prospects.) Note that this is just the default; X resources can + be used to override it. + */ +#define ZIPPY_PROGRAM "fortune" + + + +/* ************************************************************************* + CONFIGURING PASSWORD AUTHENTICATION + ************************************************************************* */ + +/* Define this to remove the option of locking the screen at all. + */ +#undef NO_LOCKING + +/* Define this if you want to use Kerberos authentication to lock/unlock the + * screen instead of your local password. This currently uses Kerberos V4, + * but a V5 server with V4 compatibility will work. WARNING: DO NOT USE AFS + * string-to-key passwords with this option. This option currently *only* + * works with standard Kerberos des_string_to_key. If your password is an + * AFS password and not a kerberos password, it will not authenticate + * properly. See the comments in driver/kpasswd.c for more information if you + * need it. + */ +#undef HAVE_KERBEROS + + +/* Define this if your system uses `shadow' passwords, that is, the passwords + * live in /etc/shadow instead of /etc/passwd, and one reads them with + * getspnam() instead of getpwnam(). (Note that SCO systems do some random + * other thing; others might as well. See the ifdefs in driver/passwd.c if + * you're having trouble related to reading passwords.) + */ +#undef HAVE_SHADOW_PASSWD + +/* Define this if your system is Digital or SCO Unix with so-called ``Enhanced + Security'', that is, the passwords live in /tcb/files/auth// + instead of in /etc/passwd, and one reads them with getprpwnam() instead + of getpwnam(). + */ +#undef HAVE_ENHANCED_PASSWD + +/* Define this if your system is Solaris with ``adjunct'' passwords (this is + the version where one gets at the passwords with getpwanam() instead of + getpwnam().) I haven't tested this one, let me know if it works. + */ +#undef HAVE_ADJUNCT_PASSWD + +/* Define this if you are running HPUX with so-called ``Secure Passwords'' + (if you have /usr/include/hpsecurity.h, you probably have this.) I + haven't tested this one, let me know if it works. + */ +#undef HAVE_HPUX_PASSWD + + +/* ************************************************************************* + OTHER C ENVIRONMENT JUNK + ************************************************************************* */ + +/* Define this to void* if you're using X11R4 or earlier. */ +#undef XPointer + +/* Define if you have the nice function. */ +#undef HAVE_NICE + +/* Define if you have the setpriority function. */ +#undef HAVE_SETPRIORITY + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `int' if doesn't define. */ +#undef mode_t + +/* Define to `int' if doesn't define. */ +#undef pid_t + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if gettimeofday requires two arguments. */ +#undef GETTIMEOFDAY_TWO_ARGS + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getcwd function. */ +#undef HAVE_GETWD + +/* Define if you have the uname function. */ +#undef HAVE_UNAME + +/* Define if you have the fcntl function. */ +#undef HAVE_FCNTL + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H diff --git a/config.sub b/config.sub new file mode 100755 index 00000000..04325249 --- /dev/null +++ b/config.sub @@ -0,0 +1,927 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \ + | arme[lb] | pyramid \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | we32k | ns16k | clipper | i370 | sh \ + | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ + | pdp11 | mips64el | mips64orion | mips64orionel \ + | sparc | sparclet | sparclite | sparc64) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[3456]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ + | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ + | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ + | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ + | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigados) + basic_machine=m68k-cbm + os=-amigados + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[3456]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[3456]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[3456]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[3456]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5) + basic_machine=i586-intel + ;; + pentiumpro | p6) + basic_machine=i686-intel + ;; + pentium-* | p5-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + k5) + # We don't have specific support for AMD's K5 yet, so just call it a Pentium + basic_machine=i586-amd + ;; + nexen) + # We don't have specific support for Nexgen yet, so just call it a Pentium + basic_machine=i586-nexgen + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + basic_machine=mips-mips + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware* | svr4*) + os=-sysv4 + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -linux-gnu* | -uxpv*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigados + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os diff --git a/configure b/configure new file mode 100755 index 00000000..83a5d96a --- /dev/null +++ b/configure @@ -0,0 +1,5404 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.12 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + +Installation options: + + --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir', + instead of putting them in bindir itself. You can + specify the name of the subdirectory. For example, + --exec-prefix=/usr/local/bin --enable-subdir=demos + would put xscreensaver in /usr/local/bin/, and would + put the demos in /usr/local/bin/demos/. Note that if + you do this, you must make sure that the directory + is on your \$PATH before xscreensaver is started: the + directory name is not hardcoded into the program. + This merely sets the default installation location. + + --disable-subdir Just put the demos in \`bindir' (this is the default.) +" +ac_help="$ac_help + --with-x use the X Window System" +ac_help="$ac_help + +Server options: + + --with-sgi-ext Include support for the SGI SCREEN_SAVER + server extension, if possible (this is the default). + --without-sgi-ext Do not compile in support for this extension." +ac_help="$ac_help + --with-mit-ext Include support for the MIT-SCREEN-SAVER + server extension, if possible (this is the default). + --without-mit-ext Do not compile in support for this extension." +ac_help="$ac_help + --with-xidle-ext Include support for the XIDLE server extension, + if possible (this is the default). + --without-xidle-ext Do not compile in support for this extension." +ac_help="$ac_help + +Toolkit options: + + --with-motif Use the Motif toolkit for the user interface, + if possible (this is the default). + --without-motif Do not use Motif." +ac_help="$ac_help + --with-athena Use the Athena toolkit for the user interface, if + possible (this is the default if Motif isn't used.) + --without-athena Do not use Athena." +ac_help="$ac_help + +Demo options: + + --with-xpm Include support for XPM files in some demos, + if possible (this is the default). + --without-xpm Do not compile in support for XPM files." +ac_help="$ac_help + --with-gl Build those demos which depend on OpenGL, + if possible (this is the default). + --without-gl Do not build the OpenGL demos." +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-zippy=PROGRAM Some demos are able to run an external program and + display its text; this names the program to use by + default (though it can be overridden with X + 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\"." +ac_help="$ac_help + +Locking options: + + --enable-locking Compile in support for locking the display + (this is the default.) + --disable-locking Do not allow locking at all." +ac_help="$ac_help + + --with-kerberos Include support for Kerberos authentication, + if possible (this is the default.) + --without-kerberos Do not compile in support for Kerberos." +ac_help="$ac_help + --with-shadow Include support for shadow password authentication, + if possible (this is the default, if no Kerberos.) + --without-shadow Do not compile in support for shadow passwords. +" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.12" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=driver/subprocs.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +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:633: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +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:657: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + 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_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +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:686: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:734: 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. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&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 + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +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:768: 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:773: 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 + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:797: 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 + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + +if test -z "$GCC"; then + echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6 +echo "configure:827: checking how to request ANSI compilation" >&5 + case "$host" in + *-hpux*) + echo "$ac_t""HPUX: adding -Ae" 1>&6 + CC="$CC -Ae" + ;; + *-aix*) + echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6 + CC="$CC -qlanglvl=ansi -qhalt=e" + ;; + *) + echo "$ac_t""no idea" 1>&6 + ;; + esac +fi + + +echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6 +echo "configure:845: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + echo "$ac_t""no" 1>&6 + { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; } +fi +rm -fr conftest* +fi + + +case "$host" in + *-irix*) + if test -n "$GCC"; then + echo "$ac_t""Turning on gcc compiler warnings." 1>&6 + CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format" + else + # not gcc + echo "$ac_t""Turning on SGI compiler warnings." 1>&6 + CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3" + fi + ;; +esac + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:883: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# 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:954: 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 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +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:1004: 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 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1032: 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 <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:1107: 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 <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <&6 +echo "configure:1148: 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 < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:1252: 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 < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:1287: 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 < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { (eval echo configure:1308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +ac_header_dirent=no +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:1333: 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 < +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:1346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +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:1371: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-ldir $LIBS" +cat > conftest.$ac_ext <&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 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:1412: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lx $LIBS" +cat > conftest.$ac_ext <&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 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +echo "configure:1455: 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 < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:1488: 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 < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:1521: 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 < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:1543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1562: 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 < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + + + +echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6 +echo "configure:1597: 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 < + #include +int main() { +struct timeval tv; gettimeofday(&tv); +; return 0; } +EOF +if { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_gettimeofday_args=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < + #include +int main() { +struct timeval tv; struct timezone tzp; + gettimeofday(&tv, &tzp); +; return 0; } +EOF +if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_gettimeofday_args=2 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_gettimeofday_args=0 +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_gettimeofday_args=$ac_gettimeofday_args +fi + +ac_gettimeofday_args=$ac_cv_gettimeofday_args +if test $ac_gettimeofday_args = 1 ; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY 1 +EOF + + echo "$ac_t""one argument" 1>&6 +elif test $ac_gettimeofday_args = 2 ; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY 1 +EOF + + cat >> confdefs.h <<\EOF +#define GETTIMEOFDAY_TWO_ARGS 1 +EOF + + echo "$ac_t""two arguments" 1>&6 +else + echo "$ac_t""unknown" 1>&6 +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:1667: 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 < +/* 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 $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +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:1723: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1733: \"$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 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + + +# Check whether --enable-subdir or --disable-subdir was given. +if test "${enable_subdir+set}" = set; then + enableval="$enable_subdir" + enable_subdir="$enableval" +else + enable_subdir=no +fi + +if test x"$enable_subdir" = xno; then + HACKDIR='$(bindir)' +elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then + echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir" + exit 1 +else + HACKDIR='$(bindir)/'$enable_subdir +fi + + +# If we find X, set shell vars x_includes and x_libraries to the +# paths, otherwise set no_x=yes. +# 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:1785: checking for X" >&5 + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + : +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else +if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=NO ac_x_libraries=NO +rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir +fi + +if test "$ac_x_includes" = NO; then + # Guess where to find include files, by looking for this one X11 .h file. + test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h + + # First, try using that file with no special directory specified. +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + # Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in \ + /usr/X11/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + ac_x_includes=$ac_dir + break + fi + done +fi +rm -f conftest* +fi # $ac_x_includes = NO + +if test "$ac_x_libraries" = NO; then + # Check for the libraries. + + test -z "$x_direct_test_library" && x_direct_test_library=Xt + test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc + + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" +cat > conftest.$ac_ext <&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. +ac_x_libraries= +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + LIBS="$ac_save_LIBS" +# First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. +for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest* +fi # $ac_x_libraries = NO + +if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + echo "$ac_t""$have_x" 1>&6 + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + cat >> confdefs.h <<\EOF +#define X_DISPLAY_MISSING 1 +EOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + 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:2034: checking whether -R must be followed by a space" >&5 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_R_nospace=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_nospace=no +fi +rm -f conftest* + if test $ac_R_nospace = yes; then + echo "$ac_t""no" 1>&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_R_space=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_space=no +fi +rm -f conftest* + if test $ac_R_space = yes; then + echo "$ac_t""yes" 1>&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$ac_t""neither works" 1>&6 + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # 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:2099: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +else + echo "$ac_t""no" 1>&6 +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:2140: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet_stub $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # 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:2188: 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 < +/* 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 gethostbyname(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +gethostbyname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:2237: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -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:2286: 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 < +/* 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 connect(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_connect) || defined (__stub___connect) +choke me +#else +connect(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_connect=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_connect=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_connect = no; then + echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +echo "configure:2335: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + 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:2378: 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 < +/* 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 remove(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_remove) || defined (__stub___remove) +choke me +#else +remove(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_remove=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_remove=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_remove = no; then + echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 +echo "configure:2427: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lposix $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo $ac_n "checking for shmat""... $ac_c" 1>&6 +echo "configure:2470: 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 < +/* 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 shmat(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shmat) || defined (__stub___shmat) +choke me +#else +shmat(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_shmat=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shmat=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_shmat = no; then + echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 +echo "configure:2519: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lipc $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # 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:2571: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lICE $LIBS" +cat > conftest.$ac_ext <&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 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else + echo "$ac_t""no" 1>&6 +fi + + LDFLAGS="$ac_save_LDFLAGS" + +fi + + +# Try and find the app-defaults directory. +# It sucks that autoconf doesn't do this already... +# + + + + + + + + + echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6 +echo "configure:2627: 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 + + rm -fr conftestdir + if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_x_app_defaults="${XAPPLOADDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which'd confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + fi + cd .. + rm -fr conftestdir + fi + # Look for the directory under a standard set of common directories. + # Check X11 before X11Rn because it's often a symlink to the current release. + for ac_dir in \ + /usr/X11/lib/app-defaults \ + /usr/X11R6/lib/app-defaults \ + /usr/X11R6/lib/X11/app-defaults \ + /usr/X11R5/lib/app-defaults \ + /usr/X11R5/lib/X11/app-defaults \ + /usr/X11R4/lib/app-defaults \ + /usr/X11R4/lib/X11/app-defaults \ + \ + /usr/lib/X11/app-defaults \ + /usr/lib/X11R6/app-defaults \ + /usr/lib/X11R5/app-defaults \ + /usr/lib/X11R4/app-defaults \ + \ + /usr/local/X11/lib/app-defaults \ + /usr/local/X11R6/lib/app-defaults \ + /usr/local/X11R5/lib/app-defaults \ + /usr/local/X11R4/lib/app-defaults \ + \ + /usr/local/lib/X11/app-defaults \ + /usr/local/lib/X11R6/app-defaults \ + /usr/local/lib/X11R6/X11/app-defaults \ + /usr/local/lib/X11R5/app-defaults \ + /usr/local/lib/X11R5/X11/app-defaults \ + /usr/local/lib/X11R4/app-defaults \ + /usr/local/lib/X11R4/X11/app-defaults \ + \ + /usr/X386/lib/X11/app-defaults \ + /usr/x386/lib/X11/app-defaults \ + /usr/XFree86/lib/X11/app-defaults \ + \ + /usr/lib/X11/app-defaults \ + /usr/local/lib/X11/app-defaults \ + /usr/unsupported/lib/X11/app-defaults \ + /usr/athena/lib/X11/app-defaults \ + /usr/local/x11r5/lib/X11/app-defaults \ + /usr/lpp/Xamples/lib/X11/app-defaults \ + /lib/usr/lib/X11/app-defaults \ + \ + /usr/openwin/lib/app-defaults \ + /usr/openwin/lib/X11/app-defaults \ + /usr/openwin/share/lib/app-defaults \ + /usr/openwin/share/lib/X11/app-defaults \ + \ + /X11R6/lib/app-defaults \ + /X11R5/lib/app-defaults \ + /X11R4/lib/app-defaults \ + ; \ + do + if test -d "$ac_dir"; then + ac_x_app_defaults=$ac_dir + break + fi + done + + if test x"$ac_x_app_defaults" = x; then + ac_cv_x_app_defaults="/usr/lib/X11/app-defaults" + else + # Record where we found app-defaults for the cache. + ac_cv_x_app_defaults="$ac_x_app_defaults" + fi +fi + +echo "$ac_t""$ac_cv_x_app_defaults" 1>&6 + eval ac_x_app_defaults="$ac_cv_x_app_defaults" + +APPDEFAULTS=$ac_x_app_defaults + + +# Like AC_CHECK_HEADER, but it uses the already-computed -I directories. +# + + +# Like AC_EGREP_HEADER, but it uses the already-computed -I directories. +# + + +# Like AC_TRY_COMPILE, but it uses the already-computed -I directories. +# + + + +# Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories. +# Use this sparingly; it probably doesn't work very well on X programs. +# + + + + + +# check for the HP XHPDisableReset server extension headers. +# + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "XHPDisableReset" >/dev/null 2>&1; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_XHPDISABLERESET 1 +EOF + + SAVER_LIBS="-lXhp11 $SAVER_LIBS" +fi +rm -f conftest* + + CPPFLAGS="$ac_save_CPPFLAGS" + + +# Check for the availability of the XPointer typedef, and define it otherwise. +# +echo $ac_n "checking for XPointer""... $ac_c" 1>&6 +echo "configure:2769: checking for XPointer" >&5 +if eval "test \"`echo '$''{'ac_cv_xpointer'+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" + cat > conftest.$ac_ext < +int main() { +XPointer foo = (XPointer) 0; +; return 0; } +EOF +if { (eval echo configure:2787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_xpointer=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_xpointer=no +fi +rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_xpointer" 1>&6 +if test $ac_cv_xpointer != yes; then + cat >> confdefs.h <<\EOF +#define XPointer char* +EOF + +fi + + +case "$host" in + *-hpux*) + # Thanks for not making xmkmf find this by default, you losers. + if test -d /usr/lib/Motif1.2 ; then + X_CFLAGS="-I/usr/include/Motif1.2 $X_CFLAGS" + X_LIBS="-L/usr/lib/Motif1.2 $X_LIBS" + elif test -d /usr/lib/Motif1.1 ; then + X_CFLAGS="-I/usr/include/Motif1.1 $X_CFLAGS" + X_LIBS="-L/usr/lib/Motif1.1 $X_LIBS" + fi + + # This too. You losers. + if test -d /usr/contrib/X11R6/include ; then + X_CFLAGS="-I/usr/contrib/X11R6/include $X_CFLAGS" + X_LIBS="-L/usr/contrib/X11R6/lib $X_LIBS" + elif test -d /usr/contrib/X11R5/include ; then + X_CFLAGS="-I/usr/contrib/X11R5/include $X_CFLAGS" + X_LIBS="-L/usr/contrib/X11R5/lib $X_LIBS" + fi + + ;; + *-solaris*) + # Same to you, pinheads. (Is this really the standard location now? + # What happened to the joke that this kind of thing went in /opt?) + if test -f /usr/dt/include/Xm/Xm.h ; then + X_CFLAGS="$X_CFLAGS -I/usr/dt/include" + X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib" + + # 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:2839: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <&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 + X_LIBS="$X_LIBS -lgen" +else + echo "$ac_t""no" 1>&6 +fi + + fi + ;; +esac + + + +# Check for Xmu (some fucked up vendors don't ship it...) +# +have_xmu=no + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:2895: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2905: \"$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_xmu=yes +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" +if test $have_xmu = no ; then + XMU_SRCS='$(UTILS_SRC)/xmu.c' + XMU_OBJS='$(UTILS_BIN)/xmu.o' +else + XMU_SRCS='' + XMU_OBJS='' + SAVER_LIBS="-lXmu $SAVER_LIBS" + HACK_LIBS="-lXmu $HACK_LIBS" + cat >> confdefs.h <<\EOF +#define HAVE_XMU 1 +EOF + +fi + + +# See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x. +# The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03. +# +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:2949: 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 + ac_save_LDFLAGS="$LDFLAGS" + if test \! -z "$x_libraries" ; then + LDFLAGS="$LDFLAGS -L$x_libraries" + fi + # Note: this trick never works! (Generally.) + # We're only getting away with using AC_TRY_LINK + # with X libraries because we know it's SunOS. + LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_sunos_xmu_bug=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_sunos_xmu_bug=yes +fi +rm -f conftest* + LDFLAGS="$ac_save_LDFLAGS" +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:2985: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_ld_static=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_ld_static=no +fi +rm -f conftest* + LDFLAGS="$ac_save_LDFLAGS" +fi + +echo "$ac_t""$ac_cv_ld_static" 1>&6 + if test $ac_cv_ld_static = yes ; then + LDFLAGS="$LDFLAGS -static" + else + LDFLAGS="$LDFLAGS -Bstatic" + fi + fi + ;; + esac +fi + + +# Check for the SGI SCREEN_SAVER server extension header. +# +have_sgi=no +with_sgi_req=unspecified +# Check whether --with-sgi-ext or --without-sgi-ext was given. +if test "${with_sgi_ext+set}" = set; then + withval="$with_sgi_ext" + with_sgi="$withval"; with_sgi_req="$withval" +else + with_sgi=yes +fi + +if test $with_sgi = yes; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3045: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3055: \"$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_sgi=yes + cat >> confdefs.h <<\EOF +#define HAVE_SGI_SAVER_EXTENSION 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + +elif test $with_sgi != no; then + echo "error: must be yes or no: --with-sgi-ext=$with_sgi" + exit 1 +fi + +# Check for the MIT-SCREEN-SAVER server extension header, +# unless the SGI extension has already been found. +# +have_mit=no +with_mit_req=unspecified +# Check whether --with-mit-ext or --without-mit-ext was given. +if test "${with_mit_ext+set}" = set; then + withval="$with_mit_ext" + with_mit="$withval"; with_mit_req="$withval" +else + with_mit=yes +fi + +if test $have_sgi != yes; then + if test $with_mit = yes; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3110: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3120: \"$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_mit=yes +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + + # Now check to see if it's really in the library; XF86Free-3.3 ships + # scrnsaver.h, but doesn't include the code in libXext.a, the idiots! + # + if test $have_mit = yes; then + + 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" + LDFLAGS="$LDFLAGS -L$x_libraries" + echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6 +echo "configure:3162: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lXext -lm $LIBS" +cat > conftest.$ac_ext <&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 + ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +have_mit=no +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" + + if test $have_mit = no; then + # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead + # of in Xext. Thank you master, may I have another. + + 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" + LDFLAGS="$LDFLAGS -L$x_libraries" + echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6 +echo "configure:3230: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lXExExt -lX11 -lXext -lm $LIBS" +cat > conftest.$ac_ext <&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_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt" +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" + fi + + if test $have_mit = no; then + # Double fuck! Looks like some versions of XFree86 (whichever version + # it is that comes with RedHat Linux 2.0 -- I can't find a version + # number) put this garbage in Xss instead of Xext. Thank you master, + # may I have another. + + 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" + LDFLAGS="$LDFLAGS -L$x_libraries" + echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6 +echo "configure:3293: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lXss -lX11 -lXext -lm $LIBS" +cat > conftest.$ac_ext <&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_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss" +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" + fi + + if test $have_mit = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MIT_SAVER_EXTENSION 1 +EOF + + fi + + fi + + elif test $with_mit != no; then + echo "error: must be yes or no: --with-mit-ext=$with_mit" + exit 1 + fi +fi + + +# Check for the XIDLE server extension header, +# +have_xidle=no +with_xidle_req=unspecified +# Check whether --with-xidle-ext or --without-xidle-ext was given. +if test "${with_xidle_ext+set}" = set; then + withval="$with_xidle_ext" + with_xidle="$withval"; with_xidle_req="$withval" +else + with_xidle=yes +fi + +if test $with_xidle = yes; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3373: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3383: \"$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_xidle=yes + cat >> confdefs.h <<\EOF +#define HAVE_XIDLE_EXTENSION 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" +elif test $with_xidle != no; then + echo "error: must be yes or no: --with-xidle-ext=$with_xidle" + exit 1 +fi + + +# Check for Motif and Athena --with and --without arguments. +# +have_motif=no +have_athena=no +with_motif_req=unspecified +with_athena_req=unspecified + +# Check whether --with-motif or --without-motif was given. +if test "${with_motif+set}" = set; then + withval="$with_motif" + with_motif="$withval"; with_motif_req="$withval" +else + with_motif=no +fi + + +# Check whether --with-athena or --without-athena was given. +if test "${with_athena+set}" = set; then + withval="$with_athena" + with_athena="$withval"; with_athena_req="$withval" +else + with_athena=no +fi + + +if test $with_motif != yes -a $with_motif != no ; then + echo "error: must be yes or no: --with-motif=$with_motif" + exit 1 +fi + +if test $with_athena != yes -a $with_athena != no ; then + echo "error: must be yes or no: --with-athena=$with_athena" + exit 1 +fi + + +# Saying --without-motif is the same as saying --with-athena. +if test $with_motif_req = no ; then + with_athena_req=yes + with_athena=yes +fi + +# Saying --without-athena is the same as saying --with-motif. +if test $with_athena_req = no ; then + with_motif_req=yes + with_motif=yes +fi + +# Check for Motif and Athena headers. + +check_motif() { + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3474: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3484: \"$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_motif=yes + cat >> confdefs.h <<\EOF +#define HAVE_MOTIF 1 +EOF + + SAVER_LIBS="-lXm $SAVER_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" +} + +check_athena() { + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3522: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3532: \"$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_athena=yes + cat >> confdefs.h <<\EOF +#define HAVE_ATHENA 1 +EOF + + SAVER_LIBS="-lXaw $SAVER_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" +} + + +# If they asked for both motif and athena, check motif then athena. +# If they asked for only motif, check motif then athena. +# If they asked for only athena, check athena then motif. +# If they asked for neither, check motif then athena. + +if test $with_motif = yes; then + # asked for both, or for motif only + check_motif + if test $have_motif = yes; then + with_athena=no + with_athena_req=no + else + check_athena + fi + +elif test $with_athena = yes; then + # asked for athena only + check_athena + if test $have_athena = yes; then + with_motif=no + else + check_motif + fi + +else + # asked for neither + check_motif + if test $have_motif = yes; then + with_athena=no + else + check_athena + fi + +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:3602: 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 + ac_cv_have_XawViewportSetCoordinates=no + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_have_XawViewportSetCoordinates=yes +fi +rm -f conftest* + + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6 + if test $ac_cv_have_XawViewportSetCoordinates = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_XawViewportSetCoordinates 1 +EOF + + fi +fi + + +# If we have Motif, check whether it's really LessTif. +# +if test $have_motif = yes ; then + echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6 +echo "configure:3642: 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 + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < +int main() { +long vers = LesstifVersion; +; return 0; } +EOF +if { (eval echo configure:3660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_lesstif=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_lesstif=no +fi +rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_have_lesstif" 1>&6 + have_lesstif=$ac_cv_have_lesstif +fi + + +# check for XPM header. +# +have_xpm=no +with_xpm_req=unspecified +# Check whether --with-xpm or --without-xpm was given. +if test "${with_xpm+set}" = set; then + withval="$with_xpm" + with_xpm="$withval"; with_xpm_req="$withval" +else + with_xpm=yes +fi + +if test $with_xpm = yes; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3699: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3709: \"$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_xpm=yes + cat >> confdefs.h <<\EOF +#define HAVE_XPM 1 +EOF + + XPM_LIBS="-lXpm" +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" +elif test $with_xpm != no; then + echo "error: must be yes or no: --with-xpm=$with_xpm" + exit 1 +fi + + +# check for the GL header +# +have_gl=no +with_gl_req=unspecified +# Check whether --with-gl or --without-gl was given. +if test "${with_gl+set}" = set; then + withval="$with_gl" + with_gl="$withval"; with_gl_req="$withval" +else + with_gl=yes +fi + + +if test $with_gl = yes; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3764: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3774: \"$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_gl=yes +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + if test $have_gl = yes ; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + 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:3805: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3815: \"$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_gl=yes +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + fi + + # If we have the headers, try and figure out which vendor it's from. + # + if test $have_gl = yes ; then + + cat >> confdefs.h <<\EOF +#define HAVE_GL 1 +EOF + + have_mesa_gl=no + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "Mesa" >/dev/null 2>&1; then + rm -rf conftest* + have_mesa_gl=yes +fi +rm -f conftest* + + CPPFLAGS="$ac_save_CPPFLAGS" + if test $have_mesa_gl = no ; then + GL_LIBS="-lGL -lGLU" + else + cat >> confdefs.h <<\EOF +#define HAVE_MESA_GL 1 +EOF + + GL_LIBS="-lMesaGL -lMesaGLU" + fi + fi + +elif test $with_gl != no; then + echo "error: must be yes or no: --with-gl=$with_gl" + exit 1 +fi + + +# check for SGI XReadDisplay server extension header. +# +have_readdisplay=no +with_readdisplay_req=unspecified +# Check whether --with-readdisplay or --without-readdisplay was given. +if test "${with_readdisplay+set}" = set; then + withval="$with_readdisplay" + with_readdisplay="$withval"; with_readdisplay_req="$withval" +else + with_readdisplay=yes +fi + +if test $with_readdisplay = yes; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + 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:3905: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3915: \"$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 + cat >> confdefs.h <<\EOF +#define HAVE_READ_DISPLAY_EXTENSION 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" +elif test $with_readdisplay != no; then + echo "error: must be yes or no: --with-readdisplay=$with_readdisplay" + exit 1 +fi + + + +# Try to find a program to generate random text. +# +# Zippy is funnier than the idiocy generally spat out by `fortune', +# so try to find that, by invoking Emacs and asking it where its +# libexec directory is ("yow" lives in there.) +# +# If that doesn't work, see if fortune, zippy, or yow are on $PATH, +# and if so, use them. +# +# If that doesn't work, look in /usr/games, and if it's there, use +# the full pathname. +# +with_zippy="" +# Check whether --with-zippy or --without-zippy was given. +if test "${with_zippy+set}" = set; then + withval="$with_zippy" + with_zippy="$withval" +fi + + +if test "$with_zippy" = no || test "$with_zippy" = yes ; then + $with_zippy="" +fi + +if test -n "$with_zippy" ; then + 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 + +else + + 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:3984: 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 + if test -n "$emacs_exe"; then + ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test. +else + 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_prog_emacs_exe="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +emacs_exe="$ac_cv_prog_emacs_exe" +if test -n "$emacs_exe"; then + echo "$ac_t""$emacs_exe" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$emacs_exe" && break +done + + for ac_prog in xemacs +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:4017: 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 + if test -n "$xemacs_exe"; then + ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test. +else + 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_prog_xemacs_exe="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +xemacs_exe="$ac_cv_prog_xemacs_exe" +if test -n "$xemacs_exe"; then + echo "$ac_t""$xemacs_exe" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$xemacs_exe" && break +done + + + ac_cv_zippy_program="" + eargs='-batch -q -nw --eval' + + if test -n "$emacs_exe" ; then + echo $ac_n "checking for emacs yow""... $ac_c" 1>&6 +echo "configure:4051: checking for emacs yow" >&5 + # + # get emacs to tell us where the libexec directory is. + # + dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \ + 2>/dev/null | tail -1` + dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'` + # + # try running libexec/yow and see if it exits without error. + # + if test x"$dir" != x -a -x $dir/yow ; then + if $dir/yow >&- 2>&- ; then + ac_cv_zippy_program="$dir/yow" + echo "$ac_t""$ac_cv_zippy_program" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + fi + fi + + if test -z "$ac_cv_zippy_program" ; then + echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6 +echo "configure:4073: checking for xemacs yow" >&5 + if test -n "$xemacs_exe" ; then + # + # get xemacs to tell us where the libexec directory is. + # + dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \ + 2>/dev/null | tail -1` + dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'` + # + # try running libexec/yow and see if it exits without error. + # + if test x"$dir" != x -a -x $dir/yow ; then + if $dir/yow >&- 2>&- ; then + ac_cv_zippy_program="$dir/yow" + echo "$ac_t""$ac_cv_zippy_program" 1>&6 + else + # + # in some xemacs installations, the pathname of the yow.lines file + # isn't hardcoded into the yow executable, and must be passed on + # the command line. See if it's in libexec/../etc/. + + # M4 sucks!! + + dir_up=`echo "$dir" | sed 's@/[^/]*$@@'` + + + yow="yow -f $dir_up/etc/yow.lines" + if $dir/$yow >&- 2>&- ; then + ac_cv_zippy_program="$dir/$yow" + echo "$ac_t""$ac_cv_zippy_program" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + fi + fi + fi + fi + + # if that didn't work, try for some other programs... + if test -z "$ac_cv_zippy_program" ; then + fortune='' + for ac_prog in fortune zippy yow +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:4119: 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 + if test -n "$fortune"; then + ac_cv_prog_fortune="$fortune" # Let the user override the test. +else + 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_prog_fortune="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +fortune="$ac_cv_prog_fortune" +if test -n "$fortune"; then + echo "$ac_t""$fortune" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$fortune" && break +done + + # if that didn't work, try for those programs in /usr/games... + if test -z "$fortune" ; then + for ac_prog in fortune zippy yow +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:4154: 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 + case "$fortune" in + /*) + ac_cv_path_fortune="$fortune" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/games:/usr/local/games$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_fortune="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +fortune="$ac_cv_path_fortune" +if test -n "$fortune"; then + echo "$ac_t""$fortune" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$fortune" && break +done +test -n "$fortune" || fortune="fortune" + + fi + fi +fi + +if test -z "$ac_cv_zippy_program" ; then + ac_cv_zippy_program=fortune +fi + +cat >> confdefs.h <&6 +echo "configure:4233: checking for Kerberos" >&5 +if eval "test \"`echo '$''{'ac_cv_kerberos'+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" + cat > conftest.$ac_ext < +int main() { + +; return 0; } +EOF +if { (eval echo configure:4251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_kerberos=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_kerberos=no +fi +rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_kerberos" 1>&6 + if test $ac_cv_kerberos = yes ; then + have_kerberos=yes + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lnsl -lsocket" + fi + elif test $with_kerberos != no; then + echo "error: must be yes or no: --with-kerberos=$with_kerberos" + exit 1 + fi + + # Next, check for the nine billion variants of shadow passwords... + + passwd_cruft_done=no + # Check whether --with-shadow or --without-shadow was given. +if test "${with_shadow+set}" = set; then + withval="$with_shadow" + with_shadow="$withval"; with_shadow_req="$withval" +else + with_shadow=yes +fi + + if test $with_shadow = no; then + passwd_cruft_done=yes + elif test $with_shadow != yes; then + echo "error: must be yes or no: --with-shadow=$with_shadow" + exit 1 + fi + + + # Sun's "adjunct" passwords. + # + if test $passwd_cruft_done = no ; then + echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6 +echo "configure:4301: 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 + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < + #include + #include + #include + #include + #include +int main() { +struct passwd_adjunct *p = getpwanam("nobody"); + const char *pw = p->pwa_passwd; +; return 0; } +EOF +if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sun_adjunct=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_sun_adjunct=no +fi +rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_sun_adjunct" 1>&6 + if test $ac_cv_sun_adjunct = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + cat >> confdefs.h <<\EOF +#define HAVE_ADJUNCT_PASSWD 1 +EOF + + fi + fi + + # DEC and SCO so-called "enhanced" security. + # + if test $passwd_cruft_done = no ; then + echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6 +echo "configure:4354: 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 + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < + #include + #include + #include + #include + #include +int main() { +struct pr_passwd *p; + const char *pw; + set_auth_parameters(0, 0); + check_auth_parameters(); + p = getprpwnam("nobody"); + pw = p->ufld.fd_encrypt; +; return 0; } +EOF +if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_enhanced_passwd=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_enhanced_passwd=no +fi +rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6 + if test $ac_cv_enhanced_passwd = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + cat >> confdefs.h <<\EOF +#define HAVE_ENHANCED_PASSWD 1 +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:4408: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lprot -lx $LIBS" +cat > conftest.$ac_ext <&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 + PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx" +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:4447: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lsecurity $LIBS" +cat > conftest.$ac_ext <&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 + PASSWD_LIBS="$PASSWD_LIBS -lsecurity" +else + echo "$ac_t""no" 1>&6 +fi + +fi + + fi + fi + + # HP's entry in the "Not Invented Here" Sweepstakes. + # + if test $passwd_cruft_done = no ; then + echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6 +echo "configure:4495: 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 + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < + #include + #include + #include + #include + #include +int main() { +struct s_passwd *p = getspwnam("nobody"); + const char *pw = p->pw_passwd; +; return 0; } +EOF +if { (eval echo configure:4519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_hpux_passwd=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_hpux_passwd=no +fi +rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_hpux_passwd" 1>&6 + if test $ac_cv_hpux_passwd = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + cat >> confdefs.h <<\EOF +#define HAVE_HPUX_PASSWD 1 +EOF + + + # on HPUX, bigcrypt is in -lsec + echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 +echo "configure:4544: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lsec $LIBS" +cat > conftest.$ac_ext <&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 + PASSWD_LIBS="$PASSWD_LIBS -lsec" +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + # Traditional (ha!) shadow passwords. + # + if test $passwd_cruft_done = no ; then + echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6 +echo "configure:4590: 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 + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < + #include + #include + #include + #include +int main() { +struct spwd *p = getspnam("nobody"); + const char *pw = p->sp_pwdp; +; return 0; } +EOF +if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_shadow=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_shadow=no +fi +rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" +fi + +echo "$ac_t""$ac_cv_shadow" 1>&6 + if test $ac_cv_shadow = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + cat >> confdefs.h <<\EOF +#define HAVE_SHADOW_PASSWD 1 +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:4639: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lc $LIBS" +cat > conftest.$ac_ext <&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_getspnam=yes +else + echo "$ac_t""no" 1>&6 +fi + + if test $have_getspnam = no ; then + echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 +echo "configure:4680: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <&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_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen" +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + 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:4726: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lc $LIBS" +cat > conftest.$ac_ext <&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_crypt=yes +else + echo "$ac_t""no" 1>&6 +fi + + if test $have_crypt = no ; then + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:4767: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypt $LIBS" +cat > conftest.$ac_ext <&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_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + + # Most of the above shadow mechanisms will have set need_setuid to yes, + # if they were found. But, on some systems, we need setuid even when + # using plain old vanilla passwords. + # + if test $need_setuid = no ; then + case "$host" in + *-hpux* | *-aix* | *-netbsd* ) + need_setuid=yes + ;; + esac + fi + +elif test $enable_locking = no; then + cat >> confdefs.h <<\EOF +#define NO_LOCKING 1 +EOF + +else + echo "error: must be yes or no: --enable-locking=$enable_locking" + exit 1 +fi + + + +if test \! -z "$includedir" ; then + INCLUDES="-I$includedir" +fi + +if test \! -z "$libdir" ; then + LDFLAGS="$LDFLAGS -L$libdir" +fi + + +##### should have options to override the DEPEND crap, I guess... +DEPEND=makedepend +DEPEND_FLAGS= +DEPEND_DEFINES= + + + +# Done testing things -- now substitute in some stuff for the Makefiles. +# +if test $have_motif = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MOTIF 1 +EOF + + DIALOG_SRCS='$(MOTIF_SRCS)' + DIALOG_OBJS='$(MOTIF_OBJS)' +elif test $have_athena = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ATHENA 1 +EOF + + DIALOG_SRCS='$(ATHENA_SRCS)' + DIALOG_OBJS='$(ATHENA_OBJS)' +else + DIALOG_SRCS='' + DIALOG_OBJS='' +fi + +if test $have_kerberos = yes; then + PASSWD_SRCS='$(KERBEROS_SRCS)' + PASSWD_OBJS='$(KERBEROS_OBJS)' +else + PASSWD_SRCS='$(PWENT_SRCS)' + PASSWD_OBJS='$(PWENT_OBJS)' +fi + +if test $enable_locking = yes; then + LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)' + LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)' +else + LOCK_SRCS='' + LOCK_OBJS='' +fi + +if test $need_setuid = yes; then + NEED_SETUID=yes + INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)' +else + NEED_SETUID=no + INSTALL_SETUID='$(INSTALL_PROGRAM)' +fi + +tab=' ' +if test $have_gl = yes; then + GL_EXES='$(GL_EXES)' + GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}' \' + GL_KLUDGE_2=${tab} +else + GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}'\n' + GL_KLUDGE_2='!'${tab} +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# Print some warnings before emitting the Makefiles. +# +warning=no +warnsep=' #################################################################' +warn() { + if test $warning = no ; then + echo '' ; echo "$warnsep" ; echo '' + warning=yes + fi + echo " Warning:" $* +} + +warn2() { + echo " " $* +} + +if test $with_sgi_req = yes -a $have_sgi = no ; then + warn 'The SGI saver extension was requested, but was not found.' +fi + +if test $with_mit_req = yes -a $have_mit = no ; then + warn 'The MIT saver extension was requested, but was not found.' +fi + +if test $with_xidle_req = yes -a $have_xidle = no ; then + warn 'The XIdle 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;" + warn2 "one or the other is required." + +elif test $with_motif_req = yes -a $have_motif = no ; then + warn "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;" + 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." +fi + +if test $with_xpm_req = yes -a $have_xpm = no ; then + warn 'Use of XPM was requested, but it was not found.' +fi + +if test $with_gl_req = yes -a $have_gl = no ; then + warn 'Use of GL was requested, but it was not found.' +fi + +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_kerberos_req = yes -a $have_kerberos = no ; then + warn 'Use of Kerberos was requested, but it was not found.' +fi + +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 + echo '' ; echo "$warnsep" ; echo '' +fi + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.12" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile + utils/Makefile + driver/Makefile + hacks/Makefile + hacks/glx/Makefile + driver/XScreenSaver.ad config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@SET_MAKE@%$SET_MAKE%g +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%@emacs_exe@%$emacs_exe%g +s%@xemacs_exe@%$xemacs_exe%g +s%@fortune@%$fortune%g +s%@INCLUDES@%$INCLUDES%g +s%@SAVER_LIBS@%$SAVER_LIBS%g +s%@HACK_LIBS@%$HACK_LIBS%g +s%@XPM_LIBS@%$XPM_LIBS%g +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%@DIALOG_SRCS@%$DIALOG_SRCS%g +s%@DIALOG_OBJS@%$DIALOG_OBJS%g +s%@PASSWD_SRCS@%$PASSWD_SRCS%g +s%@PASSWD_OBJS@%$PASSWD_OBJS%g +s%@XMU_SRCS@%$XMU_SRCS%g +s%@XMU_OBJS@%$XMU_OBJS%g +s%@LOCK_SRCS@%$LOCK_SRCS%g +s%@LOCK_OBJS@%$LOCK_OBJS%g +s%@GL_EXES@%$GL_EXES%g +s%@GL_KLUDGE_1@%$GL_KLUDGE_1%g +s%@GL_KLUDGE_2@%$GL_KLUDGE_2%g +s%@HACKDIR@%$HACKDIR%g +s%@APPDEFAULTS@%$APPDEFAULTS%g +s%@DEPEND@%$DEPEND%g +s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g +s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/configure.in b/configure.in new file mode 100644 index 00000000..51cefe54 --- /dev/null +++ b/configure.in @@ -0,0 +1,1179 @@ +# configure.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# + +AC_INIT(driver/subprocs.c) +AC_CONFIG_HEADER(config.h) +AC_CANONICAL_HOST + +AC_PROG_CC + +if test -z "$GCC"; then + AC_MSG_CHECKING(how to request ANSI compilation) + case "$host" in + *-hpux*) + AC_MSG_RESULT(HPUX: adding -Ae) + CC="$CC -Ae" + ;; + *-aix*) + AC_MSG_RESULT(AIX: adding -qlanglvl=ansi -qhalt=e) + CC="$CC -qlanglvl=ansi -qhalt=e" + ;; + *) + AC_MSG_RESULT(no idea) + ;; + esac +fi + + +AC_MSG_CHECKING([whether the compiler works on ANSI C]) +AC_TRY_RUN([ main(int ac, char **av) { return 0; } ], + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + AC_MSG_ERROR(Couldn't build even a trivial ANSI C program: check CC.), + AC_MSG_ERROR(Couldn't build even a trivial ANSI C program: check CC.)) + +case "$host" in + *-irix*) + if test -n "$GCC"; then + AC_MSG_RESULT(Turning on gcc compiler warnings.) + CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format" + else + # not gcc + AC_MSG_RESULT(Turning on SGI compiler warnings.) + CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3" + fi + ;; +esac + + +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +AC_C_CONST +AC_C_INLINE + +AC_HEADER_STDC +AC_HEADER_TIME +AC_HEADER_SYS_WAIT +AC_HEADER_DIRENT + +AC_TYPE_MODE_T +AC_TYPE_PID_T +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T + + +AC_MSG_CHECKING(how to call gettimeofday) +AC_CACHE_VAL(ac_cv_gettimeofday_args, + [AC_TRY_COMPILE([#include + #include ], + [struct timeval tv; gettimeofday(&tv);], + [ac_gettimeofday_args=1], + [AC_TRY_COMPILE([#include + #include ], + [struct timeval tv; struct timezone tzp; + gettimeofday(&tv, &tzp);], + [ac_gettimeofday_args=2], + [ac_gettimeofday_args=0])]) + ac_cv_gettimeofday_args=$ac_gettimeofday_args]) +ac_gettimeofday_args=$ac_cv_gettimeofday_args +if test $ac_gettimeofday_args = 1 ; then + AC_DEFINE(HAVE_GETTIMEOFDAY) + AC_MSG_RESULT(one argument) +elif test $ac_gettimeofday_args = 2 ; then + AC_DEFINE(HAVE_GETTIMEOFDAY) + AC_DEFINE(GETTIMEOFDAY_TWO_ARGS) + AC_MSG_RESULT(two arguments) +else + AC_MSG_RESULT(unknown) +fi + + +AC_CHECK_FUNCS(select fcntl uname nice setpriority getcwd getwd putenv) +AC_CHECK_HEADERS(unistd.h) + +dnl /usr/local/src/ssh-1.2.17/putenv.c -- AC_REPLACE_FUNCS(putenv) + + +AC_ARG_ENABLE(subdir,[ +Installation options: + + --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir', + instead of putting them in bindir itself. You can + specify the name of the subdirectory. For example, + --exec-prefix=/usr/local/bin --enable-subdir=demos + would put xscreensaver in /usr/local/bin/, and would + put the demos in /usr/local/bin/demos/. Note that if + you do this, you must make sure that the directory + is on your \$PATH before xscreensaver is started: the + directory name is not hardcoded into the program. + This merely sets the default installation location. + + --disable-subdir Just put the demos in \`bindir' (this is the default.) +], + [enable_subdir="$enableval"],[enable_subdir=no]) +if test x"$enable_subdir" = xno; then + HACKDIR='$(bindir)' +elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then + echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir" + exit 1 +else + HACKDIR='$(bindir)/'$enable_subdir +fi + + +AC_PATH_XTRA + +# Try and find the app-defaults directory. +# It sucks that autoconf doesn't do this already... +# +AC_DEFUN(AC_PATH_X_APP_DEFAULTS_XMKMF, + [ + rm -fr conftestdir + if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_x_app_defaults="${XAPPLOADDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which'd confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + fi + cd .. + rm -fr conftestdir + fi]) + +AC_DEFUN(AC_PATH_X_APP_DEFAULTS_DIRECT, +[ # Look for the directory under a standard set of common directories. + # Check X11 before X11Rn because it's often a symlink to the current release. + for ac_dir in \ + /usr/X11/lib/app-defaults \ + /usr/X11R6/lib/app-defaults \ + /usr/X11R6/lib/X11/app-defaults \ + /usr/X11R5/lib/app-defaults \ + /usr/X11R5/lib/X11/app-defaults \ + /usr/X11R4/lib/app-defaults \ + /usr/X11R4/lib/X11/app-defaults \ + \ + /usr/lib/X11/app-defaults \ + /usr/lib/X11R6/app-defaults \ + /usr/lib/X11R5/app-defaults \ + /usr/lib/X11R4/app-defaults \ + \ + /usr/local/X11/lib/app-defaults \ + /usr/local/X11R6/lib/app-defaults \ + /usr/local/X11R5/lib/app-defaults \ + /usr/local/X11R4/lib/app-defaults \ + \ + /usr/local/lib/X11/app-defaults \ + /usr/local/lib/X11R6/app-defaults \ + /usr/local/lib/X11R6/X11/app-defaults \ + /usr/local/lib/X11R5/app-defaults \ + /usr/local/lib/X11R5/X11/app-defaults \ + /usr/local/lib/X11R4/app-defaults \ + /usr/local/lib/X11R4/X11/app-defaults \ + \ + /usr/X386/lib/X11/app-defaults \ + /usr/x386/lib/X11/app-defaults \ + /usr/XFree86/lib/X11/app-defaults \ + \ + /usr/lib/X11/app-defaults \ + /usr/local/lib/X11/app-defaults \ + /usr/unsupported/lib/X11/app-defaults \ + /usr/athena/lib/X11/app-defaults \ + /usr/local/x11r5/lib/X11/app-defaults \ + /usr/lpp/Xamples/lib/X11/app-defaults \ + /lib/usr/lib/X11/app-defaults \ + \ + /usr/openwin/lib/app-defaults \ + /usr/openwin/lib/X11/app-defaults \ + /usr/openwin/share/lib/app-defaults \ + /usr/openwin/share/lib/X11/app-defaults \ + \ + /X11R6/lib/app-defaults \ + /X11R5/lib/app-defaults \ + /X11R4/lib/app-defaults \ + ; \ + do + if test -d "$ac_dir"; then + ac_x_app_defaults=$ac_dir + break + fi + done +]) + + +AC_DEFUN(AC_PATH_X_APP_DEFAULTS, + [AC_REQUIRE_CPP() + AC_CACHE_CHECK([for X app-defaults directory], ac_cv_x_app_defaults, + [AC_PATH_X_APP_DEFAULTS_XMKMF + AC_PATH_X_APP_DEFAULTS_DIRECT + if test x"$ac_x_app_defaults" = x; then + ac_cv_x_app_defaults="/usr/lib/X11/app-defaults" + else + # Record where we found app-defaults for the cache. + ac_cv_x_app_defaults="$ac_x_app_defaults" + fi]) + eval ac_x_app_defaults="$ac_cv_x_app_defaults"]) + +AC_PATH_X_APP_DEFAULTS + +APPDEFAULTS=$ac_x_app_defaults + + +# Like AC_CHECK_HEADER, but it uses the already-computed -I directories. +# +AC_DEFUN(AC_CHECK_X_HEADER, [ + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + AC_CHECK_HEADER([$1], [$2]) + CPPFLAGS="$ac_save_CPPFLAGS"]) + +# Like AC_EGREP_HEADER, but it uses the already-computed -I directories. +# +AC_DEFUN(AC_EGREP_X_HEADER, [ + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + AC_EGREP_HEADER([$1], [$2], [$3], [$4]) + CPPFLAGS="$ac_save_CPPFLAGS"]) + +# Like AC_TRY_COMPILE, but it uses the already-computed -I directories. +# +AC_DEFUN(AC_TRY_X_COMPILE, [ + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + AC_TRY_COMPILE([$1], [$2], [$3], [$4]) + CPPFLAGS="$ac_save_CPPFLAGS"]) + + +# Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories. +# Use this sparingly; it probably doesn't work very well on X programs. +# +AC_DEFUN(AC_CHECK_X_LIB, [ + 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" + LDFLAGS="$LDFLAGS -L$x_libraries" + AC_CHECK_LIB([$1], [$2], [$3], [$4], [$5]) + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS"]) + + + + +# check for the HP XHPDisableReset server extension headers. +# +AC_EGREP_X_HEADER(XHPDisableReset, X11/XHPlib.h, + [AC_DEFINE(HAVE_XHPDISABLERESET) + SAVER_LIBS="-lXhp11 $SAVER_LIBS"]) + + +# Check for the availability of the XPointer typedef, and define it otherwise. +# +AC_CACHE_CHECK([for XPointer], ac_cv_xpointer, + [AC_TRY_X_COMPILE([#include ], + [XPointer foo = (XPointer) 0;], + [ac_cv_xpointer=yes], + [ac_cv_xpointer=no])]) +if test $ac_cv_xpointer != yes; then + AC_DEFINE(XPointer,[char*]) +fi + + +case "$host" in + *-hpux*) + # Thanks for not making xmkmf find this by default, you losers. + if test -d /usr/lib/Motif1.2 ; then + X_CFLAGS="-I/usr/include/Motif1.2 $X_CFLAGS" + X_LIBS="-L/usr/lib/Motif1.2 $X_LIBS" + elif test -d /usr/lib/Motif1.1 ; then + X_CFLAGS="-I/usr/include/Motif1.1 $X_CFLAGS" + X_LIBS="-L/usr/lib/Motif1.1 $X_LIBS" + fi + + # This too. You losers. + if test -d /usr/contrib/X11R6/include ; then + X_CFLAGS="-I/usr/contrib/X11R6/include $X_CFLAGS" + X_LIBS="-L/usr/contrib/X11R6/lib $X_LIBS" + elif test -d /usr/contrib/X11R5/include ; then + X_CFLAGS="-I/usr/contrib/X11R5/include $X_CFLAGS" + X_LIBS="-L/usr/contrib/X11R5/lib $X_LIBS" + fi + + ;; + *-solaris*) + # Same to you, pinheads. (Is this really the standard location now? + # What happened to the joke that this kind of thing went in /opt?) + if test -f /usr/dt/include/Xm/Xm.h ; then + X_CFLAGS="$X_CFLAGS -I/usr/dt/include" + X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib" + + # Some versions of Slowlaris Motif require -lgen. But not all. Why? + AC_CHECK_LIB(gen, regcmp, [X_LIBS="$X_LIBS -lgen"]) + fi + ;; +esac + + + +# Check for Xmu (some fucked up vendors don't ship it...) +# +have_xmu=no +AC_CHECK_X_HEADER(X11/Xmu/Error.h, [have_xmu=yes]) +if test $have_xmu = no ; then + XMU_SRCS='$(UTILS_SRC)/xmu.c' + XMU_OBJS='$(UTILS_BIN)/xmu.o' +else + XMU_SRCS='' + XMU_OBJS='' + SAVER_LIBS="-lXmu $SAVER_LIBS" + HACK_LIBS="-lXmu $HACK_LIBS" + AC_DEFINE(HAVE_XMU) +fi + + +# See comp.windows.x FAQ question 124 about _get_wmShellWidgetClass on 4.1.x. +# The right fix is to get OpenWindows 3.0 patches 100512-02 and 100573-03. +# +if test $have_xmu = yes ; then + case "$host" in + *-sunos4*) + AC_CACHE_CHECK([for the SunOS 4.1.x _get_wmShellWidgetClass bug], + ac_cv_sunos_xmu_bug, + [ac_save_LDFLAGS="$LDFLAGS" + if test \! -z "$x_libraries" ; then + LDFLAGS="$LDFLAGS -L$x_libraries" + fi + # Note: this trick never works! (Generally.) + # We're only getting away with using AC_TRY_LINK + # with X libraries because we know it's SunOS. + LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm" + AC_TRY_LINK(,, + [ac_cv_sunos_xmu_bug=no], + [ac_cv_sunos_xmu_bug=yes]) + LDFLAGS="$ac_save_LDFLAGS"]) + if test $ac_cv_sunos_xmu_bug = yes ; then + AC_CACHE_CHECK([whether the compiler understands -static], + ac_cv_ld_static, + [ac_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -static" + AC_TRY_LINK(,,[ac_cv_ld_static=yes],[ac_cv_ld_static=no]) + LDFLAGS="$ac_save_LDFLAGS"]) + if test $ac_cv_ld_static = yes ; then + LDFLAGS="$LDFLAGS -static" + else + LDFLAGS="$LDFLAGS -Bstatic" + fi + fi + ;; + esac +fi + + +# Check for the SGI SCREEN_SAVER server extension header. +# +have_sgi=no +with_sgi_req=unspecified +AC_ARG_WITH(sgi-ext,[ +Server options: + + --with-sgi-ext Include support for the SGI SCREEN_SAVER + server extension, if possible (this is the default). + --without-sgi-ext Do not compile in support for this extension.], + [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes]) +if test $with_sgi = yes; then + AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h, + [have_sgi=yes + AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)]) + +elif test $with_sgi != no; then + echo "error: must be yes or no: --with-sgi-ext=$with_sgi" + exit 1 +fi + +# Check for the MIT-SCREEN-SAVER server extension header, +# unless the SGI extension has already been found. +# +have_mit=no +with_mit_req=unspecified +AC_ARG_WITH(mit-ext, +[ --with-mit-ext Include support for the MIT-SCREEN-SAVER + server extension, if possible (this is the default). + --without-mit-ext Do not compile in support for this extension.], + [with_mit="$withval"; with_mit_req="$withval"],[with_mit=yes]) +if test $have_sgi != yes; then + if test $with_mit = yes; then + AC_CHECK_X_HEADER(X11/extensions/scrnsaver.h, [have_mit=yes]) + + # Now check to see if it's really in the library; XF86Free-3.3 ships + # scrnsaver.h, but doesn't include the code in libXext.a, the idiots! + # + if test $have_mit = yes; then + AC_CHECK_X_LIB(Xext, XScreenSaverRegister, [], [have_mit=no], -lm) + + if test $have_mit = no; then + # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead + # of in Xext. Thank you master, may I have another. + AC_CHECK_X_LIB(XExExt, XScreenSaverRegister, + [have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"], + [], -lX11 -lXext -lm) + fi + + if test $have_mit = no; then + # Double fuck! Looks like some versions of XFree86 (whichever version + # it is that comes with RedHat Linux 2.0 -- I can't find a version + # number) put this garbage in Xss instead of Xext. Thank you master, + # may I have another. + AC_CHECK_X_LIB(Xss, XScreenSaverRegister, + [have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"], + [], -lX11 -lXext -lm) + fi + + if test $have_mit = yes; then + AC_DEFINE(HAVE_MIT_SAVER_EXTENSION) + fi + + fi + + elif test $with_mit != no; then + echo "error: must be yes or no: --with-mit-ext=$with_mit" + exit 1 + fi +fi + + +# Check for the XIDLE server extension header, +# +have_xidle=no +with_xidle_req=unspecified +AC_ARG_WITH(xidle-ext, +[ --with-xidle-ext Include support for the XIDLE server extension, + if possible (this is the default). + --without-xidle-ext Do not compile in support for this extension.], + [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes]) +if test $with_xidle = yes; then + AC_CHECK_X_HEADER(X11/extensions/xidle.h, + [have_xidle=yes + AC_DEFINE(HAVE_XIDLE_EXTENSION)]) +elif test $with_xidle != no; then + echo "error: must be yes or no: --with-xidle-ext=$with_xidle" + exit 1 +fi + + +# Check for Motif and Athena --with and --without arguments. +# +have_motif=no +have_athena=no +with_motif_req=unspecified +with_athena_req=unspecified + +AC_ARG_WITH(motif,[ +Toolkit options: + + --with-motif Use the Motif toolkit for the user interface, + if possible (this is the default). + --without-motif Do not use Motif.], + [with_motif="$withval"; with_motif_req="$withval"],[with_motif=no]) + +AC_ARG_WITH(athena, +[ --with-athena Use the Athena toolkit for the user interface, if + possible (this is the default if Motif isn't used.) + --without-athena Do not use Athena.], + [with_athena="$withval"; with_athena_req="$withval"],[with_athena=no]) + +if test $with_motif != yes -a $with_motif != no ; then + echo "error: must be yes or no: --with-motif=$with_motif" + exit 1 +fi + +if test $with_athena != yes -a $with_athena != no ; then + echo "error: must be yes or no: --with-athena=$with_athena" + exit 1 +fi + + +# Saying --without-motif is the same as saying --with-athena. +if test $with_motif_req = no ; then + with_athena_req=yes + with_athena=yes +fi + +# Saying --without-athena is the same as saying --with-motif. +if test $with_athena_req = no ; then + with_motif_req=yes + with_motif=yes +fi + +# Check for Motif and Athena headers. + +check_motif() { + AC_CHECK_X_HEADER(Xm/Xm.h, + [have_motif=yes + AC_DEFINE(HAVE_MOTIF) + SAVER_LIBS="-lXm $SAVER_LIBS"]) +} + +check_athena() { + AC_CHECK_X_HEADER(X11/Xaw/Dialog.h, + [have_athena=yes + AC_DEFINE(HAVE_ATHENA) + SAVER_LIBS="-lXaw $SAVER_LIBS"]) +} + + +# If they asked for both motif and athena, check motif then athena. +# If they asked for only motif, check motif then athena. +# If they asked for only athena, check athena then motif. +# If they asked for neither, check motif then athena. + +if test $with_motif = yes; then + # asked for both, or for motif only + check_motif + if test $have_motif = yes; then + with_athena=no + with_athena_req=no + else + check_athena + fi + +elif test $with_athena = yes; then + # asked for athena only + check_athena + if test $have_athena = yes; then + with_motif=no + else + check_motif + fi + +else + # asked for neither + check_motif + if test $have_motif = yes; then + with_athena=no + else + check_athena + fi + +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 + AC_CACHE_CHECK([for XawViewportSetCoordinates in Viewport.h], + ac_cv_have_XawViewportSetCoordinates, + [ac_cv_have_XawViewportSetCoordinates=no + AC_EGREP_X_HEADER(XawViewportSetCoordinates, + X11/Xaw/Viewport.h, + ac_cv_have_XawViewportSetCoordinates=yes)]) + if test $ac_cv_have_XawViewportSetCoordinates = yes ; then + AC_DEFINE(HAVE_XawViewportSetCoordinates) + fi +fi + + +# If we have Motif, check whether it's really LessTif. +# +if test $have_motif = yes ; then + AC_CACHE_CHECK([whether Motif is really LessTif], + ac_cv_have_lesstif, + [AC_TRY_X_COMPILE([#include ], + [long vers = LesstifVersion;], + [ac_cv_have_lesstif=yes], + [ac_cv_have_lesstif=no])]) + have_lesstif=$ac_cv_have_lesstif +fi + + +# check for XPM header. +# +have_xpm=no +with_xpm_req=unspecified +AC_ARG_WITH(xpm,[ +Demo options: + + --with-xpm Include support for XPM files in some demos, + if possible (this is the default). + --without-xpm Do not compile in support for XPM files.], + [with_xpm="$withval"; with_xpm_req="$withval"],[with_xpm=yes]) +if test $with_xpm = yes; then + AC_CHECK_X_HEADER(X11/xpm.h, + [have_xpm=yes + AC_DEFINE(HAVE_XPM) + XPM_LIBS="-lXpm"]) +elif test $with_xpm != no; then + echo "error: must be yes or no: --with-xpm=$with_xpm" + exit 1 +fi + + +# check for the GL header +# +have_gl=no +with_gl_req=unspecified +AC_ARG_WITH(gl, +[ --with-gl Build those demos which depend on OpenGL, + if possible (this is the default). + --without-gl Do not build the OpenGL demos.], + [with_gl="$withval"; with_gl_req="$withval"],[with_gl=yes]) + +if test $with_gl = yes; then + AC_CHECK_X_HEADER(GL/gl.h, have_gl=yes, have_gl=no) + if test $have_gl = yes ; then + AC_CHECK_X_HEADER(GL/glx.h, have_gl=yes, have_gl=no) + fi + + # If we have the headers, try and figure out which vendor it's from. + # + if test $have_gl = yes ; then + + AC_DEFINE(HAVE_GL) + have_mesa_gl=no + AC_EGREP_X_HEADER(Mesa, GL/glx.h, [have_mesa_gl=yes]) + if test $have_mesa_gl = no ; then + GL_LIBS="-lGL -lGLU" + else + AC_DEFINE(HAVE_MESA_GL) + GL_LIBS="-lMesaGL -lMesaGLU" + fi + fi + +elif test $with_gl != no; then + echo "error: must be yes or no: --with-gl=$with_gl" + exit 1 +fi + + +# check for SGI XReadDisplay server extension header. +# +have_readdisplay=no +with_readdisplay_req=unspecified +AC_ARG_WITH(readdisplay, +[ --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.], + [with_readdisplay="$withval"; with_readdisplay_req="$withval"], + [with_readdisplay=yes]) +if test $with_readdisplay = yes; then + AC_CHECK_X_HEADER(X11/extensions/readdisplay.h, + AC_DEFINE(HAVE_READ_DISPLAY_EXTENSION)) +elif test $with_readdisplay != no; then + echo "error: must be yes or no: --with-readdisplay=$with_readdisplay" + exit 1 +fi + + + +# Try to find a program to generate random text. +# +# Zippy is funnier than the idiocy generally spat out by `fortune', +# so try to find that, by invoking Emacs and asking it where its +# libexec directory is ("yow" lives in there.) +# +# If that doesn't work, see if fortune, zippy, or yow are on $PATH, +# and if so, use them. +# +# If that doesn't work, look in /usr/games, and if it's there, use +# the full pathname. +# +with_zippy="" +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 + default (though it can be overridden with X + 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"]) + +if test "$with_zippy" = no || test "$with_zippy" = yes ; then + $with_zippy="" +fi + +if test -n "$with_zippy" ; then + 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]) + +else + + AC_CHECK_PROGS(emacs_exe, emacs) + AC_CHECK_PROGS(xemacs_exe, xemacs) + + ac_cv_zippy_program="" + eargs='-batch -q -nw --eval' + + if test -n "$emacs_exe" ; then + AC_MSG_CHECKING([for emacs yow]) + # + # get emacs to tell us where the libexec directory is. + # + dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \ + 2>/dev/null | tail -1` + dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'` + # + # try running libexec/yow and see if it exits without error. + # + if test x"$dir" != x -a -x $dir/yow ; then + if $dir/yow >&- 2>&- ; then + ac_cv_zippy_program="$dir/yow" + AC_MSG_RESULT($ac_cv_zippy_program) + else + AC_MSG_RESULT(no) + fi + fi + fi + + if test -z "$ac_cv_zippy_program" ; then + AC_MSG_CHECKING([for xemacs yow]) + if test -n "$xemacs_exe" ; then + # + # get xemacs to tell us where the libexec directory is. + # + dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \ + 2>/dev/null | tail -1` + dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'` + # + # try running libexec/yow and see if it exits without error. + # + if test x"$dir" != x -a -x $dir/yow ; then + if $dir/yow >&- 2>&- ; then + ac_cv_zippy_program="$dir/yow" + AC_MSG_RESULT($ac_cv_zippy_program) + else + # + # in some xemacs installations, the pathname of the yow.lines file + # isn't hardcoded into the yow executable, and must be passed on + # the command line. See if it's in libexec/../etc/. + + # M4 sucks!! + changequote(X,Y) + dir_up=`echo "$dir" | sed 's@/[^/]*$@@'` + changequote([,]) + + yow="yow -f $dir_up/etc/yow.lines" + if $dir/$yow >&- 2>&- ; then + ac_cv_zippy_program="$dir/$yow" + AC_MSG_RESULT($ac_cv_zippy_program) + else + AC_MSG_RESULT(no) + fi + fi + fi + fi + fi + + # if that didn't work, try for some other programs... + if test -z "$ac_cv_zippy_program" ; then + fortune='' + AC_CHECK_PROGS(fortune, [fortune zippy yow]) + # if that didn't work, try for those programs in /usr/games... + if test -z "$fortune" ; then + AC_PATH_PROGS(fortune, [fortune zippy yow], fortune, + /usr/games:/usr/local/games) + fi + fi +fi + +if test -z "$ac_cv_zippy_program" ; then + ac_cv_zippy_program=fortune +fi + +AC_DEFINE_UNQUOTED(ZIPPY_PROGRAM, "$ac_cv_zippy_program") + + + + +# Allow locking to be disabled at compile-time. +# +have_locking=yes +have_kerberos=no +with_kerberos_req=unspecified +have_shadow=no +with_shadow_req=unspecified +need_setuid=no + +AC_ARG_ENABLE(locking,[ +Locking options: + + --enable-locking Compile in support for locking the display + (this is the default.) + --disable-locking Do not allow locking at all.], + [enable_locking="$enableval"],[enable_locking=yes]) +if test $enable_locking = yes; then + + # Check for Kerberos. + # + AC_ARG_WITH(kerberos, [ + --with-kerberos Include support for Kerberos authentication, + if possible (this is the default.) + --without-kerberos Do not compile in support for Kerberos.], + [with_kerberos="$withval"; with_kerberos_req="$withval"],[with_kerberos=yes]) + if test $with_kerberos = yes; then + AC_CACHE_CHECK([for Kerberos], ac_cv_kerberos, + [AC_TRY_X_COMPILE([#include ],, + [ac_cv_kerberos=yes], + [ac_cv_kerberos=no])]) + if test $ac_cv_kerberos = yes ; then + have_kerberos=yes + AC_DEFINE(HAVE_KERBEROS) + PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lnsl -lsocket" + fi + elif test $with_kerberos != no; then + echo "error: must be yes or no: --with-kerberos=$with_kerberos" + exit 1 + fi + + # Next, check for the nine billion variants of shadow passwords... + + passwd_cruft_done=no + AC_ARG_WITH(shadow, +[ --with-shadow Include support for shadow password authentication, + if possible (this is the default, if no Kerberos.) + --without-shadow Do not compile in support for shadow passwords. +], + [with_shadow="$withval"; with_shadow_req="$withval"],[with_shadow=yes]) + if test $with_shadow = no; then + passwd_cruft_done=yes + elif test $with_shadow != yes; then + echo "error: must be yes or no: --with-shadow=$with_shadow" + exit 1 + fi + + + # Sun's "adjunct" passwords. + # + if test $passwd_cruft_done = no ; then + AC_CACHE_CHECK([for Sun-style shadow passwords], ac_cv_sun_adjunct, + [AC_TRY_X_COMPILE([#include + #include + #include + #include + #include + #include ], + [struct passwd_adjunct *p = getpwanam("nobody"); + const char *pw = p->pwa_passwd;], + [ac_cv_sun_adjunct=yes], + [ac_cv_sun_adjunct=no])]) + if test $ac_cv_sun_adjunct = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + AC_DEFINE(HAVE_ADJUNCT_PASSWD) + fi + fi + + # DEC and SCO so-called "enhanced" security. + # + if test $passwd_cruft_done = no ; then + AC_CACHE_CHECK([for DEC-style shadow passwords], ac_cv_enhanced_passwd, + [AC_TRY_X_COMPILE([#include + #include + #include + #include + #include + #include ], + [struct pr_passwd *p; + const char *pw; + set_auth_parameters(0, 0); + check_auth_parameters(); + p = getprpwnam("nobody"); + pw = p->ufld.fd_encrypt;], + [ac_cv_enhanced_passwd=yes], + [ac_cv_enhanced_passwd=no])]) + if test $ac_cv_enhanced_passwd = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + AC_DEFINE(HAVE_ENHANCED_PASSWD) + + # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx) + # (I'm told it needs -lcurses too, but I don't understand why.) + AC_CHECK_LIB(prot, getprpwnam, + [PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"], + [# On DEC, getprpwnam() is in -lsecurity + AC_CHECK_LIB(security, getprpwnam, + [PASSWD_LIBS="$PASSWD_LIBS -lsecurity"])], + [-lx]) + fi + fi + + # HP's entry in the "Not Invented Here" Sweepstakes. + # + if test $passwd_cruft_done = no ; then + AC_CACHE_CHECK([for HP-style shadow passwords], ac_cv_hpux_passwd, + [AC_TRY_X_COMPILE([#include + #include + #include + #include + #include + #include ], + [struct s_passwd *p = getspwnam("nobody"); + const char *pw = p->pw_passwd;], + [ac_cv_hpux_passwd=yes], + [ac_cv_hpux_passwd=no])]) + if test $ac_cv_hpux_passwd = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + AC_DEFINE(HAVE_HPUX_PASSWD) + + # on HPUX, bigcrypt is in -lsec + AC_CHECK_LIB(sec, bigcrypt, [PASSWD_LIBS="$PASSWD_LIBS -lsec"]) + fi + fi + + # Traditional (ha!) shadow passwords. + # + if test $passwd_cruft_done = no ; then + AC_CACHE_CHECK([for generic shadow passwords], ac_cv_shadow, + [AC_TRY_X_COMPILE([#include + #include + #include + #include + #include ], + [struct spwd *p = getspnam("nobody"); + const char *pw = p->sp_pwdp;], + [ac_cv_shadow=yes], + [ac_cv_shadow=no])]) + if test $ac_cv_shadow = yes; then + have_shadow=yes + need_setuid=yes + passwd_cruft_done=yes + AC_DEFINE(HAVE_SHADOW_PASSWD) + + # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc. + have_getspnam=no + AC_CHECK_LIB(c, getspnam, [have_getspnam=yes]) + if test $have_getspnam = no ; then + AC_CHECK_LIB(gen, getspnam, + [have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"]) + fi + fi + fi + + # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc. + have_crypt=no + AC_CHECK_LIB(c, crypt, [have_crypt=yes]) + if test $have_crypt = no ; then + AC_CHECK_LIB(crypt, crypt, + [have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"]) + fi + + + # Most of the above shadow mechanisms will have set need_setuid to yes, + # if they were found. But, on some systems, we need setuid even when + # using plain old vanilla passwords. + # + if test $need_setuid = no ; then + case "$host" in + *-hpux* | *-aix* | *-netbsd* ) + need_setuid=yes + ;; + esac + fi + +elif test $enable_locking = no; then + AC_DEFINE(NO_LOCKING) +else + echo "error: must be yes or no: --enable-locking=$enable_locking" + exit 1 +fi + + + +if test \! -z "$includedir" ; then + INCLUDES="-I$includedir" +fi + +if test \! -z "$libdir" ; then + LDFLAGS="$LDFLAGS -L$libdir" +fi + + +##### should have options to override the DEPEND crap, I guess... +DEPEND=makedepend +DEPEND_FLAGS= +DEPEND_DEFINES= + + + +# Done testing things -- now substitute in some stuff for the Makefiles. +# +if test $have_motif = yes; then + AC_DEFINE(HAVE_MOTIF) + DIALOG_SRCS='$(MOTIF_SRCS)' + DIALOG_OBJS='$(MOTIF_OBJS)' +elif test $have_athena = yes; then + AC_DEFINE(HAVE_ATHENA) + DIALOG_SRCS='$(ATHENA_SRCS)' + DIALOG_OBJS='$(ATHENA_OBJS)' +else + DIALOG_SRCS='' + DIALOG_OBJS='' +fi + +if test $have_kerberos = yes; then + PASSWD_SRCS='$(KERBEROS_SRCS)' + PASSWD_OBJS='$(KERBEROS_OBJS)' +else + PASSWD_SRCS='$(PWENT_SRCS)' + PASSWD_OBJS='$(PWENT_OBJS)' +fi + +if test $enable_locking = yes; then + LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)' + LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)' +else + LOCK_SRCS='' + LOCK_OBJS='' +fi + +if test $need_setuid = yes; then + NEED_SETUID=yes + INSTALL_SETUID='$(INSTALL) $(SUID_FLAGS)' +else + NEED_SETUID=no + INSTALL_SETUID='$(INSTALL_PROGRAM)' +fi + +tab=' ' +if test $have_gl = yes; then + GL_EXES='$(GL_EXES)' + GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}' \' + GL_KLUDGE_2=${tab} +else + GL_KLUDGE_1=${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}${tab}'\n' + GL_KLUDGE_2='!'${tab} +fi + +AC_SUBST(INCLUDES) + +AC_SUBST(SAVER_LIBS) +AC_SUBST(HACK_LIBS) +AC_SUBST(XPM_LIBS) +AC_SUBST(GL_LIBS) +AC_SUBST(PASSWD_LIBS) +AC_SUBST(INSTALL_SETUID) +AC_SUBST(NEED_SETUID) + +AC_SUBST(DIALOG_SRCS) +AC_SUBST(DIALOG_OBJS) +AC_SUBST(PASSWD_SRCS) +AC_SUBST(PASSWD_OBJS) +AC_SUBST(XMU_SRCS) +AC_SUBST(XMU_OBJS) +AC_SUBST(LOCK_SRCS) +AC_SUBST(LOCK_OBJS) +AC_SUBST(GL_EXES) +AC_SUBST(GL_KLUDGE_1) +AC_SUBST(GL_KLUDGE_2) +AC_SUBST(HACKDIR) +AC_SUBST(APPDEFAULTS) + +AC_SUBST(DEPEND) +AC_SUBST(DEPEND_FLAGS) +AC_SUBST(DEPEND_DEFINES) + +# Print some warnings before emitting the Makefiles. +# +warning=no +warnsep=' #################################################################' +warn() { + if test $warning = no ; then + echo '' ; echo "$warnsep" ; echo '' + warning=yes + fi + echo " Warning:" $* +} + +warn2() { + echo " " $* +} + +if test $with_sgi_req = yes -a $have_sgi = no ; then + warn 'The SGI saver extension was requested, but was not found.' +fi + +if test $with_mit_req = yes -a $have_mit = no ; then + warn 'The MIT saver extension was requested, but was not found.' +fi + +if test $with_xidle_req = yes -a $have_xidle = no ; then + warn 'The XIdle 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;" + warn2 "one or the other is required." + +elif test $with_motif_req = yes -a $have_motif = no ; then + warn "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;" + 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." +fi + +if test $with_xpm_req = yes -a $have_xpm = no ; then + warn 'Use of XPM was requested, but it was not found.' +fi + +if test $with_gl_req = yes -a $have_gl = no ; then + warn 'Use of GL was requested, but it was not found.' +fi + +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_kerberos_req = yes -a $have_kerberos = no ; then + warn 'Use of Kerberos was requested, but it was not found.' +fi + +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 + echo '' ; echo "$warnsep" ; echo '' +fi + + +AC_OUTPUT(Makefile + utils/Makefile + driver/Makefile + hacks/Makefile + hacks/glx/Makefile + driver/XScreenSaver.ad) diff --git a/driver/.gdbinit b/driver/.gdbinit new file mode 100644 index 00000000..cb7d98ab --- /dev/null +++ b/driver/.gdbinit @@ -0,0 +1,25 @@ +# If you're debugging xscreensaver and you are running a virtual root window +# manager, you'd better let the process handle these signals: it remaps the +# virtual root window when they arrive. If you don't do this, your window +# manager will be hosed. +# +# Also, gdb copes badly with breakpoints in functions that are called on the +# other side of a fork(). The Trace/BPT traps cause the spawned process to +# die. +# +#handle 1 pass nostop +#handle 3 pass nostop +#handle 4 pass nostop +#handle 6 pass nostop +#handle 7 pass nostop +#handle 8 pass nostop +#handle 9 pass nostop +#handle 10 pass nostop +#handle 11 pass nostop +#handle 12 pass nostop +#handle 13 pass nostop +#handle 15 pass nostop +#handle 19 pass nostop +b exit +set args -debug +#b purify_stop_here diff --git a/driver/Makefile.in b/driver/Makefile.in new file mode 100644 index 00000000..2bf4b091 --- /dev/null +++ b/driver/Makefile.in @@ -0,0 +1,281 @@ +# driver/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# the `../configure' script generates `driver/Makefile' from this file. + +@SET_MAKE@ +.SUFFIXES: +.SUFFIXES: .c .o + +srcdir = @srcdir@ +VPATH = @srcdir@ + +install_prefix = +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +mansuffix = 1 + +CC = @CC@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +DEFS = @DEFS@ +LIBS = @LIBS@ + +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +SHELL = /bin/sh +INSTALL = @INSTALL@ +SUID_FLAGS = -o root -m 4755 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SETUID = @INSTALL_SETUID@ +INSTALL_DATA = @INSTALL_DATA@ + +X_CFLAGS = @X_CFLAGS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ + +XLIBS = $(X_LIBS) $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) + +AD_DIR = @APPDEFAULTS@ + +UTILS_SRC = $(srcdir)/../utils +UTILS_BIN = ../utils + +INCLUDES = -I. -I$(srcdir) -I$(srcdir)/.. -I$(UTILS_SRC) @INCLUDES@ + +PASSWD_LIBS = @PASSWD_LIBS@ +MOTIF_SRCS = dialogs-Xm.c +MOTIF_OBJS = dialogs-Xm.o + +ATHENA_SRCS = dialogs-Xaw.c +ATHENA_OBJS = dialogs-Xaw.o + +PWENT_SRCS = passwd.c +PWENT_OBJS = passwd.o + +KERBEROS_SRCS = kpasswd.c +KERBEROS_OBJS = kpasswd.o + +LOCK_SRCS_1 = lock.c +LOCK_OBJS_1 = lock.o + +DIALOG_SRCS = @DIALOG_SRCS@ +DIALOG_OBJS = @DIALOG_OBJS@ +PASSWD_SRCS = @PASSWD_SRCS@ +PASSWD_OBJS = @PASSWD_OBJS@ +LOCK_SRCS = @LOCK_SRCS@ +LOCK_OBJS = @LOCK_OBJS@ + +UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \ + $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \ + $(UTILS_SRC)/visual.c $(UTILS_SRC)/xroger.c \ + $(UTILS_SRC)/yarandom.c @XMU_SRCS@ +UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \ + $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \ + $(UTILS_BIN)/visual.o $(UTILS_BIN)/xroger.o \ + $(UTILS_BIN)/yarandom.o @XMU_OBJS@ + +SAVER_SRCS_1 = demo.c stderr.c subprocs.c timers.c windows.c \ + xscreensaver.c xset.c +SAVER_OBJS_1 = demo.o stderr.o subprocs.o timers.o windows.o \ + xscreensaver.o xset.o + +SAVER_SRCS = $(SAVER_SRCS_1) $(DIALOG_SRCS) $(LOCK_SRCS) $(UTIL_SRCS) +SAVER_OBJS = $(SAVER_OBJS_1) $(DIALOG_OBJS) $(LOCK_OBJS) $(UTIL_OBJS) +SAVER_LIBS = @SAVER_LIBS@ -lXt $(XLIBS) $(PASSWD_LIBS) $(LIBS) + +CMD_SRCS = xscreensaver-command.c +CMD_OBJS = xscreensaver-command.o +CMD_LIBS = $(XLIBS) $(LIBS) + +EXES = xscreensaver xscreensaver-command + +HDRS = XScreenSaver_ad.h xscreensaver.h +MEN = xscreensaver.man xscreensaver-command.man +EXTRAS = README Makefile.in XScreenSaver.ad.in dialogs.xd .gdbinit +VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \ + vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \ + vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt + +TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \ + $(MOTIF_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) $(KERBEROS_SRCS) \ + $(LOCK_SRCS_1) $(CMD_SRCS) $(HDRS) $(MEN) + + +all: $(EXES) + +install: install-program install-ad install-man +uninstall: uninstall-program uninstall-ad uninstall-man + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ + INSTALL_SETUID='$(INSTALL_SETUID) -s' \ + install + +install-program: + @inst="$(INSTALL_PROGRAM)" ; \ + if [ @NEED_SETUID@ = yes ]; then \ + me="`whoami`" ; \ + if [ "$$me" = root ]; then \ + inst="$(INSTALL_SETUID)" ; \ + else \ + e=echo ; \ + $$e "" ;\ + $$e " Warning: xscreensaver has been compiled with support for shadow" ;\ + $$e " passwords. If your system actually uses shadow passwords," ;\ + $$e " then xscreensaver must be installed as a setuid root" ;\ + $$e " program in order for locking to work. To do this, you" ;\ + $$e " must run 'make install' as 'root', not as '$$me'." ;\ + $$e "" ;\ + $$e " For now, xscreensaver will be installed non-setuid, which" ;\ + $$e " means that locking may not work." ;\ + $$e "" ;\ + fi ; \ + fi ; \ + echo $$inst xscreensaver $(bindir)/xscreensaver ; \ + $$inst xscreensaver $(bindir)/xscreensaver + $(INSTALL_PROGRAM) xscreensaver-command $(bindir)/xscreensaver-command + +install-ad: + $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver + +install-man: + @men="$(MEN)" ; \ + for man in $$men; do \ + instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ + echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ; \ + $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ; \ + done + +uninstall-program: + @for program in $(EXES); do \ + echo rm -f $(bindir)/$$program ; \ + rm -f $(bindir)/$$program ; \ + done + +uninstall-ad: + rm -f $(AD_DIR)/XScreenSaver + +uninstall-man: + @men="$(MEN)" ; \ + for man in $$men; do \ + instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ + echo rm -f $(man1dir)/$$instname ; \ + rm -f $(man1dir)/$$instname ; \ + done + +clean: + -rm -f *.o a.out core $(EXES) XScreenSaver_ad.h + +distclean: clean + -rm -f Makefile XScreenSaver.ad *~ "#"* + +# Adds all current dependencies to Makefile +depend: XScreenSaver_ad.h + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SAVER_SRCS_1) $(CMD_SRCS) + +# Adds some dependencies to Makefile.in -- not totally accurate, but pretty +# 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 + @echo updating dependencies in `pwd`/Makefile.in... ; \ + $(DEPEND) -w 0 -f - \ + -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SAVER_SRCS_1) $(CMD_SRCS) | \ + ( \ + awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@\.\./utils@$$(UTILS_SRC)@g' \ + -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \ + -e 's@$$.*\(XScreenSaver_ad\)@\1@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +TAGS: tags +tags: + find $(srcdir) -name '*.[chly]' -print | xargs etags -a + +echo_tarfiles: + @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null + @echo $(TARFILES) + + +# 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... +# +$(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c +$(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c +$(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c +$(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c +$(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c +$(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c +$(UTILS_BIN)/xroger.o: $(UTILS_SRC)/xroger.c +$(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c + +$(UTIL_OBJS): + cd $(UTILS_BIN) ; \ + $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +# How we build object files in this directory. +.c.o: + $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< + + +# How we build the default app-defaults file into the program. +# +XScreenSaver_ad.h: XScreenSaver.ad + $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > $@ + +# The executables linked in this directory. +# +xscreensaver: $(SAVER_OBJS) + $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS) + +xscreensaver-command: $(CMD_OBJS) + $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS) + + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +demo.o: $(srcdir)/../config.h +demo.o: $(srcdir)/xscreensaver.h +demo.o: $(UTILS_SRC)/resources.h +stderr.o: $(srcdir)/../config.h +stderr.o: $(srcdir)/xscreensaver.h +stderr.o: $(UTILS_SRC)/resources.h +stderr.o: $(UTILS_SRC)/visual.h +subprocs.o: $(srcdir)/../config.h +subprocs.o: $(srcdir)/xscreensaver.h +subprocs.o: $(UTILS_SRC)/yarandom.h +timers.o: $(srcdir)/../config.h +timers.o: $(srcdir)/xscreensaver.h +windows.o: $(srcdir)/../config.h +windows.o: $(srcdir)/xscreensaver.h +windows.o: $(UTILS_SRC)/visual.h +windows.o: $(UTILS_SRC)/fade.h +xscreensaver.o: $(srcdir)/../config.h +xscreensaver.o: $(srcdir)/xscreensaver.h +xscreensaver.o: $(UTILS_SRC)/version.h +xscreensaver.o: $(UTILS_SRC)/yarandom.h +xscreensaver.o: $(UTILS_SRC)/resources.h +xscreensaver.o: $(UTILS_SRC)/visual.h +xscreensaver.o: XScreenSaver_ad.h +xset.o: $(srcdir)/../config.h +xset.o: $(srcdir)/xscreensaver.h +xscreensaver-command.o: $(srcdir)/../config.h +xscreensaver-command.o: $(UTILS_SRC)/version.h + diff --git a/driver/README b/driver/README new file mode 100644 index 00000000..df64793b --- /dev/null +++ b/driver/README @@ -0,0 +1,6 @@ + +This directory contains the source for xscreensaver and xscreensaver-command, +the screensaver driver, and the program for externally controlling it. Some +stuff from the ../utils/ directory is used here as well. + +If you have compilation problems, check the parameters in ../config.h. diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in new file mode 100644 index 00000000..83081960 --- /dev/null +++ b/driver/XScreenSaver.ad.in @@ -0,0 +1,356 @@ +! app-defaults file for XScreenSaver by Jamie Zawinski. +! See "man xscreensaver" for more info. The latest version is always +! available at http://people.netscape.com/jwz/xscreensaver/ + +*timeout: 10 +*cycle: 10 +*lockTimeout: 0 +*passwdTimeout: 30 +*nice: 10 +*lock: False +*verbose: False +*fade: True +*unfade: False +*fadeSeconds: 3 +*fadeTicks: 20 + +*captureStderr: True +*captureStdout: True +*textForeground: Yellow +*textBackground: Black +*overlayStderr: True +*font: *-medium-r-*-140-*-m-* + +! Turning on "installColormap" interacts erratically with twm and tvtwm, +! but seems to work fine with mwm and olwm. Try it and see. If your +! screen turns some color other than black, the window manager is buggy, +! and you need to set this resource to False (or get a WM that works.) +! +*installColormap: True + + +! Any program which can draw on the root window will work as a screensaver. +! The following resource enumerates them. +! +! Programs are separated by newlines (specified in resource files with \n). +! Lines may be continued with a lone \ at the end of the line. +! +! Each line is an `sh' command. +! +! But, if the first word on the line is the name of a visual followed by a +! colon, then that visual will be used for the program, if it is available. +! If no such visual is available, then the program will be skipped. In +! this way, you can specify that you want certain programs to run only +! on color screens, and others only on mono screens, by making use of the +! magic visual names "color" and "mono". Likewise, if some hacks prefer +! colormaps, but others prefer 24-bit windows, that also can be arranged +! (in this case, by using "PseudoColor:" versus "TrueColor:".) +! +! All programs must be launched in such a way that they draw on the root +! window; they should not be spawned in the background with "&". If shell +! 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\ + attraction -root -mode balls \n\ + attraction -root -mode lines -points 3 -segments 200 \n\ + attraction -root -mode splines -segments 300 \n\ + attraction -root -mode lines -radius 300 \ + -orbit -vmult 0.5 \n\ + pyro -root \n\ + helix -root \n\ + pedal -root \n\ + rorschach -root -offset 7 \n\ + hopalong -root \n\ + greynetic -root \n\ + xroger -root \n\ + imsmap -root \n\ + slidescreen -root \n\ + decayscreen -root \n\ + hypercube -root \n\ + halo -root \n\ + maze -root \n\ + noseguy -root \n\ + flame -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\ + grav -root -trail -decay \n\ + drift -root \n\ + ifs -root \n\ + julia -root \n\ + penrose -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\ + goop -root \n\ + starfish -root \n\ + starfish -root -blob \n\ + munch -root \n\ + fadeplot -root \n\ + \ + mono: rocks -root \n\ + color: rocks -root -fg darksalmon \n\ + \ + mono: qix -root -linear -count 5 -size 200 -spread 30 \ + -segments 75 -solid -xor \n\ + \ + color: attraction -root -mode polygons \n\ + color: attraction -root -mode filled-splines -segments 0 \n\ + color: attraction -root -glow -points 10 \n\ + color: bubbles -root \n\ + \ + PseudoColor: qix -root -count 4 -solid -transparent \n\ + PseudoColor: qix -root -count 5 -solid -transparent -linear \ + -segments 250 -size 100 \n\ +@GL_KLUDGE_1@ +@GL_KLUDGE_2@ gears -root \n\ +@GL_KLUDGE_2@ superquadrics -root \n\ +@GL_KLUDGE_2@ morph3d -root \n\ +@GL_KLUDGE_2@ escher -root \n\ +@GL_KLUDGE_2@ pipes -root \n\ +@GL_KLUDGE_2@ sproingies -root \n\ +@GL_KLUDGE_2@ rubik -root \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.) +! +! Some other programs that you might want to track down (these work as +! XScreenSaver helpers, but are not distributed with it): +! +! xdaliclock -root -builtin2 \n\ +! xswarm -r 2>&- \n\ +! xwave -root \n\ +! xbouncebits ... \n\ +! ico -r -faces -sleep 1 -obj ico \n\ +! xsplinefun \n\ +! kaleid -root \n\ +! color: xfishtank -c black -d -r 2 \n\ +! +! xtacy is ok, but it only works on the default visual. We can satisfy +! that constraint like so: +! +! default: xtacy -root -delay 100 -funky -number 3 \n\ +! default: xtacy -root -delay 100 -gravity \n\ +! 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: +! +! 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 +! ...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.) +! +! Some SGI GL programs work with XScreenSaver; most don't. +! +! Bongo works fine: +! +! /usr/demos/bin/bongo -wbongo +! +! 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! +! +! /usr/demos/bin/ep +! +! 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. + + + +!============================================================================= +! +! You probably don't want to change anything after this point. +! +!============================================================================= + + +! Resources for the Motif dialog boxes: +! +*fontList: *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1 +*demoDialog*label1.fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1 +*passwdDialog*fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1 +*XmList.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 +*XmTextField.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 +*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 + +*XmDialogShell*foreground: black +*XmDialogShell*background: gray90 +*XmDialogShell*XmTextField.foreground: black +*XmDialogShell*XmTextField.background: white +*XmDialogShell*demoList.foreground: black +*XmDialogShell*demoList.background: white +*XmDialogShell*rogerLabel.foreground: red3 +*XmDialogShell*rogerLabel.background: white + +*XmDialogShell.title: XScreenSaver +*allowShellResize: True +*autoUnmanage: False + +! This doesn't work. Motif ignores it if there is a scroll-list! +*demoDialog.maxWidth: 600 + +*label1.labelString: XScreenSaver %s +*label1.label: XScreenSaver %s +*label2.labelString: Copyright © 1991-1997 by Jamie Zawinski +*label2.label: Copyright © 1991-1997 by Jamie Zawinski +*demoList.visibleItemCount: 10 +*demoList.automaticSelection: True +*next.labelString: Run Next +*prev.labelString: Run Previous +*edit.labelString: Edit Parameters +*done.labelString: Exit Demo Mode +*restart.labelString: Reinitialize + +*resourcesLabel.labelString: XScreenSaver Parameters + +*timeoutLabel.labelString: Saver Timeout +*cycleLabel.labelString: Cycle Timeout +*fadeSecondsLabel.labelString: Fade Duration +*fadeTicksLabel.labelString: Fade Ticks +*lockLabel.labelString: Lock Timeout +*passwdLabel.labelString: Password Timeout +*resourcesForm*XmTextField.columns: 8 + +*verboseToggle.labelString: Verbose +*cmapToggle.labelString: Install Colormap +*fadeToggle.labelString: Fade Colormap +*unfadeToggle.labelString: Unfade Colormap +*lockToggle.labelString: Require Password +*resourcesDone.labelString: Done +*resourcesCancel.labelString: Cancel + +*passwdDialog.title: Password +*passwdLabel1.labelString: XScreenSaver %s +*passwdLabel2.labelString: This display is locked. +*passwdLabel3.labelString: Please type %s's password to unlock it. +*passwdDone.labelString: Done +*passwdCancel.labelString: Cancel + +*passwdLabel1.alignment: ALIGNMENT_BEGINNING +*passwdLabel2.alignment: ALIGNMENT_BEGINNING +*passwdLabel3.alignment: ALIGNMENT_BEGINNING +*rogerLabel.width: 150 + + +! Resources for the dialog boxes using the abominable Athena widgets: +! +*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 +*demo_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1 +*resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1 +*demo_dialog*List.font: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 + +! This is a hack to make the typed password invisible. +! Surely someone can do better than this... +*passwd_dialog*passwd_form.value*font: *nil* + +*demo_dialog*foreground: black +*demo_dialog*background: gray90 +*demo_dialog*List.background: white +*demo_dialog*Scrollbar.background: gray85 +*demo_dialog*Command.background: gray85 + +*resources_dialog*foreground: black +*resources_dialog*background: gray90 +*resources_dialog*Command.background: gray85 +*resources_dialog*Toggle.background: gray85 +*resources_dialog*Text*background: white + +*resources_dialog*Dialog.value.translations: #override\n\ + Return: beginning-of-line()\n + +*passwd_dialog*foreground: black +*passwd_dialog*background: gray90 +*passwd_dialog*Text*background: white + +*demo_dialog*viewport.width: 400 +*demo_dialog*viewport.height: 200 +*Form.borderWidth: 0 +*Box.borderWidth: 0 +*Label.borderWidth: 0 +*resources_dialog*Dialog.borderWidth: 0 + +*demo_dialog*next.label: Run Next +*demo_dialog*prev.label: Run Previous +*demo_dialog*edit.label: Edit Parameters +*demo_dialog*done.label: Exit Demo Mode +*demo_dialog*restart.label: Reinitialize + +*resources_dialog*timeout.label: Saver Timeout: +*resources_dialog*cycle.label: Cycle Timeout: +*resources_dialog*fade.label: Fade Duration: +*resources_dialog*ticks.label: Fade Ticks: +*resources_dialog*lockTime.label: Lock Timeout: +*resources_dialog*passwdTime.label: Password Timeout: + +*resources_dialog*label1.label: XScreenSaver Parameters +*resources_dialog*buttonbox.verbose.label: Verbose +*resources_dialog*buttonbox.cmap.label: Install Colormap +*resources_dialog*buttonbox.fade.label: Fade Colormap +*resources_dialog*buttonbox.unfade.label: Unfade Colormap +*resources_dialog*buttonbox.lock.label: Require Password +*resources_dialog*done.label: Done +*resources_dialog*cancel.label: Cancel + +*passwd_dialog*label1.label: XScreenSaver %s +*passwd_dialog*label2.label: This display is locked. +*passwd_dialog*label3.label: Please type %s's password to unlock it. +*passwd_dialog*ok.label: Done +*passwd_dialog*cancel.label: Cancel +*passwd_dialog*passwd_form*label.label: Enter password: +*passwd_dialog*Dialog.label: Enter password: +*passwd_dialog*passwd_form*Text.width: 200 +*passwd_dialog*roger.width: 150 +*passwd_dialog*roger.height: 150 +*passwd_dialog*roger.foreground: red3 +*passwd_dialog*roger.background: white +*passwd_dialog*roger.borderWidth: 1 + + +! You probably won't need to change these. They are only used if no server +! extension is in use. +! +*pointerPollTime: 5 +*initialDelay: 30 +*windowCreationTimeout: 30 + +*bourneShell: /bin/sh diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h new file mode 100644 index 00000000..1c31b5f3 --- /dev/null +++ b/driver/XScreenSaver_ad.h @@ -0,0 +1,213 @@ +"*timeout: 10", +"*cycle: 10", +"*lockTimeout: 0", +"*passwdTimeout: 30", +"*nice: 10", +"*lock: False", +"*verbose: False", +"*fade: True", +"*unfade: False", +"*fadeSeconds: 3", +"*fadeTicks: 20", +"*captureStderr: True", +"*captureStdout: True", +"*textForeground: Yellow", +"*textBackground: Black", +"*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\ + attraction -root -mode balls \\n\ + attraction -root -mode lines -points 3 -segments 200 \\n\ + attraction -root -mode splines -segments 300 \\n\ + attraction -root -mode lines -radius 300 \ + -orbit -vmult 0.5 \\n\ + pyro -root \\n\ + helix -root \\n\ + pedal -root \\n\ + rorschach -root -offset 7 \\n\ + hopalong -root \\n\ + greynetic -root \\n\ + xroger -root \\n\ + imsmap -root \\n\ + slidescreen -root \\n\ + decayscreen -root \\n\ + hypercube -root \\n\ + halo -root \\n\ + maze -root \\n\ + noseguy -root \\n\ + flame -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\ + grav -root -trail -decay \\n\ + drift -root \\n\ + ifs -root \\n\ + julia -root \\n\ + penrose -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\ + goop -root \\n\ + starfish -root \\n\ + starfish -root -blob \\n\ + munch -root \\n\ + fadeplot -root \\n\ + \ + mono: rocks -root \\n\ + color: rocks -root -fg darksalmon \\n\ + \ + mono: qix -root -linear -count 5 -size 200 -spread 30 \ + -segments 75 -solid -xor \\n\ + \ + color: attraction -root -mode polygons \\n\ + color: attraction -root -mode filled-splines -segments 0 \\n\ + color: attraction -root -glow -points 10 \\n\ + color: bubbles -root \\n\ + \ + PseudoColor: qix -root -count 4 -solid -transparent \\n\ + PseudoColor: qix -root -count 5 -solid -transparent -linear \ + -segments 250 -size 100 \\n\ + \ + gears -root \\n\ + superquadrics -root \\n\ + morph3d -root \\n\ + escher -root \\n\ + pipes -root \\n\ + sproingies -root \\n\ + rubik -root \\n", +" ", +"*fontList: *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1", +"*demoDialog*label1.fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1", +"*passwdDialog*fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1", +"*XmList.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1", +"*XmTextField.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1", +"*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1", +"*XmDialogShell*foreground: black", +"*XmDialogShell*background: gray90", +"*XmDialogShell*XmTextField.foreground: black", +"*XmDialogShell*XmTextField.background: white", +"*XmDialogShell*demoList.foreground: black", +"*XmDialogShell*demoList.background: white", +"*XmDialogShell*rogerLabel.foreground: red3", +"*XmDialogShell*rogerLabel.background: white", +"*XmDialogShell.title: XScreenSaver", +"*allowShellResize: True", +"*autoUnmanage: False", +"*demoDialog.maxWidth: 600", +"*label1.labelString: XScreenSaver %s", +"*label1.label: XScreenSaver %s", +"*label2.labelString: Copyright © 1991-1997 by Jamie Zawinski ", +"*label2.label: Copyright © 1991-1997 by Jamie Zawinski ", +"*demoList.visibleItemCount: 10", +"*demoList.automaticSelection: True", +"*next.labelString: Run Next", +"*prev.labelString: Run Previous", +"*edit.labelString: Edit Parameters", +"*done.labelString: Exit Demo Mode", +"*restart.labelString: Reinitialize", +"*resourcesLabel.labelString: XScreenSaver Parameters", +"*timeoutLabel.labelString: Saver Timeout", +"*cycleLabel.labelString: Cycle Timeout", +"*fadeSecondsLabel.labelString: Fade Duration", +"*fadeTicksLabel.labelString: Fade Ticks", +"*lockLabel.labelString: Lock Timeout", +"*passwdLabel.labelString: Password Timeout", +"*resourcesForm*XmTextField.columns: 8", +"*verboseToggle.labelString: Verbose", +"*cmapToggle.labelString: Install Colormap", +"*fadeToggle.labelString: Fade Colormap", +"*unfadeToggle.labelString: Unfade Colormap", +"*lockToggle.labelString: Require Password", +"*resourcesDone.labelString: Done", +"*resourcesCancel.labelString: Cancel", +"*passwdDialog.title: Password", +"*passwdLabel1.labelString: XScreenSaver %s", +"*passwdLabel2.labelString: This display is locked.", +"*passwdLabel3.labelString: Please type %s's password to unlock it.", +"*passwdDone.labelString: Done", +"*passwdCancel.labelString: Cancel", +"*passwdLabel1.alignment: ALIGNMENT_BEGINNING", +"*passwdLabel2.alignment: ALIGNMENT_BEGINNING", +"*passwdLabel3.alignment: ALIGNMENT_BEGINNING", +"*rogerLabel.width: 150", +"*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", +"*demo_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1", +"*resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1", +"*demo_dialog*List.font: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1", +"*passwd_dialog*passwd_form.value*font: *nil*", +"*demo_dialog*foreground: black", +"*demo_dialog*background: gray90", +"*demo_dialog*List.background: white", +"*demo_dialog*Scrollbar.background: gray85", +"*demo_dialog*Command.background: gray85", +"*resources_dialog*foreground: black", +"*resources_dialog*background: gray90", +"*resources_dialog*Command.background: gray85", +"*resources_dialog*Toggle.background: gray85", +"*resources_dialog*Text*background: white", +"*resources_dialog*Dialog.value.translations: #override\\n\ + Return: beginning-of-line()\\n", +"*passwd_dialog*foreground: black", +"*passwd_dialog*background: gray90", +"*passwd_dialog*Text*background: white", +"*demo_dialog*viewport.width: 400", +"*demo_dialog*viewport.height: 200", +"*Form.borderWidth: 0", +"*Box.borderWidth: 0", +"*Label.borderWidth: 0", +"*resources_dialog*Dialog.borderWidth: 0", +"*demo_dialog*next.label: Run Next", +"*demo_dialog*prev.label: Run Previous", +"*demo_dialog*edit.label: Edit Parameters", +"*demo_dialog*done.label: Exit Demo Mode", +"*demo_dialog*restart.label: Reinitialize", +"*resources_dialog*timeout.label: Saver Timeout:", +"*resources_dialog*cycle.label: Cycle Timeout:", +"*resources_dialog*fade.label: Fade Duration:", +"*resources_dialog*ticks.label: Fade Ticks:", +"*resources_dialog*lockTime.label: Lock Timeout:", +"*resources_dialog*passwdTime.label: Password Timeout:", +"*resources_dialog*label1.label: XScreenSaver Parameters", +"*resources_dialog*buttonbox.verbose.label: Verbose", +"*resources_dialog*buttonbox.cmap.label: Install Colormap", +"*resources_dialog*buttonbox.fade.label: Fade Colormap", +"*resources_dialog*buttonbox.unfade.label: Unfade Colormap", +"*resources_dialog*buttonbox.lock.label: Require Password", +"*resources_dialog*done.label: Done", +"*resources_dialog*cancel.label: Cancel", +"*passwd_dialog*label1.label: XScreenSaver %s", +"*passwd_dialog*label2.label: This display is locked.", +"*passwd_dialog*label3.label: Please type %s's password to unlock it.", +"*passwd_dialog*ok.label: Done", +"*passwd_dialog*cancel.label: Cancel", +"*passwd_dialog*passwd_form*label.label: Enter password:", +"*passwd_dialog*Dialog.label: Enter password:", +"*passwd_dialog*passwd_form*Text.width: 200", +"*passwd_dialog*roger.width: 150", +"*passwd_dialog*roger.height: 150", +"*passwd_dialog*roger.foreground: red3", +"*passwd_dialog*roger.background: white", +"*passwd_dialog*roger.borderWidth: 1", +"*pointerPollTime: 5", +"*initialDelay: 30", +"*windowCreationTimeout: 30", +"*bourneShell: /bin/sh", diff --git a/driver/compile_axp.com b/driver/compile_axp.com new file mode 100644 index 00000000..d6ed0e8a --- /dev/null +++ b/driver/compile_axp.com @@ -0,0 +1,15 @@ +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) DEMO.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) DIALOGS-XM.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) LOCK.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) PASSWD.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) STDERR.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,NO_SETUID)/INCL=([],[-],[-.UTILS]) SUBPROCS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) TIMERS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) WINDOWS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) XSCREENSAVER-COMMAND.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,NO_SETUID)/INCL=([],[-],[-.UTILS]) XSCREENSAVER.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) XSET.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) VMS-GETPWNAM.C +$!!! CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) GETPWUID.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) VMS-HPWD.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) VMS-VALIDATE.C diff --git a/driver/compile_decc.com b/driver/compile_decc.com new file mode 100644 index 00000000..d6ed0e8a --- /dev/null +++ b/driver/compile_decc.com @@ -0,0 +1,15 @@ +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) DEMO.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) DIALOGS-XM.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) LOCK.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) PASSWD.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) STDERR.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,NO_SETUID)/INCL=([],[-],[-.UTILS]) SUBPROCS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) TIMERS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) WINDOWS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) XSCREENSAVER-COMMAND.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,NO_SETUID)/INCL=([],[-],[-.UTILS]) XSCREENSAVER.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) XSET.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) VMS-GETPWNAM.C +$!!! CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) GETPWUID.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) VMS-HPWD.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-],[-.UTILS]) VMS-VALIDATE.C diff --git a/driver/demo.c b/driver/demo.c new file mode 100644 index 00000000..a0ae2dab --- /dev/null +++ b/driver/demo.c @@ -0,0 +1,978 @@ +/* demo.c --- implements the interactive demo-mode and options dialogs. + * xscreensaver, Copyright (c) 1993-1997 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#ifdef HAVE_MOTIF +# include +# include +# include +# include + +#else /* HAVE_ATHENA */ + /* Athena demo code contributed by Jon A. Christopher */ + /* Copyright 1997, with the same permissions as above. */ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif /* HAVE_ATHENA */ + +#include "xscreensaver.h" +#include "resources.h" /* for parse_time() */ +#include +#include +#include + +static void demo_mode_hack (saver_info *si, char *); +static void demo_mode_done (saver_info *si); + +extern Widget demo_dialog; +extern Widget label1; +extern Widget text_line; +extern Widget demo_form; +extern Widget demo_list; +extern Widget next, prev, done, restart, edit; + +extern Widget resources_dialog; +extern Widget resources_form; +extern Widget res_done, res_cancel; +extern Widget timeout_text, cycle_text, fade_text, ticks_text; +extern Widget lock_time_text, passwd_time_text; +extern Widget verbose_toggle, cmap_toggle, fade_toggle, unfade_toggle, + lock_toggle; + + +#ifdef HAVE_MOTIF + +# define set_toggle_button_state(toggle,state) \ + XmToggleButtonSetState ((toggle), (state), True) +# define set_text_string(text_widget,string) \ + XmTextSetString ((text_widget), (string)) +# define add_button_callback(button,cb,arg) \ + XtAddCallback ((button), XmNactivateCallback, (cb), (arg)) +# define add_toggle_callback(button,cb,arg) \ + XtAddCallback ((button), XmNvalueChangedCallback, (cb), (arg)) +# define add_text_callback add_toggle_callback + +#else /* HAVE_ATHENA */ + +# define set_toggle_button_state(toggle,state) \ + XtVaSetValues((toggle), XtNstate, (state), 0) +# define set_text_string(text_widget,string) \ + XtVaSetValues ((text_widget), XtNvalue, (string), 0) +# define add_button_callback(button,cb,arg) \ + XtAddCallback ((button), XtNcallback, (cb), (arg)) +# define add_toggle_callback add_button_callback +# define add_text_callback(b,c,a) ERROR! + +#endif /* HAVE_ATHENA */ + + +#define disable_widget(widget) \ + XtVaSetValues((widget), XtNsensitive, False, 0) + + +static char * +get_text_string (Widget text_widget) +{ +#ifdef HAVE_MOTIF + return XmTextGetString (text_widget); +#else /* HAVE_ATHENA */ + char *string = 0; + XtVaGetValues (text_widget, XtNvalue, &string, 0); + return string; +#endif /* HAVE_ATHENA */ +} + +static char * +get_label_string (Widget label_widget) +{ +#ifdef HAVE_MOTIF + char *label = 0; + XmString xm_label = 0; + XtVaGetValues (label_widget, XmNlabelString, &xm_label, 0); + if (!xm_label) + return 0; + XmStringGetLtoR (xm_label, XmSTRING_DEFAULT_CHARSET, &label); + return label; +#else /* HAVE_ATHENA */ + char *label = 0; + XtVaGetValues (label_widget, XtNlabel, &label, 0); + return (label ? strdup(label) : 0); +#endif /* HAVE_ATHENA */ +} + + +static void +set_label_string (Widget label_widget, char *string) +{ +#ifdef HAVE_MOTIF + XmString xm_string = XmStringCreate (string, XmSTRING_DEFAULT_CHARSET); + XtVaSetValues (label_widget, XmNlabelString, xm_string, 0); + XmStringFree (xm_string); +#else /* HAVE_ATHENA */ + XtVaSetValues (label_widget, XtNlabel, string, 0); +#endif /* HAVE_ATHENA */ +} + + +void +format_into_label (Widget label, const char *arg) +{ + char *text = get_label_string (label); + char *buf = (char *) malloc ((text ? strlen(text) : 100) + strlen(arg) + 10); + + if (!text || !strcmp (text, XtName (label))) + strcpy (buf, "ERROR: RESOURCES ARE NOT INSTALLED CORRECTLY"); + else + sprintf (buf, text, arg); + + set_label_string (label, buf); + free (buf); + XtFree (text); +} + + +void +steal_focus_and_colormap (Widget dialog) +{ + Display *dpy = XtDisplay (dialog); + Window window = XtWindow (dialog); + Colormap cmap = 0; + XSetInputFocus (dpy, window, RevertToParent, CurrentTime); + + XtVaGetValues (dialog, XtNcolormap, &cmap, 0); + if (cmap) + XInstallColormap (dpy, cmap); +} + +static void +raise_screenhack_dialog (void) +{ + XMapRaised (XtDisplay (demo_dialog), XtWindow (demo_dialog)); + if (resources_dialog) + XMapRaised (XtDisplay (resources_dialog), XtWindow (resources_dialog)); + steal_focus_and_colormap (resources_dialog ? resources_dialog : demo_dialog); +} + +static void +destroy_screenhack_dialogs (saver_info *si) +{ + saver_screen_info *ssi = si->default_screen; + + if (demo_dialog) XtDestroyWidget (demo_dialog); + if (resources_dialog) XtDestroyWidget (resources_dialog); + demo_dialog = resources_dialog = 0; + + if (ssi->demo_cmap && + ssi->demo_cmap != ssi->cmap && + ssi->demo_cmap != DefaultColormapOfScreen (ssi->screen)) + { + XFreeColormap (si->dpy, ssi->demo_cmap); + ssi->demo_cmap = 0; + } + + /* Since we installed our colormap to display the dialogs properly, put + the old one back, so that the screensaver_window is now displayed + properly. */ + if (ssi->cmap) + XInstallColormap (si->dpy, ssi->cmap); +} + +#ifdef HAVE_MOTIF + +static void +text_cb (Widget text_widget, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + char *line; + line = get_text_string (text_widget); + demo_mode_hack (si, line); +} + +#endif /* HAVE_MOTIF */ + + +static void +select_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + +#ifdef HAVE_ATHENA + XawListReturnStruct *item = (XawListReturnStruct*)call_data; + demo_mode_hack (si, item->string); +#else /* HAVE_MOTIF */ + XmListCallbackStruct *lcb = (XmListCallbackStruct *) call_data; + char *string = 0; + if (lcb->item) + XmStringGetLtoR (lcb->item, XmSTRING_DEFAULT_CHARSET, &string); + set_text_string (text_line, (string ? string : "")); + if (lcb->reason == XmCR_DEFAULT_ACTION && string) + demo_mode_hack (si, string); + if (string) + XtFree (string); +#endif /* HAVE_MOTIF */ + steal_focus_and_colormap (demo_dialog); +} + + +#if 0 /* configure does this now */ +#ifdef HAVE_ATHENA +# if !defined(_Viewport_h) + /* The R4 Athena libs don't have this function. I don't know the right + way to tell, but I note that the R5 version of Viewport.h defines + _XawViewport_h, while the R4 version defines _Viewport_h. So we'll + try and key off of that... */ +# define HAVE_XawViewportSetCoordinates +# endif +#endif /* HAVE_ATHENA */ +#endif /* 0 */ + + +/* Why this behavior isn't automatic in *either* toolkit, I'll never know. + */ +static void +ensure_selected_item_visible (Widget list) +{ +#ifdef HAVE_MOTIF + int *pos_list = 0; + int pos_count = 0; + if (XmListGetSelectedPos (list, &pos_list, &pos_count) && pos_count > 0) + { + int top = -2; + int visible = 0; + XtVaGetValues (list, + XmNtopItemPosition, &top, + XmNvisibleItemCount, &visible, + 0); + if (pos_list[0] >= top + visible) + { + int pos = pos_list[0] - visible + 1; + if (pos < 0) pos = 0; + XmListSetPos (list, pos); + } + else if (pos_list[0] < top) + { + XmListSetPos (list, pos_list[0]); + } + } + if (pos_list) + XtFree ((char *) pos_list); + +#else /* HAVE_ATHENA */ +# ifdef HAVE_XawViewportSetCoordinates + + int margin = 16; /* should be line height or something. */ + int count = 0; + int pos; + Dimension list_h = 0, vp_h = 0; + Dimension top_margin = 4; /* I don't know where this value comes from */ + Position vp_x = 0, vp_y = 0, current_y; + double cratio; + Widget viewport = XtParent(demo_list); + Widget sb = (viewport ? XtNameToWidget(viewport, "*vertical") : 0); + float sb_top = 0, sb_size = 0; + XawListReturnStruct *current = XawListShowCurrent(demo_list); + if (!current || !sb) return; + + XtVaGetValues(demo_list, + XtNnumberStrings, &count, + XtNheight, &list_h, + 0); + if (count < 2 || list_h < 10) return; + + XtVaGetValues(viewport, XtNheight, &vp_h, XtNx, &vp_x, XtNy, &vp_y, 0); + if (vp_h < 10) return; + + XtVaGetValues(sb, XtNtopOfThumb, &sb_top, XtNshown, &sb_size, 0); + if (sb_size <= 0) return; + + pos = current->list_index; + cratio = ((double) pos) / ((double) count); + current_y = (cratio * list_h); + + if (cratio < sb_top || + cratio > sb_top + sb_size) + { + if (cratio < sb_top) + current_y -= (vp_h - margin - margin); + else + current_y -= margin; + + if ((long)current_y >= (long) list_h) + current_y = (Position) ((long)list_h - (long)vp_h); + + if ((long)current_y < (long)top_margin) + current_y = (Position)top_margin; + + XawViewportSetCoordinates (viewport, vp_x, current_y); + } +# endif /* HAVE_XawViewportSetCoordinates */ +#endif /* HAVE_ATHENA */ +} + + +static void +next_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + +#ifdef HAVE_ATHENA + int cnt; + XawListReturnStruct *current = XawListShowCurrent(demo_list); + if (current->list_index == XAW_LIST_NONE) + XawListHighlight(demo_list,1); + else + { + XtVaGetValues(demo_list, + XtNnumberStrings, &cnt, + NULL); + if (current->list_index + 1 < cnt) + { + current->list_index++; + XawListHighlight(demo_list, current->list_index); + } + } + + ensure_selected_item_visible (demo_list); + current = XawListShowCurrent(demo_list); + demo_mode_hack (si, current->string); + +#else /* HAVE_MOTIF */ + + int *pos_list; + int pos_count; + if (! XmListGetSelectedPos (demo_list, &pos_list, &pos_count)) + 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); + } + ensure_selected_item_visible (demo_list); + demo_mode_hack (si, get_text_string (text_line)); + +#endif /* HAVE_MOTIF */ +} + + +static void +prev_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + +#ifdef HAVE_ATHENA + XawListReturnStruct *current=XawListShowCurrent(demo_list); + if (current->list_index == XAW_LIST_NONE) + XawListHighlight(demo_list,1); + else + { + if (current->list_index>=1) + { + current->list_index--; + XawListHighlight(demo_list, current->list_index); + } + } + + ensure_selected_item_visible (demo_list); + current = XawListShowCurrent(demo_list); + demo_mode_hack (si, current->string); + +#else /* HAVE_MOTIF */ + + int *pos_list; + int pos_count; + if (! XmListGetSelectedPos (demo_list, &pos_list, &pos_count)) + XmListSelectPos (demo_list, 0, True); + else + { + XmListSelectPos (demo_list, pos_list [0] - 1, True); + XtFree ((char *) pos_list); + } + ensure_selected_item_visible (demo_list); + demo_mode_hack (si, get_text_string (text_line)); + +#endif /* HAVE_MOTIF */ +} + + +static void pop_resources_dialog (saver_info *si); +static void make_resources_dialog (saver_info *si, Widget parent); + +static void +edit_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + saver_screen_info *ssi = si->default_screen; + Widget parent = ssi->toplevel_shell; + if (! resources_dialog) + make_resources_dialog (si, parent); + pop_resources_dialog (si); +} + +static void +done_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + demo_mode_done (si); +} + + +static void +restart_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + demo_mode_restart_process (si); +} + +void +pop_up_dialog_box (Widget dialog, Widget form, int where) +{ + /* I'm sure this is the wrong way to pop up a dialog box, but I can't + figure out how else to do it. + + It's important that the screensaver dialogs not get decorated or + otherwise reparented by the window manager, because they need to be + children of the *real* root window, not the WM's virtual root, in + order for us to guarentee that they are visible above the screensaver + window itself. + */ + Arg av [100]; + int ac = 0; + Dimension sw, sh, x, y, w, h; + +#ifdef HAVE_ATHENA + XtRealizeWidget (dialog); +#else /* HAVE_MOTIF */ + /* Motif likes us to realize the *child* of the shell... */ + XtRealizeWidget (form); +#endif /* HAVE_MOTIF */ + + sw = WidthOfScreen (XtScreen (dialog)); + sh = HeightOfScreen (XtScreen (dialog)); + ac = 0; + XtSetArg (av [ac], XtNwidth, &w); ac++; + XtSetArg (av [ac], XtNheight, &h); ac++; + XtGetValues (form, av, ac); + +#ifdef DEBUG + if (where >= 69) + { + where -= 69; + sw = (sw * 7) / 12; + } +#endif + + switch (where) + { + case 0: /* center it in the top-right quadrant */ + x = (sw/2 + w) / 2 + (sw/2) - w; + y = (sh/2 + h) / 2 - h; + break; + case 1: /* center it in the bottom-right quadrant */ + x = (sw/2 + w) / 2 + (sw/2) - w; + y = (sh/2 + h) / 2 + (sh/2) - h; + break; + case 2: /* center it on the screen */ + x = (sw + w) / 2 - w; + y = (sh + h) / 2 - h; + break; + default: + abort (); + } + if (x + w > sw) x = sw - w; + if (y + h > sh) y = sh - h; + ac = 0; + XtSetArg (av [ac], XtNx, x); ac++; + XtSetArg (av [ac], XtNy, y); ac++; + XtSetArg (av [ac], XtNoverrideRedirect, True); ac++; + +#ifdef HAVE_MOTIF + XtSetArg (av [ac], XmNdefaultPosition, False); ac++; +#endif /* HAVE_MOTIF */ + + XtSetValues (dialog, av, ac); + XtSetValues (form, av, ac); + +#ifdef HAVE_ATHENA + XtPopup (dialog, XtGrabNone); +#else /* HAVE_MOTIF */ + XtManageChild (form); +#endif /* HAVE_MOTIF */ + + steal_focus_and_colormap (dialog); +} + + +static void +make_screenhack_dialog (saver_info *si) +{ + saver_screen_info *ssi = si->default_screen; + Widget parent = ssi->toplevel_shell; + char **hacks = si->prefs.screenhacks; + + if (ssi->demo_cmap && + ssi->demo_cmap != ssi->cmap && + ssi->demo_cmap != DefaultColormapOfScreen (ssi->screen)) + { + XFreeColormap (si->dpy, ssi->demo_cmap); + ssi->demo_cmap = 0; + } + + if (ssi->default_visual == DefaultVisualOfScreen (ssi->screen)) + ssi->demo_cmap = DefaultColormapOfScreen (ssi->screen); + else + ssi->demo_cmap = XCreateColormap (si->dpy, + RootWindowOfScreen (ssi->screen), + ssi->default_visual, AllocNone); + + create_demo_dialog (parent, ssi->default_visual, ssi->demo_cmap); + format_into_label (label1, si->version); + + add_button_callback (next, next_cb, (XtPointer) si); + add_button_callback (prev, prev_cb, (XtPointer) si); + add_button_callback (done, done_cb, (XtPointer) si); + add_button_callback (restart, restart_cb, (XtPointer) si); + add_button_callback (edit, edit_cb, (XtPointer) si); + +#ifdef HAVE_MOTIF + XtAddCallback (demo_list, XmNbrowseSelectionCallback, + select_cb, (XtPointer) si); + XtAddCallback (demo_list, XmNdefaultActionCallback, + select_cb, (XtPointer) si); + XtAddCallback (text_line, XmNactivateCallback, text_cb, (XtPointer) si); + + for (; *hacks; hacks++) + { + XmString xmstr = XmStringCreate (*hacks, XmSTRING_DEFAULT_CHARSET); + XmListAddItem (demo_list, xmstr, 0); + XmStringFree (xmstr); + } + +#else /* HAVE_ATHENA */ + + XtVaSetValues (demo_list, + XtNlist, hacks, + XtNnumberStrings, si->prefs.screenhacks_count, + 0); + XtAddCallback (demo_list, XtNcallback, select_cb, si); + +#endif /* HAVE_ATHENA */ + + pop_up_dialog_box(demo_dialog, demo_form, +#ifdef DEBUG + (si->prefs.debug_p ? 69 : 0) + +#endif + 0); +} + + +/* the Screensaver Parameters dialog */ + +static struct resources { + int timeout, cycle, secs, ticks, lock_time, passwd_time; + int verb, cmap, fade, unfade, lock_p; +} res; + + +static void +hack_time_cb (Display *dpy, char *line, int *store, Bool sec_p) +{ + if (*line) + { + int value; + value = parse_time (line, sec_p, True); + if (value < 0) + /*XBell (dpy, 0)*/; + else + *store = value; + } +} + +static void +res_sec_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + hack_time_cb (XtDisplay (button), get_text_string (button), + (int *) client_data, True); +} + +static void +res_min_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + hack_time_cb (XtDisplay (button), get_text_string (button), + (int *) client_data, False); +} + +static void +res_int_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + char *line = get_text_string (button); + int *store = (int *) client_data; + unsigned int value; + char c; + if (! *line) + ; + else if (sscanf (line, "%u%c", &value, &c) != 1) + XBell (XtDisplay (button), 0); + else + *store = value; +} + +static void +res_bool_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + int *store = (int *) client_data; +#ifdef HAVE_MOTIF + *store = ((XmToggleButtonCallbackStruct *) call_data)->set; +#else /* HAVE_ATHENA */ + Boolean state = FALSE; + XtVaGetValues (button, XtNstate, &state, NULL); + *store = state; +#endif /* HAVE_ATHENA */ +} + +static void +res_cancel_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + XtDestroyWidget (resources_dialog); + resources_dialog = 0; + raise_screenhack_dialog (); +} + + +static void +res_done_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + saver_info *si = (saver_info *) client_data; + saver_preferences *p = &si->prefs; + + res_cancel_cb (button, client_data, call_data); + +#ifdef HAVE_ATHENA + /* Check all text widgets, since we don't have callbacks for these. */ + res_min_cb (timeout_text, (XtPointer) &res.timeout, NULL); + res_min_cb (cycle_text, (XtPointer) &res.cycle, NULL); + res_sec_cb (fade_text, (XtPointer) &res.secs, NULL); + res_int_cb (ticks_text, (XtPointer) &res.ticks, NULL); + res_min_cb (lock_time_text, (XtPointer) &res.lock_time, NULL); + res_sec_cb (passwd_time_text, (XtPointer) &res.passwd_time, NULL); +#endif /* HAVE_ATHENA */ + + /* Throttle the timeouts to minimum sane values. */ + if (res.timeout < 5) res.timeout = 5; + if (res.cycle < 2) res.cycle = 2; + if (res.passwd_time < 10) res.passwd_time = 10; + + p->timeout = res.timeout * 1000; + p->cycle = res.cycle * 1000; + p->lock_timeout = res.lock_time * 1000; +#ifndef NO_LOCKING + p->passwd_timeout = res.passwd_time * 1000; +#endif + p->fade_seconds = res.secs; + p->fade_ticks = res.ticks; + p->verbose_p = res.verb; + p->install_cmap_p = res.cmap; + p->fade_p = res.fade; + p->unfade_p = res.unfade; + p->lock_p = res.lock_p; + +#ifdef DEBUG + if (p->debug_p && p->verbose_p) + fprintf (stderr, "%s: parameters changed:\n\ + timeout: %d\n\tcycle: %d\n\tlock: %d\n\tpasswd: %d\n\ + fade: %d\n\tfade: %d\n\tverbose: %d\n\tinstall: %d\n\ + fade: %d\n\tunfade: %d\n\tlock: %d\n", + progname, p->timeout, p->cycle, p->lock_timeout, +# ifdef NO_LOCKING + 0, +# else + p->passwd_timeout, +# endif + p->fade_seconds, p->fade_ticks, p->verbose_p, p->install_cmap_p, + p->fade_p, p->unfade_p, p->lock_p); +#endif /* DEBUG */ + +#if defined(HAVE_MIT_SAVER_EXTENSION) || defined(HAVE_SGI_SAVER_EXTENSION) + if (p->use_mit_saver_extension || p->use_sgi_saver_extension) + { + /* Need to set the server timeout to the new one the user has picked. + */ + int server_timeout, server_interval, prefer_blank, allow_exp; + XGetScreenSaver (si->dpy, &server_timeout, &server_interval, + &prefer_blank, &allow_exp); + if (server_timeout != (p->timeout / 1000)) + { + server_timeout = (p->timeout / 1000); + if (p->verbose_p) + fprintf (stderr, + "%s: configuring server for saver timeout of %d seconds.\n", + progname, server_timeout); + /* Leave all other parameters the same. */ + XSetScreenSaver (si->dpy, server_timeout, server_interval, + prefer_blank, allow_exp); + } + } +#endif /* HAVE_MIT_SAVER_EXTENSION || HAVE_SGI_SAVER_EXTENSION */ +} + + +static void +make_resources_dialog (saver_info *si, Widget parent) +{ + saver_screen_info *ssi = si->default_screen; + + if (ssi->demo_cmap && + ssi->demo_cmap != ssi->cmap && + ssi->demo_cmap != DefaultColormapOfScreen (ssi->screen)) + { + XFreeColormap (si->dpy, ssi->demo_cmap); + ssi->demo_cmap = 0; + } + + if (ssi->default_visual == DefaultVisualOfScreen (ssi->screen)) + ssi->demo_cmap = DefaultColormapOfScreen (ssi->screen); + else + ssi->demo_cmap = XCreateColormap (si->dpy, + RootWindowOfScreen (ssi->screen), + ssi->default_visual, AllocNone); + + create_resources_dialog (parent, ssi->default_visual, ssi->demo_cmap); + + add_button_callback (res_done, res_done_cb, (XtPointer) si); + add_button_callback (res_cancel, res_cancel_cb, (XtPointer) si); + +#define CB(widget,type,slot) \ + add_text_callback ((widget), (type), (XtPointer) (slot)) +#define CBT(widget,type,slot) \ + add_toggle_callback ((widget), (type), (XtPointer) (slot)) + +#ifdef HAVE_MOTIF + /* When using Athena widgets, we can't set callbacks for these, + so we'll check them all if "done" gets pressed. + */ + CB (timeout_text, res_min_cb, &res.timeout); + CB (cycle_text, res_min_cb, &res.cycle); + CB (fade_text, res_sec_cb, &res.secs); + CB (ticks_text, res_int_cb, &res.ticks); + CB (lock_time_text, res_min_cb, &res.lock_time); + CB (passwd_time_text, res_sec_cb, &res.passwd_time); +#endif /* HAVE_MOTIF */ + + CBT (verbose_toggle, res_bool_cb, &res.verb); + CBT (cmap_toggle, res_bool_cb, &res.cmap); + CBT (fade_toggle, res_bool_cb, &res.fade); + CBT (unfade_toggle, res_bool_cb, &res.unfade); + CBT (lock_toggle, res_bool_cb, &res.lock_p); +#undef CB +#undef CBT + + if (si->locking_disabled_p) + { + disable_widget (passwd_time_text); + disable_widget (lock_time_text); + disable_widget (lock_toggle); + } + if (CellsOfScreen (XtScreen (parent)) <= 2) + { + disable_widget (fade_text); + disable_widget (ticks_text); + disable_widget (cmap_toggle); + disable_widget (fade_toggle); + disable_widget (unfade_toggle); + } +} + + +static void +fmt_time (char *buf, unsigned int s, int min_p) +{ + unsigned int h = 0, m = 0; + if (s >= 60) + { + m += (s / 60); + s %= 60; + } + if (m >= 60) + { + h += (m / 60); + m %= 60; + } +/* + if (min_p && h == 0 && s == 0) + sprintf (buf, "%u", m); + else if (!min_p && h == 0 && m == 0) + sprintf (buf, "%u", s); + else + if (h == 0) + sprintf (buf, "%u:%02u", m, s); + else +*/ + sprintf (buf, "%u:%02u:%02u", h, m, s); +} + +static void +pop_resources_dialog (saver_info *si) +{ + saver_preferences *p = &si->prefs; + char buf [100]; + + res.timeout = p->timeout / 1000; + res.cycle = p->cycle / 1000; + res.lock_time = p->lock_timeout / 1000; +#ifndef NO_LOCKING + res.passwd_time = p->passwd_timeout / 1000; +#endif + res.secs = p->fade_seconds; + res.ticks = p->fade_ticks; + res.verb = p->verbose_p; + res.cmap = p->install_cmap_p; + res.fade = p->fade_p; + res.unfade = p->unfade_p; + res.lock_p = (p->lock_p && !si->locking_disabled_p); + + fmt_time (buf, res.timeout, 1); set_text_string (timeout_text, buf); + fmt_time (buf, res.cycle, 1); set_text_string (cycle_text, buf); + fmt_time (buf, res.lock_time, 1); set_text_string (lock_time_text, buf); + fmt_time (buf, res.passwd_time, 0); set_text_string (passwd_time_text, buf); + fmt_time (buf, res.secs, 0); set_text_string (fade_text, buf); + sprintf (buf, "%u", res.ticks); set_text_string (ticks_text, buf); + + set_toggle_button_state (verbose_toggle, res.verb); + set_toggle_button_state (cmap_toggle, res.cmap); + set_toggle_button_state (fade_toggle, res.fade); + set_toggle_button_state (unfade_toggle, res.unfade); + set_toggle_button_state (lock_toggle, res.lock_p); + + pop_up_dialog_box (resources_dialog, resources_form, +#ifdef DEBUG + (si->prefs.debug_p ? 69 : 0) + +#endif + 1); +} + + +/* The main demo-mode command loop. + */ + +void +demo_mode (saver_info *si) +{ + saver_preferences *p = &si->prefs; + si->dbox_up_p = True; + initialize_screensaver_window (si); + raise_window (si, True, False, False); + make_screenhack_dialog (si); + while (si->demo_mode_p) + { + XEvent event; + XtAppNextEvent (si->app, &event); + switch (event.xany.type) + { + case 0: /* synthetic "timeout" event */ + break; + + case ClientMessage: + handle_clientmessage (si, &event, False); + break; + + case CreateNotify: + if (!p->use_xidle_extension && + !p->use_mit_saver_extension && + !p->use_sgi_saver_extension) + { + start_notice_events_timer (si, event.xcreatewindow.window); +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: starting notice_events_timer for 0x%X (%lu)\n", + progname, + (unsigned int) event.xcreatewindow.window, + p->notice_events_timeout); +#endif /* DEBUG_TIMERS */ + } + break; + + case ButtonPress: + case ButtonRelease: + if (!XtWindowToWidget (si->dpy, event.xbutton.window)) + raise_screenhack_dialog (); + /* fall through */ + + default: +#ifdef HAVE_MIT_SAVER_EXTENSION + if (event.type == si->mit_saver_ext_event_number) + { + /* Get the "real" server window(s) out of the way as soon + as possible. */ + int i = 0; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->server_mit_saver_window && + window_exists_p (si->dpy, ssi->server_mit_saver_window)) + XUnmapWindow (si->dpy, ssi->server_mit_saver_window); + } + } + else +#endif /* HAVE_MIT_SAVER_EXTENSION */ + + XtDispatchEvent (&event); + break; + } + } + destroy_screenhack_dialogs (si); + initialize_screensaver_window (si); + + si->demo_mode_p = True; /* kludge to inhibit unfade... */ + unblank_screen (si); + si->demo_mode_p = False; +} + +static void +demo_mode_hack (saver_info *si, char *hack) +{ + if (! si->demo_mode_p) abort (); + kill_screenhack (si); + if (! si->demo_hack) + blank_screen (si); + si->demo_hack = hack; + spawn_screenhack (si, False); + /* raise_screenhack_dialog(); */ +} + +static void +demo_mode_done (saver_info *si) +{ + kill_screenhack (si); + if (si->demo_hack) + unblank_screen (si); + si->demo_mode_p = False; + si->dbox_up_p = False; + si->demo_hack = 0; +} diff --git a/driver/dialogs-Xaw.c b/driver/dialogs-Xaw.c new file mode 100644 index 00000000..17938136 --- /dev/null +++ b/driver/dialogs-Xaw.c @@ -0,0 +1,311 @@ +/* dialogs-Xaw.c --- Athena widgets for demo, options, and password dialogs. + * xscreensaver, Copyright (c) 1997 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. + * + * Most of this code contributed by Jon A. Christopher + * Copyright 1997, with the same permissions as above. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "visual.h" /* for visual_depth() */ + +Widget passwd_dialog; +Widget passwd_form; +Widget roger_label; +Widget passwd_label1; +Widget passwd_label3; +/*Widget passwd_text;*/ +/*Widget passwd_done;*/ +/*Widget passwd_cancel;*/ + +Widget resources_dialog; +Widget resources_form; +Widget timeout_text; +Widget cycle_text; +Widget fade_text; +Widget ticks_text; +Widget lock_time_text; +Widget passwd_time_text; +Widget verbose_toggle; +Widget cmap_toggle; +Widget fade_toggle; +Widget unfade_toggle; +Widget lock_toggle; +Widget res_done; +Widget res_cancel; + +Widget demo_dialog; +Widget demo_form; +Widget label1; +/*Widget label2;*/ +/*Widget text_area;*/ +Widget demo_list; +Widget text_line; +/*Widget vline;*/ +Widget next; +Widget prev; +Widget edit; +Widget done; +Widget restart; +/*Widget spacer;*/ + + +static Widget buttonbox, textbox, okbox; + + +void +create_passwd_dialog(Widget parent, Visual *visual, Colormap colormap) +{ + Widget box, passwd_label2; + int depth = visual_depth(XtScreen(parent), visual); + + passwd_dialog = + XtVaCreatePopupShell("passwd_dialog", transientShellWidgetClass, parent, + XtNtitle, NULL, + XtNoverrideRedirect, TRUE, + XtNvisual, visual, + XtNcolormap, colormap, + XtNdepth, depth, + NULL); + + box = XtVaCreateManagedWidget("box", formWidgetClass, passwd_dialog, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNtop, XtChainTop, + XtNbottom, XtChainBottom, + XtNvisual, visual, + XtNcolormap, colormap, + XtNdepth, depth, + NULL); + + roger_label = XtVaCreateManagedWidget("roger", labelWidgetClass, box, + XtNlabel, "", + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNtop, XtChainTop, + NULL); + + passwd_label1 = XtVaCreateManagedWidget("label1", labelWidgetClass, box, + XtNfromHoriz, roger_label, + XtNright, XtChainRight, + XtNtop, XtChainTop, + NULL); + passwd_label2 = XtVaCreateManagedWidget("label2", labelWidgetClass, box, + XtNfromHoriz, roger_label, + XtNright, XtChainRight, + XtNfromVert, passwd_label1, + NULL); + passwd_label3 = XtVaCreateManagedWidget("label3", labelWidgetClass, box, + XtNfromHoriz, roger_label, + XtNright, XtChainRight, + XtNfromVert, passwd_label2, + NULL); + + passwd_form = + XtVaCreateManagedWidget("passwd_form", dialogWidgetClass, box, + XtNfromHoriz, roger_label, + XtNright, XtChainRight, + XtNfromVert, passwd_label3, + NULL); +} + + +void +create_resources_dialog(Widget parent, Visual *visual, Colormap colormap) +{ + Widget rlabel; + int depth = visual_depth(XtScreen(parent), visual); + + resources_dialog = + XtVaCreatePopupShell("resources_dialog", transientShellWidgetClass, parent, + XtNtitle, NULL, + XtNoverrideRedirect, TRUE, + XtNvisual, visual, + XtNcolormap, colormap, + XtNdepth, depth, + NULL); + + resources_form = + XtVaCreateManagedWidget("resources_form", formWidgetClass, + resources_dialog, + XtNvisual, visual, + XtNcolormap, colormap, + XtNdepth, depth, + NULL); + + rlabel = XtVaCreateManagedWidget("label1", labelWidgetClass, resources_form, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNtop, XtChainTop, + NULL); + + textbox= + XtVaCreateManagedWidget("textbox", formWidgetClass, resources_form, + XtNleft, XtChainLeft, + XtNfromVert, rlabel, + NULL); + okbox= + XtVaCreateManagedWidget("textbox", boxWidgetClass, resources_form, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNfromVert, textbox, + XtNorientation, XtorientHorizontal, + NULL); + timeout_text= + XtVaCreateManagedWidget("timeout", dialogWidgetClass, textbox, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNtop, XtChainTop, + NULL); + cycle_text= + XtVaCreateManagedWidget("cycle", dialogWidgetClass, textbox, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNfromVert, timeout_text, + NULL); + fade_text= + XtVaCreateManagedWidget("fade", dialogWidgetClass, textbox, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNfromVert, cycle_text, + NULL); + + ticks_text = + XtVaCreateManagedWidget("ticks", dialogWidgetClass, textbox, + XtNtop, XtChainTop, + XtNright, XtChainRight, + XtNfromHoriz, timeout_text, + NULL); + + lock_time_text = + XtVaCreateManagedWidget("lockTime", dialogWidgetClass, textbox, + XtNfromVert, ticks_text, + XtNright, XtChainRight, + XtNfromHoriz, cycle_text, + NULL); + + passwd_time_text = + XtVaCreateManagedWidget("passwdTime", dialogWidgetClass, textbox, + XtNfromVert, lock_time_text, + XtNright, XtChainRight, + XtNfromHoriz, fade_text, + NULL); + + buttonbox= + XtVaCreateManagedWidget("buttonbox", boxWidgetClass, resources_form, + XtNfromVert, rlabel, + XtNfromHoriz, textbox, + XtNright, XtChainRight, + XtNorientation, XtorientVertical, + NULL); + verbose_toggle = + XtVaCreateManagedWidget("verbose", toggleWidgetClass, buttonbox, + NULL); + cmap_toggle = + XtVaCreateManagedWidget("cmap", toggleWidgetClass, buttonbox, + NULL); + fade_toggle = + XtVaCreateManagedWidget("fade", toggleWidgetClass, buttonbox, + NULL); + unfade_toggle = + XtVaCreateManagedWidget("unfade", toggleWidgetClass, buttonbox, + NULL); + lock_toggle = + XtVaCreateManagedWidget("lock", toggleWidgetClass, buttonbox, + NULL); + + + res_done = XtVaCreateManagedWidget("done", commandWidgetClass, okbox, + NULL); + res_cancel = XtVaCreateManagedWidget("cancel", commandWidgetClass, okbox, + NULL); +} + +void +create_demo_dialog(Widget parent, Visual *visual, Colormap colormap) +{ + Widget subform, box, viewport, label2; + int depth = visual_depth(XtScreen(parent), visual); + + demo_dialog = + XtVaCreatePopupShell("demo_dialog", transientShellWidgetClass, parent, + XtNtitle, NULL, + XtNoverrideRedirect, TRUE, + XtNvisual, visual, + XtNcolormap, colormap, + XtNdepth, depth, + NULL); + + demo_form = + XtVaCreateManagedWidget("demo_form", formWidgetClass, demo_dialog, + XtNvisual, visual, + XtNcolormap, colormap, + XtNdepth, depth, + NULL); + + label1 = XtVaCreateManagedWidget("label1", labelWidgetClass, demo_form, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNtop, XtChainTop, + NULL); + + label2 = XtVaCreateManagedWidget("label2", labelWidgetClass, demo_form, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNfromVert, label1, + NULL); + + subform= + XtVaCreateManagedWidget("subform", formWidgetClass, demo_form, + XtNleft, XtChainLeft, + XtNright, XtChainRight, + XtNfromVert, label2, + XtNbottom, XtChainBottom, + NULL); + viewport= + XtVaCreateManagedWidget("viewport", viewportWidgetClass, subform, + XtNallowVert, TRUE, + XtNallowHoriz, TRUE, + XtNforceBars, TRUE, + NULL); + + demo_list = XtVaCreateManagedWidget("demo_list", listWidgetClass, viewport, + XtNverticalList, TRUE, + XtNdefaultColumns, 1, + NULL); + box= + XtVaCreateManagedWidget("box", boxWidgetClass, demo_form, + XtNfromHoriz, subform, + XtNfromVert, label2, + XtNbottom, XtChainBottom, + XtNright, XtChainRight, + NULL); + prev = XtVaCreateManagedWidget("prev", commandWidgetClass, box, NULL); + next = XtVaCreateManagedWidget("next", commandWidgetClass, box, NULL); + edit = XtVaCreateManagedWidget("edit", commandWidgetClass, box, NULL); + restart = XtVaCreateManagedWidget("restart", commandWidgetClass, box, NULL); + done = XtVaCreateManagedWidget("done", commandWidgetClass, box, NULL); +} diff --git a/driver/dialogs-Xm.c b/driver/dialogs-Xm.c new file mode 100644 index 00000000..0daa7b35 --- /dev/null +++ b/driver/dialogs-Xm.c @@ -0,0 +1,701 @@ +/* dialogs-Xm.c --- Motif widgets for demo, options, and password dialogs. + * xscreensaver, Copyright (c) 1993-1997 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. + */ + +/* The code in this file started off its life as the output of XDesigner, + but I've since hacked it by hand... It's a mess, avert your eyes. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "visual.h" /* for visual_depth() */ + +Widget passwd_dialog; +Widget passwd_form; +Widget roger_label; +Widget passwd_label1; +Widget passwd_label3; +Widget passwd_text; +Widget passwd_done; +Widget passwd_cancel; + +Widget resources_dialog; +Widget resources_form; +Widget timeout_text; +Widget cycle_text; +Widget fade_text; +Widget ticks_text; +Widget lock_time_text; +Widget passwd_time_text; +Widget verbose_toggle; +Widget cmap_toggle; +Widget fade_toggle; +Widget unfade_toggle; +Widget lock_toggle; +Widget res_done; +Widget res_cancel; + +Widget demo_dialog; +Widget demo_form; +Widget label1; +Widget label2; +Widget text_area; +Widget demo_list; +Widget text_line; +Widget vline; +Widget next; +Widget prev; +Widget edit; +Widget done; +Widget restart; +Widget spacer; + + +void +create_passwd_dialog(Widget parent, Visual *visual, Colormap colormap) +{ + Widget shell; + Widget form1; + Widget roger; + Widget dialog; + Widget form2; + Widget label1, label2, label3; + Widget text; + Widget ok, cancel; + Widget w; + Arg al[64]; + int ac = 0; + + ac = 0; + XtSetArg (al[ac], XmNvisual, visual); ac++; + XtSetArg (al[ac], XmNcolormap, colormap); ac++; + XtSetArg (al[ac], XmNdepth, visual_depth(XtScreen(parent), visual)); ac++; + + shell = XmCreateDialogShell (parent, "passwdDialog", al, ac); + + form1 = XmCreateForm (shell, "form", 0, 0); + + roger = XmCreateDrawnButton (form1, "rogerLabel", 0, 0); + + dialog = XmCreateSelectionBox (form1, "passwdForm", al, ac); + + form2 = XmCreateForm ( dialog, "form", 0, 0); + label1 = XmCreateLabel ( form2, "passwdLabel1", 0, 0); + label2 = XmCreateLabel ( form2, "passwdLabel2", 0, 0); + label3 = XmCreateLabel ( form2, "passwdLabel3", 0, 0); + + text = XmSelectionBoxGetChild (dialog, XmDIALOG_TEXT); + ok = XmSelectionBoxGetChild (dialog, XmDIALOG_OK_BUTTON); + cancel = XmSelectionBoxGetChild (dialog, XmDIALOG_CANCEL_BUTTON); + + w = XmSelectionBoxGetChild (dialog, XmDIALOG_LIST_LABEL); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (dialog, XmDIALOG_LIST); + if (w) XtUnmanageChild (XtParent(w)); + w = XmSelectionBoxGetChild (dialog, XmDIALOG_SELECTION_LABEL); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (dialog, XmDIALOG_SEPARATOR); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (dialog, XmDIALOG_APPLY_BUTTON); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (dialog, XmDIALOG_HELP_BUTTON); + if (w) XtUnmanageChild (w); + + XtVaSetValues(label1, + XmNtopAttachment, XmATTACH_FORM, + XmNleftAttachment, XmATTACH_FORM, + XmNrightAttachment, XmATTACH_FORM, + XmNbottomAttachment, XmATTACH_NONE, + 0); + XtVaSetValues(label2, + XmNtopAttachment, XmATTACH_WIDGET, + XmNtopWidget, label1, + XmNleftAttachment, XmATTACH_FORM, + XmNrightAttachment, XmATTACH_FORM, + XmNbottomAttachment, XmATTACH_NONE, + 0); + XtVaSetValues(label3, + XmNtopAttachment, XmATTACH_WIDGET, + XmNtopWidget, label2, + XmNleftAttachment, XmATTACH_FORM, + XmNrightAttachment, XmATTACH_FORM, + XmNbottomAttachment, XmATTACH_FORM, + 0); + + XtVaSetValues(roger, + XmNsensitive, FALSE, + XmNtopAttachment, XmATTACH_FORM, + XmNleftAttachment, XmATTACH_FORM, + XmNrightAttachment, XmATTACH_NONE, + XmNbottomAttachment, XmATTACH_FORM, + 0); + XtVaSetValues(dialog, + XmNtopAttachment, XmATTACH_FORM, + XmNleftAttachment, XmATTACH_WIDGET, + XmNleftWidget, roger, + XmNrightAttachment, XmATTACH_FORM, + XmNbottomAttachment, XmATTACH_FORM, + 0); + + XtManageChild(label1); + XtManageChild(label2); + XtManageChild(label3); + + XtManageChild(form2); + XtManageChild(text); + XtManageChild(ok); + XtManageChild(cancel); + + XtManageChild(roger); + XtManageChild(dialog); + + { + Dimension width = 0, height = 0; + XtRealizeWidget(form1); + XtVaGetValues(roger, XmNwidth, &width, XmNheight, &height, 0); + if (width == height) + ; + else if (width > height) + XtVaSetValues(roger, XmNwidth, width, XmNheight, width, 0); + else + XtVaSetValues(roger, XmNwidth, height, XmNheight, height, 0); + } + + passwd_dialog = shell; + passwd_form = form1; + roger_label = roger; + passwd_label1 = label1; + passwd_label3 = label3; + passwd_text = text; + passwd_done = ok; + passwd_cancel = cancel; +} + + + +void +create_resources_dialog(Widget parent, Visual *visual, Colormap colormap) +{ + Widget children[22]; /* Children to manage */ + Arg al[64]; /* Arg List */ + register int ac = 0; /* Arg Count */ + Widget widget12; + Widget widget13; + Widget widget14; + Widget widget15; + Widget widget16; + Widget widget17; + Widget widget18; + Widget widget48; + Widget widget29; + + Widget real_dialog; + Widget w; + + ac = 0; + XtSetArg (al[ac], XmNvisual, visual); ac++; + XtSetArg (al[ac], XmNcolormap, colormap); ac++; + XtSetArg (al[ac], XmNdepth, visual_depth(XtScreen(parent), visual)); ac++; + + real_dialog = XmCreatePromptDialog (parent, "resourcesForm", al, ac); + resources_dialog = XtParent(real_dialog); + + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SEPARATOR); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_TEXT); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SELECTION_LABEL); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_HELP_BUTTON); + if (w) XtUnmanageChild (w); + + ac = 0; + XtSetArg (al [ac], XmNtopAttachment, XmATTACH_FORM); ac++; + XtSetArg (al [ac], XmNbottomAttachment, XmATTACH_FORM); ac++; + XtSetArg (al [ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg (al [ac], XmNrightAttachment, XmATTACH_FORM); ac++; + resources_form = XmCreateForm (real_dialog, "form", al, ac); + XtManageChild (resources_form); + + ac = 0; + + widget12 = XmCreateLabel ( resources_form, "resourcesLabel", al, ac ); + widget13 = XmCreateSeparator ( resources_form, "separator", al, ac ); + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++; + widget14 = XmCreateLabel ( resources_form, "timeoutLabel", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++; + widget15 = XmCreateLabel ( resources_form, "cycleLabel", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++; + widget16 = XmCreateLabel ( resources_form, "fadeSecondsLabel", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++; + widget17 = XmCreateLabel ( resources_form, "fadeTicksLabel", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++; + widget18 = XmCreateLabel ( resources_form, "lockLabel", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++; + widget48 = XmCreateLabel ( resources_form, "passwdLabel", al, ac ); + ac = 0; + timeout_text = XmCreateTextField ( resources_form, "timeoutText", al, ac ); + cycle_text = XmCreateTextField ( resources_form, "cycleText", al, ac ); + fade_text = XmCreateTextField ( resources_form, "fadeSecondsText", al, ac ); + ticks_text = XmCreateTextField ( resources_form, "fadeTicksText", al, ac ); + lock_time_text = XmCreateTextField ( resources_form, "passwdText", al, ac ); + passwd_time_text = XmCreateTextField ( resources_form, "lockText", al, ac ); + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + verbose_toggle = XmCreateToggleButton ( resources_form, "verboseToggle", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + cmap_toggle = XmCreateToggleButton ( resources_form, "cmapToggle", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + fade_toggle = XmCreateToggleButton ( resources_form, "fadeToggle", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + unfade_toggle = XmCreateToggleButton ( resources_form, "unfadeToggle", al, ac ); + ac = 0; + XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + lock_toggle = XmCreateToggleButton ( resources_form, "lockToggle", al, ac ); + ac = 0; + widget29 = XmCreateSeparator ( resources_form, "separator", al, ac ); + + res_done = XmSelectionBoxGetChild (real_dialog, XmDIALOG_OK_BUTTON); + res_cancel = XmSelectionBoxGetChild (real_dialog, XmDIALOG_CANCEL_BUTTON); + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 4); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetValues ( widget12,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNtopWidget, widget12); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 0); ac++; + XtSetValues ( widget13,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNtopWidget, widget13); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomWidget, timeout_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 20); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetArg(al[ac], XmNrightWidget, timeout_text); ac++; + XtSetValues ( widget14,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, cycle_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, cycle_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 20); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetArg(al[ac], XmNrightWidget, cycle_text); ac++; + XtSetValues ( widget15,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, fade_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, fade_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 20); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetArg(al[ac], XmNrightWidget, fade_text); ac++; + XtSetValues ( widget16,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, ticks_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, ticks_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 20); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetArg(al[ac], XmNrightWidget, ticks_text); ac++; + XtSetValues ( widget17,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, lock_time_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, lock_time_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 19); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetArg(al[ac], XmNrightWidget, lock_time_text); ac++; + XtSetValues ( widget18,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, passwd_time_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, passwd_time_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 14); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetArg(al[ac], XmNrightWidget, passwd_time_text); ac++; + XtSetValues ( widget48,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNtopWidget, widget13); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 141); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; + XtSetValues ( timeout_text,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 2); ac++; + XtSetArg(al[ac], XmNtopWidget, timeout_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, timeout_text); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; + XtSetValues ( cycle_text,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 2); ac++; + XtSetArg(al[ac], XmNtopWidget, cycle_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, cycle_text); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; + XtSetValues ( fade_text,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 2); ac++; + XtSetArg(al[ac], XmNtopWidget, fade_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, fade_text); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; + XtSetValues ( ticks_text,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 2); ac++; + XtSetArg(al[ac], XmNtopWidget, ticks_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, ticks_text); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; + XtSetValues ( lock_time_text,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNtopWidget, lock_time_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, lock_time_text); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; + XtSetValues ( passwd_time_text,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNtopWidget, widget13); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, timeout_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 20); ac++; + XtSetArg(al[ac], XmNleftWidget, timeout_text); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 20); ac++; + XtSetValues ( verbose_toggle,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, cycle_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, cycle_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, verbose_toggle); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 20); ac++; + XtSetValues ( cmap_toggle,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, fade_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, fade_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, cmap_toggle); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 20); ac++; + XtSetValues ( fade_toggle,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, ticks_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, ticks_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, fade_toggle); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 20); ac++; + XtSetValues ( unfade_toggle,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, lock_time_text); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNbottomOffset, 0); ac++; + XtSetArg(al[ac], XmNbottomWidget, lock_time_text); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; + XtSetArg(al[ac], XmNleftOffset, 0); ac++; + XtSetArg(al[ac], XmNleftWidget, unfade_toggle); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 20); ac++; + XtSetValues ( lock_toggle,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 0); ac++; + XtSetArg(al[ac], XmNtopWidget, passwd_time_text); ac++; + + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNbottomOffset, 4); ac++; + + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetValues ( widget29,al, ac ); + ac = 0; + + + + ac = 0; + children[ac++] = widget12; + children[ac++] = widget13; + children[ac++] = widget14; + children[ac++] = widget15; + children[ac++] = widget16; + children[ac++] = widget17; + children[ac++] = widget18; + children[ac++] = widget48; + children[ac++] = timeout_text; + children[ac++] = cycle_text; + children[ac++] = fade_text; + children[ac++] = ticks_text; + children[ac++] = lock_time_text; + children[ac++] = passwd_time_text; + children[ac++] = verbose_toggle; + children[ac++] = cmap_toggle; + children[ac++] = fade_toggle; + children[ac++] = unfade_toggle; + children[ac++] = lock_toggle; + children[ac++] = widget29; + + XtManageChildren(children, ac); + ac = 0; + + resources_form = real_dialog; +} + + +void +create_demo_dialog(Widget parent, Visual *visual, Colormap colormap) +{ + Arg al[64]; /* Arg List */ + register int ac = 0; /* Arg Count */ + + Widget real_dialog; + Widget w; + + + ac = 0; + XtSetArg (al[ac], XmNvisual, visual); ac++; + XtSetArg (al[ac], XmNcolormap, colormap); ac++; + XtSetArg (al[ac], XmNdepth, visual_depth(XtScreen(parent), visual)); ac++; + + + real_dialog = XmCreatePromptDialog (parent, "demoForm", al, ac); + demo_dialog = XtParent(real_dialog); + + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SEPARATOR); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_TEXT); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SELECTION_LABEL); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_OK_BUTTON); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_CANCEL_BUTTON); + if (w) XtUnmanageChild (w); + w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_HELP_BUTTON); + if (w) XtUnmanageChild (w); + + ac = 0; + XtSetArg (al [ac], XmNtopAttachment, XmATTACH_FORM); ac++; + XtSetArg (al [ac], XmNbottomAttachment, XmATTACH_FORM); ac++; + XtSetArg (al [ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg (al [ac], XmNrightAttachment, XmATTACH_FORM); ac++; + demo_form = XmCreateForm (real_dialog, "form", al, ac); + XtManageChild (demo_form); + + label1 = XmCreateLabel ( demo_form, "label1", al, ac ); + label2 = XmCreateLabel ( demo_form, "label2", al, ac ); + demo_list = XmCreateScrolledList ( demo_form, "demoList", al, ac ); + text_area = XtParent ( demo_list ); + + ac = 0; + text_line = XmSelectionBoxGetChild (real_dialog, XmDIALOG_TEXT); + XtManageChild(text_line); + + /* #### ARRGH! This is apparently the only way to make hitting return in + the text field not *ALSO* activate the most-recently-selected button! + + This has the unfortunate side effect of making the buttons not be + keyboard-traversable, but that's less bad than not being able to try + out new switches by typing them into the text field. + + XmSelectionBox(3M) says in the "Additional Behavior" section: + KActivate: + Calls the activate callbacks for the button with + the keyboard focus. [... ] In a List widget or + single-line Text widget, the List or Text action + associated with KActivate is called before the + SelectionBox actions associated with KActivate." + + So they take it as a given that when running activateCallback on a single- + line Text widget, you'll also want to run activateCallback on whatever the + currently-focussed button is as well! Morons! Villains! Shitheads! + + (Perhaps there's some way to override XmSelectionBox's KActivate behavior. + I doubt it, but if there is, I don't know it.) + */ + ac = 0; + XtSetArg(al[ac], XmNtraversalOn, False); ac++; + + next = XmCreatePushButton ( real_dialog, "next", al, ac ); + prev = XmCreatePushButton ( real_dialog, "prev", al, ac ); + edit = XmCreatePushButton ( real_dialog, "edit", al, ac ); + done = XmCreatePushButton ( real_dialog, "done", al, ac ); + restart = XmCreatePushButton ( real_dialog, "restart", al, ac ); + XtManageChild(next); + XtManageChild(prev); + XtManageChild(edit); + XtManageChild(done); + XtManageChild(restart); + + ac = 0; + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNtopOffset, 5); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 4); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetValues ( label1,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNtopWidget, label1); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 4); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetValues ( label2,al, ac ); + ac = 0; + + XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; + XtSetArg(al[ac], XmNtopOffset, 4); ac++; + XtSetArg(al[ac], XmNtopWidget, label2); ac++; + XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNleftOffset, 4); ac++; + XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; + XtSetArg(al[ac], XmNrightOffset, 4); ac++; + XtSetValues ( text_area,al, ac ); + + XtManageChild(demo_list); + XtManageChild(label1); + XtManageChild(label2); + + demo_form = real_dialog; +} diff --git a/driver/dialogs.xd b/driver/dialogs.xd new file mode 100644 index 00000000..ad1f6da0 --- /dev/null +++ b/driver/dialogs.xd @@ -0,0 +1,569 @@ +module 'XScreenSaver' +applicationName = 'XScreenSaver'; +generateNameC = 'dialogs.c'; +generateNameUIL = ''; +generateNameResDB = 'dialogs.ad'; +generateUidFile = ''; +generateMask = 1507557; +useMask = 1; +value +object 'passwd_dialog' : XmDialogShell { + arguments { + name = 'passwdDialog'; + XmNtitle= 'XScreenSaver'; + XmNallowShellResize= true; + }; +object 'passwd_form' : XmForm { + arguments { + name = 'passwdForm'; + XmNautoUnmanage= false; + }; +object 'roger_label' : XmDrawnButton { + arguments { + name = 'rogerLabel'; + XmNwidth= 150; + }; +}; +object 'passwd_label1' : XmLabel { + arguments { + name = 'passwdLabel1'; + XmNlabelString= 'XScreenSaver %s'; + XmNalignment= 0; + }; +}; +object '' : XmLabel { + arguments { + name = 'passwdLabel2'; + XmNlabelString= 'This display is locked.'; + XmNalignment= 0; + }; +}; +object 'passwd_label3' : XmLabel { + arguments { + name = 'passwdLabel3'; + XmNlabelString= 'Please type %s\'s password to unlock it.'; + XmNalignment= 0; + }; +}; +object 'passwd_text' : XmTextField { + arguments { + name = 'passwdText'; + }; +}; +object '' : XmSeparator { + arguments { + }; +}; +object 'passwd_done' : XmPushButton { + arguments { + name = 'passwdDone'; + XmNlabelString= 'Done'; + }; +}; +object 'passwd_cancel' : XmPushButton { + arguments { + name = 'passwdCancel'; + XmNlabelString= 'Cancel'; + }; +}; + attachments { + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 1 0 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 1 0 4; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 3 1 4; + XmNbottomAttachment = 3 3 4; + XmNtopAttachment = 1 0 4; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 3 1 4; + XmNbottomAttachment = 3 4 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 1 0 30; + XmNleftAttachment = 3 1 4; + XmNbottomAttachment = 3 5 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 3 1 4; + XmNbottomAttachment = 3 6 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 1 0 0; + XmNleftAttachment = 3 1 0; + XmNbottomAttachment = 3 7 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 3 1 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 3 7 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 0 0 0; + }; + }; +}; +}; +object 'resources_dialog' : XmDialogShell { + arguments { + name = 'resourcesDialog'; + XmNtitle= 'XScreenSaver'; + XmNallowShellResize= true; + }; +object 'resources_form' : XmForm { + arguments { + name = 'resourcesForm'; + XmNautoUnmanage= false; + }; +object '' : XmLabel { + arguments { + name = 'resourcesLabel'; + XmNlabelString= 'XScreenSaver Parameters'; + }; +}; +object '' : XmSeparator { + arguments { + }; +}; +object '' : XmLabel { + arguments { + name = 'timeoutLabel'; + XmNlabelString= 'Timeout Minutes'; + XmNalignment= * 2; + }; +}; +object '' : XmLabel { + arguments { + name = 'cycleLabel'; + XmNlabelString= 'Cycle Seconds'; + XmNalignment= * 2; + }; +}; +object '' : XmLabel { + arguments { + name = 'fadeSecondsLabel'; + XmNlabelString= 'Fade Seconds'; + XmNalignment= * 2; + }; +}; +object '' : XmLabel { + arguments { + name = 'fadeTicksLabel'; + XmNlabelString= 'Fade Ticks'; + XmNalignment= * 2; + }; +}; +object '' : XmLabel { + arguments { + name = 'lockLabel'; + XmNlabelString= 'Lock Timeout'; + XmNalignment= * 2; + }; +}; +object '' : XmLabel { + arguments { + name = 'passwdLabel'; + XmNlabelString= 'Password Timeout'; + XmNalignment= * 2; + }; +}; +object 'timeout_text' : XmTextField { + arguments { + name = 'timeoutText'; + XmNcolumns= 5; + }; +}; +object 'cycle_text' : XmTextField { + arguments { + name = 'cycleText'; + XmNcolumns= 5; + }; +}; +object 'fade_text' : XmTextField { + arguments { + name = 'fadeSecondsText'; + XmNcolumns= 5; + }; +}; +object 'ticks_text' : XmTextField { + arguments { + name = 'fadeTicksText'; + XmNcolumns= 5; + }; +}; +object 'lock_time_text' : XmTextField { + arguments { + name = 'passwdText'; + XmNcolumns= 5; + }; +}; +object 'passwd_time_text' : XmTextField { + arguments { + name = 'lockText'; + XmNcolumns= 5; + }; +}; +object 'verbose_toggle' : XmToggleButton { + arguments { + name = 'verboseToggle'; + XmNlabelString= 'Verbose'; + XmNalignment= * 0; + }; +}; +object 'cmap_toggle' : XmToggleButton { + arguments { + name = 'cmapToggle'; + XmNlabelString= 'Install Colormap'; + XmNalignment= * 0; + }; +}; +object 'fade_toggle' : XmToggleButton { + arguments { + name = 'fadeToggle'; + XmNlabelString= 'Fade Colormap'; + XmNalignment= * 0; + }; +}; +object 'unfade_toggle' : XmToggleButton { + arguments { + name = 'unfadeToggle'; + XmNlabelString= 'Unfade Colormap'; + XmNalignment= * 0; + }; +}; +object 'lock_toggle' : XmToggleButton { + arguments { + name = 'lockToggle'; + XmNlabelString= 'Require Password'; + XmNalignment= * 0; + }; +}; +object '' : XmSeparator { + arguments { + }; +}; +object 'res_done' : XmPushButton { + arguments { + name = 'resourcesDone'; + XmNlabelString= 'Done'; + }; +}; +object 'res_cancel' : XmPushButton { + arguments { + name = 'resourcesCancel'; + XmNlabelString= 'Cancel'; + }; +}; + attachments { + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 1 0 4; + XmNtopAttachment = 1 0 4; + }; + attachment { + XmNrightAttachment = 1 0 0; + XmNleftAttachment = 1 0 0; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 1 4; + }; + attachment { + XmNrightAttachment = 3 9 4; + XmNleftAttachment = 1 0 20; + XmNbottomAttachment = 4 9; + XmNtopAttachment = 3 2 4; + }; + attachment { + XmNrightAttachment = 3 10 4; + XmNleftAttachment = 1 0 20; + XmNbottomAttachment = 4 10 0; + XmNtopAttachment = 4 10 0; + }; + attachment { + XmNrightAttachment = 3 11 4; + XmNleftAttachment = 1 0 20; + XmNbottomAttachment = 4 11 0; + XmNtopAttachment = 4 11 0; + }; + attachment { + XmNrightAttachment = 3 12 4; + XmNleftAttachment = 1 0 20; + XmNbottomAttachment = 4 12 0; + XmNtopAttachment = 4 12 0; + }; + attachment { + XmNrightAttachment = 3 13 4; + XmNleftAttachment = 1 0 19; + XmNbottomAttachment = 4 13 0; + XmNtopAttachment = 4 13 0; + }; + attachment { + XmNrightAttachment = 3 14 4; + XmNleftAttachment = 1 0 14; + XmNbottomAttachment = 4 14 0; + XmNtopAttachment = 4 14 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 1 0 141; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 2 4; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 4 9 0; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 9 2; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 4 10 0; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 10 2; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 4 11 0; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 11 2; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 4 12 0; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 12 2; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 4 13 0; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 13 4; + }; + attachment { + XmNrightAttachment = 1 0 20; + XmNleftAttachment = 3 9 20; + XmNbottomAttachment = 4 9 0; + XmNtopAttachment = 3 2 4; + }; + attachment { + XmNrightAttachment = 1 0 20; + XmNleftAttachment = 4 15 0; + XmNbottomAttachment = 4 10 0; + XmNtopAttachment = 4 10 0; + }; + attachment { + XmNrightAttachment = 1 0 20; + XmNleftAttachment = 4 16 0; + XmNbottomAttachment = 4 11 0; + XmNtopAttachment = 4 11 0; + }; + attachment { + XmNrightAttachment = 1 0 20; + XmNleftAttachment = 4 17 0; + XmNbottomAttachment = 4 12 0; + XmNtopAttachment = 4 12 0; + }; + attachment { + XmNrightAttachment = 1 0 20; + XmNleftAttachment = 4 18 0; + XmNbottomAttachment = 4 13 0; + XmNtopAttachment = 4 13 0; + }; + attachment { + XmNrightAttachment = 1 0; + XmNleftAttachment = 1 0; + XmNbottomAttachment = 3 21 4; + XmNtopAttachment = 3 14 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 1 0 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 3 21 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 0 0 0; + }; + }; +}; +}; +object 'demo_dialog' : XmDialogShell { + arguments { + name = 'demoDialog'; + XmNtitle= 'XScreenSaver'; + XmNmaxWidth= 500; + XmNallowShellResize= true; + }; +object 'demo_form' : XmForm { + arguments { + name = 'demoForm'; + XmNautoUnmanage= false; + }; +object 'label1' : XmLabel { + arguments { + name = 'label1'; + XmNlabelString= 'XScreenSaver %s'; + }; +}; +object 'label2' : XmLabel { + arguments { + name = 'label2'; + XmNlabelString= 'Copyright © 1991-1994 by Jamie Zawinski '; + }; +}; +object 'text_area' : XmScrolledList { + arguments { + name = 'textArea'; + }; +object '' : XmScrollBar { + arguments { + name = 'ListhScrollBar'; + }; +}; +object '' : XmScrollBar { + arguments { + name = 'ListvScrollBar'; + }; +}; +object 'demo_list' : XmList { + arguments { + name = 'demoList'; + XmNvisibleItemCount= 10; + XmNautomaticSelection= true; + XmNlistSizePolicy= 2; + }; +}; +}; +object 'text_line' : XmTextField { + arguments { + name = 'textLine'; + }; +}; +object 'vline' : XmSeparator { + arguments { + name = 'vline'; + }; +}; +object 'next' : XmPushButton { + arguments { + name = 'next'; + XmNlabelString= 'Run Next'; + }; +}; +object 'prev' : XmPushButton { + arguments { + name = 'prev'; + XmNlabelString= 'Run Previous'; + }; +}; +object 'edit' : XmPushButton { + arguments { + name = 'edit'; + XmNlabelString= 'Edit Parameters'; + }; +}; +object 'done' : XmPushButton { + arguments { + name = 'done'; + XmNlabelString= 'Exit Demo Mode'; + }; +}; +object 'restart' : XmPushButton { + arguments { + name = 'restart'; + XmNlabelString= 'Restart Screen Saver'; + }; +}; +object 'spacer' : XmLabel { + arguments { + name = 'spacer'; + XmNlabelString= * ' '; + }; +}; + attachments { + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 1 0 4; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 1 0 5; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 1 0 4; + XmNbottomAttachment = 0 0 0; + XmNtopAttachment = 3 1 4; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 1 0 4; + XmNbottomAttachment = 3 4 4; + XmNtopAttachment = 3 2 4; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 1 0 4; + XmNbottomAttachment = 3 5 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 1 0 4; + XmNbottomAttachment = 3 6 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 1 0 3; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 0 0 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 3 6 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 4 6 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 3 7 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 4 7 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 3 8 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 4 8 0; + }; + attachment { + XmNrightAttachment = 0 0 0; + XmNleftAttachment = 3 9 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 4 9 0; + }; + attachment { + XmNrightAttachment = 1 0 4; + XmNleftAttachment = 3 10 4; + XmNbottomAttachment = 1 0 4; + XmNtopAttachment = 4 10 0; + }; + }; +}; +}; +end module; diff --git a/driver/kpasswd.c b/driver/kpasswd.c new file mode 100644 index 00000000..ee115213 --- /dev/null +++ b/driver/kpasswd.c @@ -0,0 +1,180 @@ +/* kpasswd.c --- verify kerberos passwords. + * written by Nat Lanza (magus@cs.cmu.edu) for + * xscreensaver, Copyright (c) 1993-1997 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef NO_LOCKING /* whole file */ + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include +#include +#include +#include + +#if !defined(VMS) && !defined(HAVE_ADJUNCT_PASSWD) +# include +#endif + + +#ifdef __bsdi__ +# include +# if _BSDI_VERSION >= 199608 +# define BSD_AUTH +# endif +#endif /* __bsdi__ */ + +/* blargh */ +#undef Bool +#undef True +#undef False +#define Bool int +#define True 1 +#define False 0 + +/* The user information we need to store */ +static char realm[REALM_SZ]; +static char name[ANAME_SZ]; +static char inst[INST_SZ]; +static char *tk_file; + + +/* Called at startup to grab user, instance, and realm information + from the user's ticketfile (remember, name.inst@realm). Since we're + using tf_get_pname(), this should work even if your kerberos username + isn't the same as your local username. We grab the ticket at startup + time so that even if your ticketfile dies while the screen's locked + we'll still have the information to unlock it. + + Problems: the password dialog currently displays local username, so if + you have some non-standard name/instance when you run xscreensaver, + you'll need to remember what it was when unlocking, or else you lose. + + Also, we use des_string_to_key(), so if you have an AFS password + (encrypted with ka_StringToKey()), you'll lose. Get a kerberos password; + it isn't that hard. + + Like the original lock_init, we return false if something went wrong. + We don't use the arguments we're given, though. + */ +Bool +lock_init (int argc, char **argv) +{ + int k_errno; + + memset(name, 0, sizeof(name)); + memset(inst, 0, sizeof(inst)); + + /* find out where the user's keeping his tickets. + squirrel it away for later use. */ + tk_file = tkt_string(); + + /* open ticket file or die trying. */ + if ((k_errno = tf_init(tk_file, R_TKT_FIL))) { + return False; + } + + /* same with principal and instance names */ + if ((k_errno = tf_get_pname(name)) || + (k_errno = tf_get_pinst(inst))) { + return False; + } + + /* close the ticketfile to release the lock on it. */ + tf_close(); + + /* figure out what realm we're authenticated to. this ought + to be the local realm, but it pays to be sure. */ + if ((k_errno = krb_get_tf_realm(tk_file, realm))) { + return False; + } + + /* last-minute sanity check on what we got. */ + if ((strlen(name)+strlen(inst)+strlen(realm)+3) > + (REALM_SZ + ANAME_SZ + INST_SZ + 3)) { + return False; + } + + /* success */ + return True; +} + + +/* des_string_to_key() wants this. If C didn't suck, we could have an + anonymous function do this. Even a local one. But it does, so here + we are. Calling it ive_got_your_local_function_right_here_buddy() + would have been rude. + */ +static int +key_to_key(char *user, char *instance, char *realm, char *passwd, C_Block key) +{ + memcpy(key, passwd, sizeof(des_cblock)); + return (0); +} + +/* Called to see if the user's typed password is valid. We do this by asking + the kerberos server for a ticket and checking to see if it gave us one. + We need to move the ticketfile first, or otherwise we end up updating the + user's tkfile with new tickets. This would break services like zephyr that + like to stay authenticated, and it would screw with AFS authentication at + some sites. So, we do a quick, painful hack with a tmpfile. + */ +Bool +passwd_valid_p (const char *typed_passwd) +{ + C_Block mitkey; + Bool success; + char *newtkfile; + + /* temporarily switch to a new ticketfile. + I'm not using tmpnam() because it isn't entirely portable. + this could probably be fixed with autoconf. */ + newtkfile = malloc(80 * sizeof(char)); + memset(newtkfile, 0, sizeof(newtkfile)); + + sprintf(newtkfile, "/tmp/xscrn-%i", getpid()); + + krb_set_tkt_string(newtkfile); + + /* encrypt the typed password. if you have an AFS password instead + of a kerberos one, you lose *right here*. If you want to use AFS + passwords, you can use ka_StringToKey() instead. As always, ymmv. */ + des_string_to_key(typed_passwd, mitkey); + + if (krb_get_in_tkt(name, inst, realm, "krbtgt", realm, DEFAULT_TKT_LIFE, + key_to_key, NULL, mitkey) != 0) { + success = False; + } else { + success = True; + } + + /* quickly block out the tempfile and password to prevent snooping, + then restore the old ticketfile and cleean up a bit. */ + + dest_tkt(); + krb_set_tkt_string(tk_file); + free(newtkfile); + memset(mitkey, 0, sizeof(mitkey)); + + + /* Did we verify successfully? */ + return success; +} + +#endif /* NO_LOCKING -- whole file */ diff --git a/driver/link_axp.com b/driver/link_axp.com new file mode 100644 index 00000000..a1418927 --- /dev/null +++ b/driver/link_axp.com @@ -0,0 +1,15 @@ +$! We fisrt test the version of DECW/Motif ; if 1.2 we need to link with new +$! X11R5 libraries +$@sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version +$ if f$extract(4,3,decw$version).eqs."1.2" +$ then +$! DECW/Motif 1.2 : link with X11R5 libraries +$ link xscreensaver-command,vms_axp_12.opt/opt +$ link xscreensaver,demo,dialogs-xm,lock,passwd,stderr,subprocs,timers, - + windows,xset,vms-getpwnam,vms-hpwd,vms-validate,vms_axp_12.opt/opt +$ else +$! Else, link with X11R4 libraries +$ link xscreensaver-command,vms_axp.opt/opt +$ link xscreensaver,demo,dialogs-xm,lock,passwd,stderr,subprocs,timers, - + windows,xset,vms-getpwnam,vms-hpwd,vms-validate,vms_axp.opt/opt +$ endif diff --git a/driver/link_decc.com b/driver/link_decc.com new file mode 100644 index 00000000..d1de0d0a --- /dev/null +++ b/driver/link_decc.com @@ -0,0 +1,15 @@ +$! We fisrt test the version of DECW/Motif ; if 1.2 we need to link with new +$! X11R5 libraries +$@sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version +$ if f$extract(4,3,decw$version).eqs."1.2" +$ then +$! DECW/Motif 1.2 : link with X11R5 libraries +$ link xscreensaver-command,vms_decc_12.opt/opt +$ link xscreensaver,demo,dialogs-xm,lock,passwd,stderr,subprocs,timers, - + windows,xset,vms-getpwnam,vms-hpwd,vms-validate,vms_decc_12.opt/opt +$ else +$! Else, link with X11R4 libraries +$ link xscreensaver-command,vms_decc.opt/opt +$ link xscreensaver,demo,dialogs-xm,lock,passwd,stderr,subprocs,timers, - + windows,xset,vms-getpwnam,vms-hpwd,vms-validate,vms_decc.opt/opt +$ endif diff --git a/driver/lock.c b/driver/lock.c new file mode 100644 index 00000000..b4246c91 --- /dev/null +++ b/driver/lock.c @@ -0,0 +1,723 @@ +/* lock.c --- handling the password dialog for locking-mode. + * xscreensaver, Copyright (c) 1993-1997 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. + */ + +/* Athena locking code contributed by Jon A. Christopher */ +/* Copyright 1997, with the same permissions as above. */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef NO_LOCKING /* whole file */ + +#include +#include +#include "xscreensaver.h" + +#ifndef VMS +# include +#else /* VMS */ +extern char *getenv(const char *name); +extern int validate_user(char *name, char *password); +static char * user_vms; +#endif /* VMS */ + + +#ifdef HAVE_ATHENA + +# include +# include +# include +# include +# include + +static void passwd_done_cb (Widget, XtPointer, XtPointer); +static XtActionsRec actionsList[] = +{ + {"passwdentered", (XtActionProc) passwd_done_cb}, +}; + +static char Translations[] = +"\ +Return: passwdentered()\ +"; + +#else /* HAVE_MOTIF */ + +# include +# include +# include + +#endif /* HAVE_MOTIF */ + +extern Widget passwd_dialog; +extern Widget passwd_form; +extern Widget roger_label; +extern Widget passwd_label1; +extern Widget passwd_label3; +extern Widget passwd_cancel; + +#ifdef HAVE_MOTIF +extern Widget passwd_text; +extern Widget passwd_done; +#else /* HAVE_ATHENA */ +static Widget passwd_text = 0; /* gag... */ +static Widget passwd_done = 0; +#endif /* HAVE_ATHENA */ + + + +static enum { pw_read, pw_ok, pw_fail, pw_cancel, pw_time } passwd_state; +#define PASSWDLEN 80 +static char typed_passwd [PASSWDLEN]; + + +#if defined(HAVE_ATHENA) || (XmVersion >= 1002) + /* The `destroy' bug apears to be fixed as of Motif 1.2.1, but + the `verify-callback' bug is still present. */ +# define DESTROY_WORKS +#endif + +static void +passwd_cancel_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + passwd_state = pw_cancel; +} + +static void +passwd_done_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + if (passwd_state != pw_read) return; /* already done */ +#ifndef VMS + +# ifdef HAVE_ATHENA + strncpy(typed_passwd, XawDialogGetValueString(passwd_form), PASSWDLEN); +# endif /* HAVE_ATHENA */ + if (passwd_valid_p (typed_passwd)) + passwd_state = pw_ok; + else + passwd_state = pw_fail; + +#else /* VMS */ + user_vms = getenv("USER"); + if (validate_user(user_vms,typed_passwd) == 1) + passwd_state = pw_ok; + else + passwd_state = pw_fail; +#endif /* VMS */ +} + +#if defined(HAVE_MOTIF) && defined(VERIFY_CALLBACK_WORKS) + + /* It looks to me like adding any modifyVerify callback causes + Motif 1.1.4 to free the the TextF_Value() twice. I can't see + the bug in the Motif source, but Purify complains, even if + check_passwd_cb() is a no-op. + + Update: Motif 1.2.1 also loses, but in a different way: it + writes beyond the end of a malloc'ed block in ModifyVerify(). + Probably this block is the text field's text. + */ + +static void +check_passwd_cb (Widget button, XtPointer client_data, XtPointer call_data) +{ + XmTextVerifyCallbackStruct *vcb = (XmTextVerifyCallbackStruct *) call_data; + + if (passwd_state != pw_read) + return; + else if (vcb->reason == XmCR_ACTIVATE) + { + passwd_done_cb (0, 0, 0); + } + else if (vcb->text->length > 1) /* don't allow "paste" operations */ + { + vcb->doit = False; + } + 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; + for (i = 0; i < vcb->text->length; i++) + vcb->text->ptr [i] = '*'; + } +} + +# else /* HAVE_ATHENA || !VERIFY_CALLBACK_WORKS */ + +static void keypress (Widget w, XEvent *event, String *av, Cardinal *ac); +static void backspace (Widget w, XEvent *event, String *av, Cardinal *ac); +static void kill_line (Widget w, XEvent *event, String *av, Cardinal *ac); +static void done (Widget w, XEvent *event, String *av, Cardinal *ac); + +static XtActionsRec actions[] = {{"keypress", keypress}, + {"backspace", backspace}, + {"kill_line", kill_line}, + {"done", done} + }; + +# ifdef HAVE_MOTIF +# if 0 /* oh fuck, why doesn't this work? */ +static char translations[] = "\ +BackSpace: backspace()\n\ +Delete: backspace()\n\ +CtrlH: backspace()\n\ +CtrlU: kill_line()\n\ +CtrlX: kill_line()\n\ +CtrlJ: done()\n\ +CtrlM: done()\n\ +: keypress()\n\ +"; +# else /* !0 */ +static char translations[] = ":keypress()"; +# endif /* !0 */ +# endif /* HAVE_MOTIF */ + + +static void +text_field_set_string (Widget widget, char *text, int position) +{ +#ifdef HAVE_MOTIF + XmTextFieldSetString (widget, text); + XmTextFieldSetInsertionPosition (widget, position); + +#else /* HAVE_ATHENA */ + char *buf; + int end_pos; + + XawTextBlock block; + block.firstPos = 0; + block.length = strlen (text); + block.ptr = text; + block.format = 0; + if (block.length == 0) + { + buf = XawDialogGetValueString(passwd_form); + if (buf) + end_pos = strlen(buf); + else + end_pos = -1; + } + XawTextReplace (widget, 0, end_pos, &block); + XawTextSetInsertionPoint (widget, position); +#endif /* HAVE_ATHENA */ +} + + +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); + if (size != 1) return; + + /* hack because I can't get translations to dance to my tune... */ + if (*s == '\010') { backspace (w, event, argv, argc); return; } + if (*s == '\177') { backspace (w, event, argv, argc); return; } + if (*s == '\025') { kill_line (w, event, argv, argc); return; } + if (*s == '\030') { kill_line (w, event, argv, argc); return; } + if (*s == '\012') { done (w, event, argv, argc); return; } + if (*s == '\015') { done (w, event, argv, argc); return; } + + i = j = strlen (typed_passwd); + typed_passwd [i] = *s; + s [++i] = 0; + while (i--) + s [i] = '*'; + + text_field_set_string (passwd_text, s, j + 1); +} + +static void +backspace (Widget w, XEvent *event, String *argv, Cardinal *argc) +{ + char s [sizeof (typed_passwd)]; + int i = strlen (typed_passwd); + int j = i; + if (i == 0) + return; + typed_passwd [--i] = 0; + s [i] = 0; + while (i--) + s [i] = '*'; + + text_field_set_string (passwd_text, s, j + 1); +} + +static void +kill_line (Widget w, XEvent *event, String *argv, Cardinal *argc) +{ + memset (typed_passwd, 0, sizeof (typed_passwd)); + text_field_set_string (passwd_text, "", 0); +} + +static void +done (Widget w, XEvent *event, String *argv, Cardinal *argc) +{ + passwd_done_cb (w, 0, 0); +} + +#endif /* HAVE_ATHENA || !VERIFY_CALLBACK_WORKS */ + + +extern void skull (Display *, Window, GC, GC, int, int, int, int); + +static void +roger (Widget button, XtPointer client_data, XtPointer call_data) +{ + Display *dpy = XtDisplay (button); + Screen *screen = XtScreen (button); + Window window = XtWindow (button); + Arg av [10]; + int ac = 0; + XGCValues gcv; + Colormap cmap; + GC draw_gc, erase_gc; + unsigned int fg, bg; + int x, y, size; + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + if (xgwa.width > xgwa.height) size = xgwa.height; + else size = xgwa.width; + if (size > 40) size -= 30; + x = (xgwa.width - size) / 2; + y = (xgwa.height - size) / 2; + XtSetArg (av [ac], XtNforeground, &fg); ac++; + XtSetArg (av [ac], XtNbackground, &bg); ac++; + XtGetValues (button, av, ac); + /* if it's black on white, swap it cause it looks better (hack hack) */ + if (fg == BlackPixelOfScreen (screen) && bg == WhitePixelOfScreen (screen)) + fg = WhitePixelOfScreen (screen), bg = BlackPixelOfScreen (screen); + gcv.foreground = bg; + erase_gc = XCreateGC (dpy, window, GCForeground, &gcv); + gcv.foreground = fg; + draw_gc = XCreateGC (dpy, window, GCForeground, &gcv); + XFillRectangle (dpy, window, erase_gc, 0, 0, xgwa.width, xgwa.height); + skull (dpy, window, draw_gc, erase_gc, x, y, size, size); + XFreeGC (dpy, draw_gc); + XFreeGC (dpy, erase_gc); +} + +static void +make_passwd_dialog (saver_info *si) +{ + char *username = 0; + saver_screen_info *ssi = si->default_screen; + Widget parent = ssi->toplevel_shell; + + if (ssi->demo_cmap && + ssi->demo_cmap != ssi->cmap && + ssi->demo_cmap != DefaultColormapOfScreen (ssi->screen)) + { + XFreeColormap (si->dpy, ssi->demo_cmap); + ssi->demo_cmap = 0; + } + + if (ssi->default_visual == DefaultVisualOfScreen (ssi->screen)) + ssi->demo_cmap = DefaultColormapOfScreen (ssi->screen); + else + ssi->demo_cmap = XCreateColormap (si->dpy, + RootWindowOfScreen (ssi->screen), + ssi->default_visual, AllocNone); + + create_passwd_dialog (parent, ssi->default_visual, ssi->demo_cmap); + +#ifdef HAVE_ATHENA + + XtVaSetValues(passwd_form, XtNvalue, typed_passwd, 0); + + XawDialogAddButton(passwd_form,"ok", passwd_done_cb, 0); + XawDialogAddButton(passwd_form,"cancel", passwd_cancel_cb, 0); + passwd_done = XtNameToWidget(passwd_form,"ok"); + passwd_text = XtNameToWidget(passwd_form,"value"); + + XtAppAddActions(XtWidgetToApplicationContext(passwd_text), + actionsList, XtNumber(actionsList)); + XtOverrideTranslations(passwd_text, XtParseTranslationTable(Translations)); + +#else /* HAVE_MOTIF */ + + XtAddCallback (passwd_done, XmNactivateCallback, passwd_done_cb, 0); + XtAddCallback (passwd_cancel, XmNactivateCallback, passwd_cancel_cb, 0); + XtAddCallback (roger_label, XmNexposeCallback, roger, 0); + +# ifdef VERIFY_CALLBACK_WORKS + XtAddCallback (passwd_text, XmNmodifyVerifyCallback, check_passwd_cb, 0); + XtAddCallback (passwd_text, XmNactivateCallback, check_passwd_cb, 0); +# else + XtAddCallback (passwd_text, XmNactivateCallback, passwd_done_cb, 0); + XtOverrideTranslations (passwd_text, XtParseTranslationTable (translations)); +# endif + +# if defined(HAVE_MOTIF) && (XmVersion >= 1002) + /* The focus stuff changed around; this didn't exist in 1.1.5. */ + XtVaSetValues (passwd_form, XmNinitialFocus, passwd_text, 0); +# endif + + /* Another random thing necessary in 1.2.1 but not 1.1.5... */ + XtVaSetValues (roger_label, XmNborderWidth, 2, 0); + +#endif /* HAVE_MOTIF */ + +#ifndef VMS + { + struct passwd *pw = getpwuid (getuid ()); + username = pw->pw_name; + } +#else /* VMS -- from "R.S.Niranjan" who says + that on OpenVMS 6.1, using `struct passwd' crashes... */ + username = getenv("USER"); +#endif /* VMS */ + + format_into_label (passwd_label1, si->version); + format_into_label (passwd_label3, (username ? username : "???")); +} + +static int passwd_idle_timer_tick; +static XtIntervalId passwd_idle_id; + +static void +passwd_idle_timer (XtPointer closure, XtIntervalId *id) +{ + saver_info *si = (saver_info *) closure; + saver_preferences *p = &si->prefs; + + Display *dpy = XtDisplay (passwd_form); +#ifdef HAVE_ATHENA + Window window = XtWindow (passwd_form); +#else /* MOTIF */ + Window window = XtWindow (XtParent(passwd_done)); +#endif /* MOTIF */ + static Dimension x, y, d, s, ss; + static GC gc = 0; + int max = p->passwd_timeout / 1000; + + idle_timer ((XtPointer) si, id); + + if (passwd_idle_timer_tick == max) /* first time */ + { + XGCValues gcv; +#ifdef HAVE_MOTIF + unsigned long fg, bg, ts, bs; + Dimension w = 0, h = 0; + XtVaGetValues(XtParent(passwd_done), + XmNwidth, &w, + 0); + XtVaGetValues(passwd_done, + XmNheight, &h, + XmNy, &y, + XtNforeground, &fg, + XtNbackground, &bg, + XmNtopShadowColor, &ts, + XmNbottomShadowColor, &bs, + 0); + + if (ts != bg && ts != fg) + fg = ts; + if (bs != bg && bs != fg) + fg = bs; + + d = h / 2; + if (d & 1) d++; + + x = (w / 2); + + x -= d/2; + y += d/2; + +#else /* HAVE_ATHENA */ + + Arg av [100]; + int ac = 0; + unsigned long fg, bg; + XtSetArg (av [ac], XtNheight, &d); ac++; + XtGetValues (passwd_done, av, ac); + ac = 0; + XtSetArg (av [ac], XtNwidth, &x); ac++; + XtSetArg (av [ac], XtNheight, &y); ac++; + XtSetArg (av [ac], XtNforeground, &fg); ac++; + XtSetArg (av [ac], XtNbackground, &bg); ac++; + XtGetValues (passwd_form, av, ac); + x -= d; + y -= d; + d -= 4; + +#endif /* HAVE_ATHENA */ + + gcv.foreground = fg; + if (gc) XFreeGC (dpy, gc); + gc = XCreateGC (dpy, window, GCForeground, &gcv); + s = 360*64 / (passwd_idle_timer_tick - 1); + ss = 90*64; + XFillArc (dpy, window, gc, x, y, d, d, 0, 360*64); + XSetForeground (dpy, gc, bg); + x += 1; + y += 1; + d -= 2; + } + + if (--passwd_idle_timer_tick) + { + passwd_idle_id = XtAppAddTimeOut (si->app, 1000, passwd_idle_timer, + (XtPointer) si); + XFillArc (dpy, window, gc, x, y, d, d, ss, s); + ss += s; + } +} + +#ifdef HAVE_ATHENA + +void +pop_up_athena_dialog_box (Widget parent, Widget focus, Widget dialog, + Widget form, int where) +{ + /* modified from demo.c */ + /* I'm sure this is the wrong way to pop up a dialog box, but I can't + figure out how else to do it. + + It's important that the screensaver dialogs not get decorated or + otherwise reparented by the window manager, because they need to be + children of the *real* root window, not the WM's virtual root, in + order for us to guarentee that they are visible above the screensaver + window itself. + */ + Arg av [100]; + int ac = 0; + Dimension sw, sh, x, y, w, h; + + XtRealizeWidget(dialog); + sw = WidthOfScreen (XtScreen (dialog)); + sh = HeightOfScreen (XtScreen (dialog)); + ac = 0; + XtSetArg (av [ac], XtNwidth, &w); ac++; + XtSetArg (av [ac], XtNheight, &h); ac++; + XtGetValues (form, av, ac); + switch (where) + { + case 0: /* center it in the top-right quadrant */ + x = (sw/2 + w) / 2 + (sw/2) - w; + y = (sh/2 + h) / 2 - h; + break; + case 1: /* center it in the bottom-right quadrant */ + x = (sw/2 + w) / 2 + (sw/2) - w; + y = (sh/2 + h) / 2 + (sh/2) - h; + break; + case 2: /* center it on the screen */ + x = (sw + w) / 2 - w; + y = (sh + h) / 2 - h; + break; + default: + abort (); + } + if (x + w > sw) x = sw - w; + if (y + h > sh) y = sh - h; + ac = 0; + XtVaSetValues(dialog, + XtNx, x, + XtNy, y, + NULL); + XtVaSetValues(form, + XtNx, x, + XtNy, y, + NULL); + XtPopup(dialog,XtGrabNone); + steal_focus_and_colormap (focus); +} + +static void +passwd_set_label (char *buf, int len) +{ + Widget label; + if (!passwd_text) + return; + label=XtNameToWidget(XtParent(passwd_text),"*label"); + XtVaSetValues(label, + XtNlabel, buf, + NULL); +} +#endif /* HAVE_ATHENA */ + +static Bool +pop_passwd_dialog (saver_info *si) +{ + saver_preferences *p = &si->prefs; + saver_screen_info *ssi = si->default_screen; + Widget parent = ssi->toplevel_shell; + Display *dpy = XtDisplay (passwd_dialog); + Window focus; + int revert_to; + int i; + + typed_passwd [0] = 0; + passwd_state = pw_read; + text_field_set_string (passwd_text, "", 0); + + /* In case one of the hacks has unmapped it temporarily... + Get that sucker on stage now! */ + for (i = 0; i < si->nscreens; i++) + XMapRaised(si->dpy, si->screens[i].screensaver_window); + + XGetInputFocus (dpy, &focus, &revert_to); +#if defined(HAVE_MOTIF) && !defined(DESTROY_WORKS) + /* This fucker blows up if we destroy the widget. I can't figure + out why. The second destroy phase dereferences freed memory... + So we just keep it around; but unrealizing or unmanaging it + doesn't work right either, so we hack the window directly. FMH. + */ + if (XtWindow (passwd_form)) + XMapRaised (dpy, XtWindow (passwd_dialog)); +#endif + +#ifdef HAVE_ATHENA + pop_up_athena_dialog_box (parent, passwd_text, passwd_dialog, + passwd_form, 2); +#else + pop_up_dialog_box (passwd_dialog, passwd_form, +#ifdef DEBUG + (si->prefs.debug_p ? 69 : 0) + +#endif + 2); + XtManageChild (passwd_form); +#endif + +#if defined(HAVE_MOTIF) && (XmVersion < 1002) + /* The focus stuff changed around; this causes problems in 1.2.1 + but is necessary in 1.1.5. */ + XmProcessTraversal (passwd_text, XmTRAVERSE_CURRENT); +#endif + + passwd_idle_timer_tick = p->passwd_timeout / 1000; + passwd_idle_id = XtAppAddTimeOut (si->app, 1000, passwd_idle_timer, + (XtPointer) si); + +#ifdef HAVE_ATHENA + if (roger_label) + roger(roger_label, 0, 0); +#endif /* HAVE_ATHENA */ + +#ifdef DEBUG + if (!si->prefs.debug_p) +#endif + XGrabServer (dpy); /* ############ DANGER! */ + + /* this call to ungrab used to be in main_loop() - see comment in + xscreensaver.c around line 857. */ + ungrab_keyboard_and_mouse (si->dpy); + + while (passwd_state == pw_read) + { + XEvent event; + XtAppNextEvent (si->app, &event); + /* wait for timer event */ + if (event.xany.type == 0 && passwd_idle_timer_tick == 0) + passwd_state = pw_time; + XtDispatchEvent (&event); + } + XUngrabServer (dpy); + XSync (dpy, False); /* ###### (danger over) */ + + if (passwd_state != pw_time) + XtRemoveTimeOut (passwd_idle_id); + + if (passwd_state != pw_ok) + { + char *lose; + switch (passwd_state) + { + case pw_time: lose = "Timed out!"; break; + case pw_fail: lose = "Sorry!"; break; + case pw_cancel: lose = 0; break; + default: abort (); + } +#ifdef HAVE_MOTIF + XmProcessTraversal (passwd_cancel, 0); /* turn off I-beam */ +#endif + if (lose) + { +#ifdef HAVE_ATHENA + /* show the message */ + passwd_set_label(lose,strlen(lose)+1); + + /* and clear the password line */ + memset(typed_passwd, 0, PASSWDLEN); + text_field_set_string (passwd_text, "", 0); +#else + text_field_set_string (passwd_text, lose, strlen (lose) + 1); +#endif + passwd_idle_timer_tick = 1; + passwd_idle_id = XtAppAddTimeOut (si->app, 3000, passwd_idle_timer, + (XtPointer) si); + while (1) + { + XEvent event; + XtAppNextEvent (si->app, &event); + if (event.xany.type == 0 && /* wait for timer event */ + passwd_idle_timer_tick == 0) + break; + XtDispatchEvent (&event); + } + } + } + memset (typed_passwd, 0, sizeof (typed_passwd)); + text_field_set_string (passwd_text, "", 0); + XtSetKeyboardFocus (parent, None); + +#ifdef DESTROY_WORKS + XtDestroyWidget (passwd_dialog); + passwd_dialog = 0; +#else + XUnmapWindow (XtDisplay (passwd_dialog), XtWindow (passwd_dialog)); +#endif + { + XErrorHandler old_handler = XSetErrorHandler (BadWindow_ehandler); + /* I don't understand why this doesn't refocus on the old selected + window when MWM is running in click-to-type mode. The value of + `focus' seems to be correct. */ + XSetInputFocus (dpy, focus, revert_to, CurrentTime); + XSync (dpy, False); + XSetErrorHandler (old_handler); + } + + /* Since we installed our colormap to display the dialog properly, put + the old one back, so that the screensaver_window is now displayed + properly. */ + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->cmap) + XInstallColormap (si->dpy, ssi->cmap); + } + + return (passwd_state == pw_ok ? True : False); +} + +Bool +unlock_p (saver_info *si) +{ + static Bool initted = False; + if (! initted) + { +#ifndef VERIFY_CALLBACK_WORKS + XtAppAddActions (si->app, actions, XtNumber (actions)); +#endif + passwd_dialog = 0; + initted = True; + } + if (! passwd_dialog) + make_passwd_dialog (si); + return pop_passwd_dialog (si); +} + +#endif /* !NO_LOCKING -- whole file */ diff --git a/driver/passwd.c b/driver/passwd.c new file mode 100644 index 00000000..c8e6f56f --- /dev/null +++ b/driver/passwd.c @@ -0,0 +1,238 @@ +/* passwd.c --- verifying typed passwords with the OS. + * xscreensaver, Copyright (c) 1993-1997 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef NO_LOCKING /* whole file */ + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include +#include +#ifndef VMS +# include +#else /* VMS */ +# include "vms-pwd.h" +#endif /* VMS */ + + +#ifdef __bsdi__ +# include +# if _BSDI_VERSION >= 199608 +# define BSD_AUTH +# endif +#endif /* __bsdi__ */ + + +#if defined(HAVE_SHADOW_PASSWD) /* passwds live in /etc/shadow */ + +# include +# define PWTYPE struct spwd * +# define PWPSLOT sp_pwdp +# define GETPW getspnam + +#elif defined(HAVE_ENHANCED_PASSWD) /* passwds live in /tcb/files/auth/ */ + /* M.Matsumoto */ +# include +# include + +# define PWTYPE struct pr_passwd * +# define PWPSLOT ufld.fd_encrypt +# define GETPW getprpwnam + +#elif defined(HAVE_ADJUNCT_PASSWD) + +# include +# include +# include + +# define PRTYPE passwd_adjunct * +# define PWPSLOT pwa_passwd +# define GETPW getpwanam + +#elif defined(HAVE_HPUX_PASSWD) + +# include +# include + +# define PRTYPE struct s_passwd * +# define PWPSLOT pw_passwd +# define GETPW getspwnam +# define crypt bigcrypt + +#endif + + +/* blargh */ +#undef Bool +#undef True +#undef False +#define Bool int +#define True 1 +#define False 0 + + +extern char *progname; + +static char *encrypted_root_passwd = 0; +static char *encrypted_user_passwd = 0; + +#ifdef VMS +# define ROOT "SYSTEM" +#else +# define ROOT "root" +#endif + + + +#ifndef VMS + +static char * +user_name (void) +{ + /* I think that just checking $USER here is not the best idea. */ + + const char *u = 0; + + /* It has been reported that getlogin() returns the wrong user id on some + very old SGI systems... And I've seen it return the string "rlogin" + sometimes! Screw it, using getpwuid() should be enough... + */ +/* u = (char *) getlogin (); + */ + + /* getlogin() fails if not attached to a terminal; in that case, use + getpwuid(). (Note that in this case, we're not doing shadow stuff, since + all we're interested in is the name, not the password. So that should + still work. Right?) */ + if (!u || !*u) + { + struct passwd *p = getpwuid (getuid ()); + u = (p ? p->pw_name : 0); + } + + return (u ? strdup(u) : 0); +} + +#else /* VMS */ + +static char * +user_name (void) +{ + char *u = getenv("USER"); + return (u ? strdup(u) : 0); +} + +#endif /* VMS */ + + +static Bool +passwd_known_p (const char *pw) +{ + return (pw && + pw[0] != '*' && /* This would be sensible... */ + strlen(pw) > 4); /* ...but this is what Solaris does. */ +} + + +static char * +get_encrypted_passwd(const char *user) +{ + if (user && *user) + { +#ifdef PWTYPE + { /* First check the shadow passwords. */ + PWTYPE p = GETPW((char *) user); + if (p && passwd_known_p (p->PWPSLOT)) + return strdup(p->PWPSLOT); + } +#endif + { /* Check non-shadow passwords too. */ + struct passwd *p = getpwnam(user); + if (p && passwd_known_p (p->pw_passwd)) + return strdup(p->pw_passwd); + } + } + + fprintf (stderr, "%s: couldn't get password of \"%s\"\n", + progname, (user ? user : "(null)")); + + return 0; +} + + + +/* This has to be called before we've changed our effective user ID, + because it might need priveleges to get at the encrypted passwords. + Returns false if we weren't able to get any passwords, and therefore, + locking isn't possible. (It will also have written to stderr.) + */ + +#ifndef VMS + +Bool +lock_init (int argc, char **argv) +{ + char *u; + +#ifdef HAVE_ENHANCED_PASSWD + set_auth_parameters(argc, argv); + check_auth_parameters(); +#endif /* HAVE_DEC_ENHANCED */ + + u = user_name(); + encrypted_user_passwd = get_encrypted_passwd(u); + encrypted_root_passwd = get_encrypted_passwd(ROOT); + if (u) free (u); + + if (encrypted_user_passwd) + return True; + else + return False; +} + + +/* This can be called at any time, and says whether the typed password + belongs to either the logged in user (real uid, not effective); or + to root. + */ +Bool +passwd_valid_p (const char *typed_passwd) +{ + if (encrypted_user_passwd && + !strcmp ((char *) crypt (typed_passwd, encrypted_user_passwd), + encrypted_user_passwd)) + return True; + + /* do not allow root to have a null password. */ + else if (typed_passwd[0] && + encrypted_root_passwd && + !strcmp ((char *) crypt (typed_passwd, encrypted_root_passwd), + encrypted_root_passwd)) + return True; + + else + return False; +} + +#else /* VMS */ +Bool lock_init (int argc, char **argv) { return True; } +#endif /* VMS */ + + +#endif /* NO_LOCKING -- whole file */ diff --git a/driver/stderr.c b/driver/stderr.c new file mode 100644 index 00000000..1a7bcb66 --- /dev/null +++ b/driver/stderr.c @@ -0,0 +1,451 @@ +/* stderr.c --- capturing stdout/stderr output onto the screensaver window. + * xscreensaver, Copyright (c) 1991-1997 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. + */ + +/* stderr hackery - Why Unix Sucks, reason number 32767. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef HAVE_FCNTL +# include +#endif + +#include + +#include "xscreensaver.h" +#include "resources.h" +#include "visual.h" + +FILE *real_stderr = 0; +FILE *real_stdout = 0; + + +/* It's ok for these to be global, since they refer to the one and only + stderr stream, not to a particular screen or window or visual. + */ +static char stderr_buffer [4096]; +static char *stderr_tail = 0; +static time_t stderr_last_read = 0; + +static void make_stderr_overlay_window (saver_screen_info *); + + +void +reset_stderr (saver_screen_info *ssi) +{ + saver_info *si = ssi->global; + +#ifdef DEBUG + if (si->prefs.debug_p) + fprintf ((real_stderr ? real_stderr : stderr), + "%s: resetting stderr\n", progname); +#endif + + ssi->stderr_text_x = 0; + ssi->stderr_text_y = 0; + + if (ssi->stderr_gc) + XFreeGC (si->dpy, ssi->stderr_gc); + ssi->stderr_gc = 0; + + if (ssi->stderr_overlay_window) + XDestroyWindow(si->dpy, ssi->stderr_overlay_window); + ssi->stderr_overlay_window = 0; + + if (ssi->stderr_cmap) + XFreeColormap(si->dpy, ssi->stderr_cmap); + ssi->stderr_cmap = 0; +} + +void +clear_stderr (saver_screen_info *ssi) +{ + saver_info *si = ssi->global; + ssi->stderr_text_x = 0; + ssi->stderr_text_y = 0; + if (ssi->stderr_overlay_window) + XClearWindow (si->dpy, ssi->stderr_overlay_window); +} + + +static void +print_stderr_1 (saver_screen_info *ssi, char *string) +{ + saver_info *si = ssi->global; + saver_preferences *p = &si->prefs; + Display *dpy = si->dpy; + Screen *screen = ssi->screen; + Window window = (ssi->stderr_overlay_window ? + ssi->stderr_overlay_window : + ssi->screensaver_window); + int h_border = 20; + int v_border = 20; + char *head = string; + char *tail; + + /* In verbose mode, copy it to stderr as well. */ + if (p->verbose_p) + fprintf (real_stderr, "%s", string); + + if (! ssi->stderr_font) + { + char *font_name = get_string_resource ("font", "Font"); + if (!font_name) font_name = "fixed"; + ssi->stderr_font = XLoadQueryFont (dpy, font_name); + if (! ssi->stderr_font) ssi->stderr_font = XLoadQueryFont (dpy, "fixed"); + ssi->stderr_line_height = (ssi->stderr_font->ascent + + ssi->stderr_font->descent); + } + + if (! ssi->stderr_gc) + { + XGCValues gcv; + Pixel fg, bg; + Colormap cmap = ssi->cmap; + + if (!ssi->stderr_overlay_window && + get_boolean_resource("overlayStderr", "Boolean")) + { + make_stderr_overlay_window (ssi); + if (ssi->stderr_overlay_window) + window = ssi->stderr_overlay_window; + if (ssi->stderr_cmap) + cmap = ssi->stderr_cmap; + } + + fg = get_pixel_resource ("textForeground", "Foreground", dpy, cmap); + bg = get_pixel_resource ("textBackground", "Background", dpy, cmap); + gcv.font = ssi->stderr_font->fid; + gcv.foreground = fg; + gcv.background = bg; + ssi->stderr_gc = XCreateGC (dpy, window, + (GCFont | GCForeground | GCBackground), + &gcv); + } + + + if (ssi->stderr_cmap) + XInstallColormap(si->dpy, ssi->stderr_cmap); + + for (tail = string; *tail; tail++) + { + if (*tail == '\n' || *tail == '\r') + { + int maxy = HeightOfScreen (screen) - v_border - v_border; + if (tail != head) + XDrawImageString (dpy, window, ssi->stderr_gc, + ssi->stderr_text_x + h_border, + ssi->stderr_text_y + v_border + + ssi->stderr_font->ascent, + head, tail - head); + ssi->stderr_text_x = 0; + ssi->stderr_text_y += ssi->stderr_line_height; + head = tail + 1; + if (*tail == '\r' && *head == '\n') + head++, tail++; + + if (ssi->stderr_text_y > maxy - ssi->stderr_line_height) + { +#if 0 + ssi->stderr_text_y = 0; +#else + int offset = ssi->stderr_line_height * 5; + XCopyArea (dpy, window, window, ssi->stderr_gc, + 0, v_border + offset, + WidthOfScreen (screen), + (HeightOfScreen (screen) - v_border - v_border + - offset), + 0, v_border); + XClearArea (dpy, window, + 0, HeightOfScreen (screen) - v_border - offset, + WidthOfScreen (screen), offset, False); + ssi->stderr_text_y -= offset; +#endif + } + } + } + if (tail != head) + { + int direction, ascent, descent; + XCharStruct overall; + XDrawImageString (dpy, window, ssi->stderr_gc, + ssi->stderr_text_x + h_border, + ssi->stderr_text_y + v_border + + ssi->stderr_font->ascent, + head, tail - head); + XTextExtents (ssi->stderr_font, tail, tail - head, + &direction, &ascent, &descent, &overall); + ssi->stderr_text_x += overall.width; + } +} + +static void +make_stderr_overlay_window (saver_screen_info *ssi) +{ + saver_info *si = ssi->global; + unsigned long transparent_pixel = 0; + Visual *visual = get_overlay_visual (ssi->screen, &transparent_pixel); + if (visual) + { + int depth = visual_depth (ssi->screen, visual); + XSetWindowAttributes attrs; + unsigned long attrmask; + +#ifdef DEBUG + if (si->prefs.debug_p) + fprintf(real_stderr, + "%s: using overlay visual 0x%0x for stderr text layer.\n", + progname, (int) XVisualIDFromVisual (visual)); +#endif /* DEBUG */ + + ssi->stderr_cmap = XCreateColormap(si->dpy, + RootWindowOfScreen(ssi->screen), + visual, AllocNone); + + attrmask = (CWColormap | CWBackPixel | CWBackingPixel | CWBorderPixel | + CWBackingStore | CWSaveUnder); + attrs.colormap = ssi->stderr_cmap; + attrs.background_pixel = transparent_pixel; + attrs.backing_pixel = transparent_pixel; + attrs.border_pixel = transparent_pixel; + attrs.backing_store = NotUseful; + attrs.save_under = False; + + ssi->stderr_overlay_window = + XCreateWindow(si->dpy, ssi->screensaver_window, 0, 0, + WidthOfScreen(ssi->screen), HeightOfScreen(ssi->screen), + 0, depth, InputOutput, visual, attrmask, &attrs); + XMapRaised(si->dpy, ssi->stderr_overlay_window); + } +} + + +static void +print_stderr (saver_info *si, char *string) +{ + saver_preferences *p = &si->prefs; + int i; + + /* In verbose mode, copy it to stderr as well. */ + if (p->verbose_p) + fprintf (real_stderr, "%s", string); + + for (i = 0; i < si->nscreens; i++) + print_stderr_1 (&si->screens[i], string); +} + + +static void +stderr_popup_timer_fn (XtPointer closure, XtIntervalId *id) +{ + saver_info *si = (saver_info *) closure; + char *s = stderr_buffer; + if (*s) + { + /* If too much data was printed, then something has gone haywire, + so truncate it. */ + char *trailer = "\n\n<< stderr diagnostics have been truncated >>\n\n"; + int max = sizeof (stderr_buffer) - strlen (trailer) - 5; + if (strlen (s) > max) + strcpy (s + max, trailer); + /* Now show the user. */ + print_stderr (si, s); + } + + stderr_tail = stderr_buffer; + si->stderr_popup_timer = 0; +} + + +static void +stderr_callback (XtPointer closure, int *fd, XtIntervalId *id) +{ + saver_info *si = (saver_info *) closure; + char *s; + int left; + int size; + int read_this_time = 0; + + if (stderr_tail == 0) + stderr_tail = stderr_buffer; + + left = ((sizeof (stderr_buffer) - 2) - (stderr_tail - stderr_buffer)); + + s = stderr_tail; + *s = 0; + + /* Read as much data from the fd as we can, up to our buffer size. */ + if (left > 0) + { + while ((size = read (*fd, (void *) s, left)) > 0) + { + left -= size; + s += size; + read_this_time += size; + } + *s = 0; + } + else + { + char buf2 [1024]; + /* The buffer is full; flush the rest of it. */ + while (read (*fd, (void *) buf2, sizeof (buf2)) > 0) + ; + } + + stderr_tail = s; + stderr_last_read = time ((time_t *) 0); + + /* Now we have read some data that we would like to put up in a dialog + box. But more data may still be coming in - so don't pop up the + dialog right now, but instead, start a timer that will pop it up + a second from now. Should more data come in in the meantime, we + will be called again, and will reset that timer again. So the + dialog will only pop up when a second has elapsed with no new data + being written to stderr. + + However, if the buffer is full (meaning lots of data has been written) + then we don't reset the timer. + */ + if (read_this_time > 0) + { + if (si->stderr_popup_timer) + XtRemoveTimeOut (si->stderr_popup_timer); + + si->stderr_popup_timer = + XtAppAddTimeOut (si->app, 1 * 1000, stderr_popup_timer_fn, + (XtPointer) si); + } +} + +void +initialize_stderr (saver_info *si) +{ + static Boolean done = False; + int fds [2]; + int in, out; + int new_stdout, new_stderr; + int stdout_fd = 1; + int stderr_fd = 2; + int flags = 0; + Boolean stderr_dialog_p, stdout_dialog_p; + + if (done) return; + done = True; + + stderr_dialog_p = get_boolean_resource ("captureStderr", "Boolean"); + stdout_dialog_p = get_boolean_resource ("captureStdout", "Boolean"); + + if (!stderr_dialog_p && !stdout_dialog_p) + return; + + real_stderr = stderr; + real_stdout = stdout; + + if (pipe (fds)) + { + perror ("error creating pipe:"); + return; + } + + in = fds [0]; + out = fds [1]; + +# ifdef HAVE_FCNTL + +# if defined(O_NONBLOCK) + flags = O_NONBLOCK; +# elif defined(O_NDELAY) + flags = O_NDELAY; +# else + ERROR!! neither O_NONBLOCK nor O_NDELAY are defined. +# endif + + /* Set both sides of the pipe to nonblocking - this is so that + our reads (in stderr_callback) will terminate, and so that + out writes (in the client programs) will silently fail when + the pipe is full, instead of hosing the program. */ + if (fcntl (in, F_SETFL, flags) != 0) + { + perror ("fcntl:"); + return; + } + if (fcntl (out, F_SETFL, flags) != 0) + { + perror ("fcntl:"); + return; + } + +# endif /* !HAVE_FCNTL */ + + if (stderr_dialog_p) + { + FILE *new_stderr_file; + new_stderr = dup (stderr_fd); + if (new_stderr < 0) + { + perror ("could not dup() a stderr:"); + return; + } + if (! (new_stderr_file = fdopen (new_stderr, "w"))) + { + perror ("could not fdopen() the new stderr:"); + return; + } + real_stderr = new_stderr_file; + + close (stderr_fd); + if (dup2 (out, stderr_fd) < 0) + { + perror ("could not dup() a new stderr:"); + return; + } + } + + if (stdout_dialog_p) + { + FILE *new_stdout_file; + new_stdout = dup (stdout_fd); + if (new_stdout < 0) + { + perror ("could not dup() a stdout:"); + return; + } + if (! (new_stdout_file = fdopen (new_stdout, "w"))) + { + perror ("could not fdopen() the new stdout:"); + return; + } + real_stdout = new_stdout_file; + + close (stdout_fd); + if (dup2 (out, stdout_fd) < 0) + { + perror ("could not dup() a new stdout:"); + return; + } + } + + XtAppAddInput (si->app, in, (XtPointer) XtInputReadMask, stderr_callback, + (XtPointer) si); +} diff --git a/driver/subprocs.c b/driver/subprocs.c new file mode 100644 index 00000000..50dd82b8 --- /dev/null +++ b/driver/subprocs.c @@ -0,0 +1,1084 @@ +/* subprocs.c --- choosing, spawning, and killing screenhacks. + * xscreensaver, Copyright (c) 1991, 1992, 1993, 1995, 1997 + * 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +#include /* not used for much... */ + +#ifndef ESRCH +#include +#endif + +#include /* sys/resource.h needs this for timeval */ + +#ifndef VMS + +# include /* for setpriority() and PRIO_PROCESS */ +# include /* for waitpid() and associated macros */ + +#else /* VMS */ + +# if __DECC_VER >= 50200000 +# include +# endif + +# include +# include /* for close */ +# include /* for getpid */ +# define pid_t int +# define fork vfork + +#endif /* VMS */ + +#include /* for the signal names */ + +#ifndef NO_SETUID +#include /* for getpwnam() and struct passwd */ +#include /* for getgrgid() and struct group */ +#endif /* NO_SETUID */ + +#if !defined(SIGCHLD) && defined(SIGCLD) +#define SIGCHLD SIGCLD +#endif + +#ifdef HAVE_PUTENV +extern int putenv (/* const char * */); /* getenv() is in stdlib.h... */ +#endif +extern int kill (pid_t, int); /* signal() is in sys/signal.h... */ + +/* This file doesn't need the Xt headers, so stub these types out... */ +#undef XtPointer +#define XtAppContext void* +#define XrmDatabase void* +#define XtIntervalId void* +#define XtPointer void* +#define Widget void* + +#include "xscreensaver.h" +#include "yarandom.h" + + +extern saver_info *global_si_kludge; /* I hate C so much... */ + +static void hack_environment (saver_screen_info *ssi); + + +static void +nice_subproc (int nice_level) +{ + if (nice_level == 0) + return; + +#if defined(HAVE_NICE) + { + int old_nice = nice (0); + int n = nice_level - old_nice; + errno = 0; + if (nice (n) == -1 && errno != 0) + { + char buf [512]; + sprintf (buf, "%s: nice(%d) failed", progname, n); + perror (buf); + } + } +#elif defined(HAVE_SETPRIORITY) && defined(PRIO_PROCESS) + if (setpriority (PRIO_PROCESS, getpid(), nice_level) != 0) + { + char buf [512]; + sprintf (buf, "%s: setpriority(PRIO_PROCESS, %lu, %d) failed", + progname, (unsigned long) getpid(), nice_level); + perror (buf); + } +#else + fprintf (stderr, + "%s: don't know how to change process priority on this system.\n", + progname); + +#endif +} + + +#ifndef VMS + +static void +exec_simple_command (const char *command) +{ + char *av[1024]; + int ac = 0; + char *token = strtok (strdup(command), " \t"); + while (token) + { + av[ac++] = token; + token = strtok(0, " \t"); + } + av[ac] = 0; + + execvp (av[0], av); /* shouldn't return. */ + + { + char buf [512]; + sprintf (buf, "%s: could not execute \"%s\"", progname, av[0]); + perror (buf); + + if (errno == ENOENT && + (token = getenv("PATH"))) + { +# ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 2048 +# endif +# endif + char path[PATH_MAX]; + fprintf (stderr, "\n"); + *path = 0; +# if defined(HAVE_GETCWD) + getcwd (path, sizeof(path)); +# elif defined(HAVE_GETWD) + getwd (path); +# endif + if (*path) + fprintf (stderr, " Current directory is: %s\n", path); + fprintf (stderr, " PATH is:\n"); + token = strtok (strdup(token), ":"); + while (token) + { + fprintf (stderr, " %s\n", token); + token = strtok(0, ":"); + } + fprintf (stderr, "\n"); + } + } + fflush(stderr); + fflush(stdout); + exit (1); /* Note that this only exits a child fork. */ +} + + +static void +exec_complex_command (const char *shell, const char *command) +{ + char *av[5]; + int ac = 0; + char *command2 = (char *) malloc (strlen (command) + 6); + memcpy (command2, "exec ", 5); + memcpy (command2 + 5, command, strlen (command) + 1); + + /* Invoke the shell as "/bin/sh -c 'exec prog -arg -arg ...'" */ + av [ac++] = (char *) shell; + av [ac++] = "-c"; + av [ac++] = command2; + av [ac] = 0; + + execvp (av[0], av); /* shouldn't return. */ + + { + char buf [512]; + sprintf (buf, "%s: execvp(\"%s\") failed", progname, av[0]); + perror (buf); + fflush(stderr); + fflush(stdout); + exit (1); /* Note that this only exits a child fork. */ + } +} + +#else /* VMS */ + +static void +exec_vms_command (const char *command) +{ + system (command); + fflush (stderr); + fflush (stdout); + exit (1); /* Note that this only exits a child fork. */ +} + +#endif /* !VMS */ + + +static void +exec_screenhack (saver_info *si, const char *command) +{ + /* I don't believe what a sorry excuse for an operating system UNIX is! + + - I want to spawn a process. + - I want to know it's pid so that I can kill it. + - I would like to receive a message when it dies of natural causes. + - I want the spawned process to have user-specified arguments. + + If shell metacharacters are present (wildcards, backquotes, etc), the + only way to parse those arguments is to run a shell to do the parsing + for you. + + And the only way to know the pid of the process is to fork() and exec() + it in the spawned side of the fork. + + But if you're running a shell to parse your arguments, this gives you + the pid of the *shell*, not the pid of the *process* that you're + actually interested in, which is an *inferior* of the shell. This also + means that the SIGCHLD you get applies to the shell, not its inferior. + (Why isn't that sufficient? I don't remember any more, but it turns + out that it isn't.) + + So, the only solution, when metacharacters are present, is to force the + shell to exec() its inferior. What a fucking hack! We prepend "exec " + to the command string, and hope it doesn't contain unquoted semicolons + or ampersands (we don't search for them, because we don't want to + prohibit their use in quoted strings (messages, for example) and parsing + out the various quote characters is too much of a pain.) + + (Actually, Clint Wong points out that process groups + might be used to take care of this problem; this may be worth considering + some day, except that, 1: this code works now, so why fix it, and 2: from + what I've seen in Emacs, dealing with process groups isn't especially + portable.) + */ + saver_preferences *p = &si->prefs; + +#ifndef VMS + Bool hairy_p = !!strpbrk (command, "*?$&!<>[];`'\\\""); + + if (p->verbose_p) + printf ("%s: spawning \"%s\" in pid %lu%s.\n", + progname, command, (unsigned long) getpid (), + (hairy_p ? " (via shell)" : "")); + + if (hairy_p) + /* If it contains any shell metacharacters, do it the hard way, + and fork a shell to parse the arguments for us. */ + exec_complex_command (p->shell, command); + else + /* Otherwise, we can just exec the program directly. */ + exec_simple_command (command); + +#else /* VMS */ + if (p->verbose_p) + printf ("%s: spawning \"%s\" in pid %lu.\n", progname, command, getpid()); + exec_vms_command (command); +#endif /* VMS */ + + abort(); /* that shouldn't have returned. */ +} + + + +/* Management of child processes, and de-zombification. + */ + +enum job_status { + job_running, /* the process is still alive */ + job_stopped, /* we have sent it a STOP signal */ + job_killed, /* we have sent it a TERM signal */ + job_dead /* we have wait()ed for it, and it's dead -- this state only + occurs so that we can avoid calling free() from a signal + handler. Shortly after going into this state, the list + element will be removed. */ +}; + +struct screenhack_job { + char *name; + pid_t pid; + enum job_status status; + struct screenhack_job *next; +}; + +static struct screenhack_job *jobs = 0; + +#ifdef DEBUG +static void +show_job_list (void) +{ + struct screenhack_job *job; + fprintf(stderr, "%s: job list:\n", progname); + for (job = jobs; job; job = job->next) + fprintf (stderr, " %5ld: (%s) %s\n", + (long) job->pid, + (job->status == job_running ? "running" : + job->status == job_stopped ? "stopped" : + job->status == job_killed ? " killed" : + job->status == job_dead ? " dead" : " ???"), + job->name); + fprintf (stderr, "\n"); +} +#endif + + +static void clean_job_list (void); + +static struct screenhack_job * +make_job (pid_t pid, const char *cmd) +{ + struct screenhack_job *job = (struct screenhack_job *) malloc (sizeof(*job)); + + static char name [1024]; + const char *in = cmd; + char *out = name; + + clean_job_list(); + + while (isspace(*in)) in++; /* skip whitespace */ + while (!isspace(*in) && *in != ':') + *out++ = *in++; /* snarf first token */ + while (isspace(*in)) in++; /* skip whitespace */ + if (*in == ':') /* token was a visual name; skip it. */ + { + in++; + out = name; + while (isspace(*in)) in++; /* skip whitespace */ + while (!isspace(*in)) *out++ = *in++; /* snarf first token */ + } + *out = 0; + + job->name = strdup(name); + job->pid = pid; + job->status = job_running; + job->next = jobs; + jobs = job; + + return jobs; +} + + +static void +free_job (struct screenhack_job *job) +{ + if (!job) + return; + else if (job == jobs) + jobs = jobs->next; + else + { + struct screenhack_job *job2, *prev; + for (prev = 0, job2 = jobs; + job2; + prev = job2, job2 = job2->next) + if (job2 == job) + { + prev->next = job->next; + break; + } + } + free(job->name); + free(job); +} + + +/* Cleans out dead jobs from the jobs list -- this must only be called + from the main thread, not from a signal handler. + */ +static void +clean_job_list (void) +{ + struct screenhack_job *job, *prev, *next; + for (prev = 0, job = jobs, next = (job ? job->next : 0); + job; + prev = job, job = next, next = (job ? job->next : 0)) + { + if (job->status == job_dead) + { + if (prev) + prev->next = next; + free_job (job); + job = prev; + } + } +} + + +static struct screenhack_job * +find_job (pid_t pid) +{ + struct screenhack_job *job; + for (job = jobs; job; job = job->next) + if (job->pid == pid) + return job; + return 0; +} + +static void await_dying_children (saver_info *si); +#ifndef VMS +static void describe_dead_child (saver_info *, pid_t, int wait_status); +#endif + + +/* Semaphore to temporarily turn the SIGCHLD handler into a no-op. */ +static int block_sigchld_handler = 0; + +static int +kill_job (saver_info *si, pid_t pid, int signal) +{ + saver_preferences *p = &si->prefs; + struct screenhack_job *job; + int status = -1; + + clean_job_list(); + + if (block_sigchld_handler) + /* This function should not be called from the signal handler. */ + abort(); + + block_sigchld_handler++; /* we control the horizontal... */ + + job = find_job (pid); + if (!job || + !job->pid || + job->status == job_killed) + { + if (p->verbose_p) + fprintf (stderr, "%s: no child %ld to signal!\n", + progname, (long) pid); + goto DONE; + } + + switch (signal) { + case SIGTERM: job->status = job_killed; break; +#ifdef SIGSTOP + /* #### there must be a way to do this on VMS... */ + case SIGSTOP: job->status = job_stopped; break; + case SIGCONT: job->status = job_running; break; +#endif /* SIGSTOP */ + default: abort(); + } + +#ifdef SIGSTOP + if (p->verbose_p) + fprintf (stderr, "%s: %s pid %lu.\n", progname, + (signal == SIGTERM ? "killing" : + signal == SIGSTOP ? "suspending" : + signal == SIGCONT ? "resuming" : "signalling"), + (unsigned long) job->pid); +#else /* !SIGSTOP */ + if (p->verbose_p) + fprintf (stderr, "%s: %s pid %lu.\n", progname, "killing", + (unsigned long) job->pid); +#endif /* !SIGSTOP */ + + status = kill (job->pid, signal); + + if (p->verbose_p && status < 0) + { + if (errno == ESRCH) + fprintf (stderr, "%s: child process %lu (%s) was already dead.\n", + progname, job->pid, job->name); + else + { + char buf [1024]; + sprintf (buf, "%s: couldn't kill child process %lu (%s)", + progname, job->pid, job->name); + perror (buf); + } + } + + await_dying_children (si); + + DONE: + block_sigchld_handler--; + if (block_sigchld_handler < 0) + abort(); + + clean_job_list(); + return status; +} + + +#ifdef SIGCHLD +static RETSIGTYPE +sigchld_handler (int sig) +{ + saver_info *si = global_si_kludge; /* I hate C so much... */ + +#ifdef DEBUG + if (si->prefs.debug_p) + fprintf(stderr, "%s: got SIGCHLD%s\n", progname, + (block_sigchld_handler ? " (blocked)" : "")); +#endif + + if (block_sigchld_handler < 0) + abort(); + else if (block_sigchld_handler == 0) + { + block_sigchld_handler++; + await_dying_children (si); + block_sigchld_handler--; + } + + init_sigchld(); +} +#endif + + +#ifndef VMS +static void +await_dying_children (saver_info *si) +{ + while (1) + { + int wait_status = 0; + pid_t kid; + + errno = 0; + kid = waitpid (-1, &wait_status, WNOHANG|WUNTRACED); +#ifdef DEBUG + if (si->prefs.debug_p) + if (kid < 0 && errno) + fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", progname, + (long) kid, errno); + else + fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", progname, (long) kid); +#endif + + /* 0 means no more children to reap. + -1 means error -- except "interrupted system call" isn't a "real" + error, so if we get that, we should just try again. */ + if (kid == 0 || + (kid < 0 && errno != EINTR)) + break; + + describe_dead_child (si, kid, wait_status); + } +} + + +static void +describe_dead_child (saver_info *si, pid_t kid, int wait_status) +{ + int i; + saver_preferences *p = &si->prefs; + struct screenhack_job *job = find_job (kid); + const char *name = job ? job->name : ""; + + if (WIFEXITED (wait_status)) + { + int exit_status = WEXITSTATUS (wait_status); + + /* Treat exit code as a signed 8-bit quantity. */ + if (exit_status & 0x80) exit_status |= ~0xFF; + + /* One might assume that exiting with non-0 means something went wrong. + But that loser xswarm exits with the code that it was killed with, so + it *always* exits abnormally. Treat abnormal exits as "normal" (don't + mention them) if we've just killed the subprocess. But mention them + if they happen on their own. + */ + if (!job || + (exit_status != 0 && + (p->verbose_p || job->status != job_killed))) + fprintf (stderr, + "%s: child pid %lu (%s) exited abnormally (code %d).\n", + progname, (unsigned long) kid, name, exit_status); + else if (p->verbose_p) + printf ("%s: child pid %lu (%s) exited normally.\n", + progname, (unsigned long) kid, name); + + if (job) + job->status = job_dead; + } + else if (WIFSIGNALED (wait_status)) + { + if (p->verbose_p || + !job || + job->status != job_killed || + WTERMSIG (wait_status) != SIGTERM) + fprintf (stderr, "%s: child pid %lu (%s) terminated with %s.\n", + progname, (unsigned long) kid, name, + signal_name (WTERMSIG(wait_status))); + + if (job) + job->status = job_dead; + } + else if (WIFSTOPPED (wait_status)) + { + if (p->verbose_p) + fprintf (stderr, "%s: child pid %lu (%s) stopped with %s.\n", + progname, (unsigned long) kid, name, + signal_name (WSTOPSIG (wait_status))); + + if (job) + job->status = job_stopped; + } + else + { + fprintf (stderr, "%s: child pid %lu (%s) died in a mysterious way!", + progname, (unsigned long) kid, name); + if (job) + job->status = job_dead; + } + + /* Clear out the pid so that screenhack_running_p() knows it's dead. + */ + if (!job || job->status == job_dead) + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (kid == ssi->pid) + ssi->pid = 0; + } +} + +#else /* VMS */ +static void await_dying_children (saver_info *si) { return; } +#endif /* VMS */ + + +void +init_sigchld (void) +{ +#ifdef SIGCHLD + if (((long) signal (SIGCHLD, sigchld_handler)) == -1L) + { + char buf [255]; + sprintf (buf, "%s: couldn't catch SIGCHLD", progname); + perror (buf); + } +#endif +} + + + + + +static Bool +select_visual_of_hack (saver_screen_info *ssi, const char *hack) +{ + saver_info *si = ssi->global; + saver_preferences *p = &si->prefs; + Bool selected; + static char vis [1024]; + const char *in = hack; + char *out = vis; + while (isspace(*in)) in++; /* skip whitespace */ + while (!isspace(*in) && *in != ':') + *out++ = *in++; /* snarf first token */ + while (isspace(*in)) in++; /* skip whitespace */ + *out = 0; + + if (*in == ':') + selected = select_visual(ssi, vis); + else + selected = select_visual(ssi, 0); + + if (!selected && (p->verbose_p || si->demo_mode_p)) + { + if (*in == ':') in++; + while (isspace(*in)) in++; + fprintf (stderr, + (si->demo_mode_p + ? "%s: warning, no \"%s\" visual for \"%s\".\n" + : "%s: no \"%s\" visual; skipping \"%s\".\n"), + progname, (vis ? vis : "???"), in); + } + + return selected; +} + + +static void +spawn_screenhack_1 (saver_screen_info *ssi, Bool first_time_p) +{ + saver_info *si = ssi->global; + saver_preferences *p = &si->prefs; + raise_window (si, first_time_p, True, False); + XFlush (si->dpy); + + if (p->screenhacks_count || si->demo_mode_p) + { + char *hack; + pid_t forked; + char buf [255]; + int new_hack; + + if (si->demo_mode_p) + { + hack = si->demo_hack; + + /* Ignore visual-selection failure if in demo mode. */ + (void) select_visual_of_hack (ssi, hack); + } + else + { + int retry_count = 0; + + AGAIN: + if (p->screenhacks_count == 1) + new_hack = 0; + else if (si->next_mode_p == 1) + new_hack = (ssi->current_hack + 1) % p->screenhacks_count; + else if (si->next_mode_p == 2) + new_hack = ((ssi->current_hack + p->screenhacks_count - 1) + % p->screenhacks_count); + else + while ((new_hack = random () % p->screenhacks_count) + == ssi->current_hack) + ; + ssi->current_hack = new_hack; + hack = p->screenhacks[ssi->current_hack]; + + if (!select_visual_of_hack (ssi, hack)) + { + if (++retry_count > (p->screenhacks_count*4)) + { + /* Uh, oops. Odds are, there are no suitable visuals, + and we're looping. Give up. (This is totally lame, + what we should do is make a list of suitable hacks at + the beginning, then only loop over them.) + */ + if (p->verbose_p) + fprintf(stderr, + "%s: no suitable visuals for these programs.\n", + progname); + return; + } + else + goto AGAIN; + } + } + si->next_mode_p = 0; + + + /* If there's a visual description on the front of the command, nuke it. + */ + { + char *in = hack; + while (isspace(*in)) in++; /* skip whitespace */ + hack = in; + while (!isspace(*in) && *in != ':') in++; /* snarf first token */ + while (isspace(*in)) in++; /* skip whitespace */ + if (*in == ':') + { + in++; + while (isspace(*in)) in++; + hack = in; + } + } + + switch ((int) (forked = fork ())) + { + case -1: + sprintf (buf, "%s: couldn't fork", progname); + perror (buf); + restore_real_vroot (si); + saver_exit (si, 1); + + case 0: + close (ConnectionNumber (si->dpy)); /* close display fd */ + nice_subproc (p->nice_inferior); /* change process priority */ + hack_environment (ssi); /* set $DISPLAY */ + exec_screenhack (si, hack); /* this does not return */ + abort(); + break; + + default: + ssi->pid = forked; + (void) make_job (forked, hack); + break; + } + } +} + + +void +spawn_screenhack (saver_info *si, Bool first_time_p) +{ + int i; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + spawn_screenhack_1 (ssi, first_time_p); + } +} + + +void +kill_screenhack (saver_info *si) +{ + int i; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->pid) + kill_job (si, ssi->pid, SIGTERM); + ssi->pid = 0; + } +} + + +void +suspend_screenhack (saver_info *si, Bool suspend_p) +{ +#ifdef SIGSTOP /* older VMS doesn't have it... */ + int i; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->pid) + kill_job (si, ssi->pid, (suspend_p ? SIGSTOP : SIGCONT)); + } +#endif /* SIGSTOP */ +} + + +/* Called when we're exiting abnormally, to kill off the subproc. */ +void +emergency_kill_subproc (saver_info *si) +{ + int i; +#ifdef SIGCHLD + signal (SIGCHLD, SIG_IGN); +#endif + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->pid) + { + kill_job (si, ssi->pid, SIGTERM); + ssi->pid = 0; + } + } +} + +Bool +screenhack_running_p (saver_info *si) +{ + Bool result = True; + int i; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (!ssi->pid) + result = False; + } + return result; +} + + +/* Restarting the xscreensaver process from scratch. */ + +static char **saved_argv; + +void +save_argv (int argc, char **argv) +{ + saved_argv = (char **) malloc ((argc + 2) * sizeof (char *)); + saved_argv [argc] = 0; + while (argc--) + { + int i = strlen (argv [argc]) + 1; + saved_argv [argc] = (char *) malloc (i); + memcpy (saved_argv [argc], argv [argc], i); + } +} + +void +restart_process (saver_info *si) +{ + fflush (real_stdout); + fflush (real_stderr); + execvp (saved_argv [0], saved_argv); /* shouldn't return */ + { + char buf [512]; + sprintf (buf, "%s: could not restart process", progname); + perror(buf); + fflush(stderr); + } +} + +/* Like restart_process(), but ensures that when it restarts, + it comes up in demo-mode. */ +void +demo_mode_restart_process (saver_info *si) +{ + int i; + for (i = 0; saved_argv [i]; i++); + /* add the -demo switch; save_argv() left room for this. */ + saved_argv [i] = "-demo"; + saved_argv [i+1] = 0; + restart_process (si); /* shouldn't return */ + saved_argv [i] = 0; + XBell(si->dpy, 0); +} + +static void +hack_environment (saver_screen_info *ssi) +{ + /* Store $DISPLAY into the environment, so that the $DISPLAY variable that + the spawned processes inherit is correct. First, it must be on the same + host and display as the value of -display passed in on our command line + (which is not necessarily the same as what our $DISPLAY variable is.) + Second, the screen number in the $DISPLAY passed to the subprocess should + be the screen on which this particular hack is running -- not the display + specification which the driver itself is using, since the driver ignores + its screen number and manages all existing screens. + */ + saver_info *si = ssi->global; + const char *odpy = DisplayString (si->dpy); + char *ndpy = (char *) malloc(strlen(odpy) + 20); + int screen_number; + char *s; + + for (screen_number = 0; screen_number < si->nscreens; screen_number++) + if (ssi == &si->screens[screen_number]) + break; + if (screen_number >= si->nscreens) abort(); + + strcpy (ndpy, "DISPLAY="); + s = ndpy + strlen(ndpy); + strcpy (s, odpy); + + while (*s && *s != ':') s++; /* skip to colon */ + while (*s == ':') s++; /* skip over colons */ + while (isdigit(*s)) s++; /* skip over dpy number */ + while (*s == '.') s++; /* skip over dot */ + if (s[-1] != '.') *s++ = '.'; /* put on a dot */ + sprintf(s, "%d", screen_number); /* put on screen number */ + + /* Allegedly, BSD 4.3 didn't have putenv(), but nobody runs such systems + any more, right? It's not Posix, but everyone seems to have it. */ +#ifdef HAVE_PUTENV + if (putenv (ndpy)) + abort (); +#endif /* HAVE_PUTENV */ +} + + +/* Change the uid/gid of the screensaver process, so that it is safe for it + to run setuid root (which it needs to do on some systems to read the + encrypted passwords from the passwd file.) + + hack_uid() is run before opening the X connection, so that XAuth works. + hack_uid_warn() is called after the connection is opened and the command + line arguments are parsed, so that the messages from hack_uid() get + printed after we know whether we're in `verbose' mode. + */ + +#ifndef NO_SETUID + +static int hack_uid_errno; +static char hack_uid_buf [255], *hack_uid_error; + +void +hack_uid (saver_info *si) +{ + + /* If we've been run as setuid or setgid to someone else (most likely root) + turn off the extra permissions so that random user-specified programs + don't get special privileges. (On some systems it might be necessary + to install this as setuid root in order to read the passwd file to + implement lock-mode...) + */ + setgid (getgid ()); + setuid (getuid ()); + + hack_uid_errno = 0; + hack_uid_error = 0; + + /* If we're being run as root (as from xdm) then switch the user id + to something safe. */ + if (getuid () == 0) + { + struct passwd *p; + /* Locking can't work when running as root, because we have no way of + knowing what the user id of the logged in user is (so we don't know + whose password to prompt for.) + */ + si->locking_disabled_p = True; + si->nolock_reason = "running as root"; + p = getpwnam ("nobody"); + if (! p) p = getpwnam ("daemon"); + if (! p) p = getpwnam ("bin"); + if (! p) p = getpwnam ("sys"); + if (! p) + { + hack_uid_error = "couldn't find safe uid; running as root."; + hack_uid_errno = -1; + } + else + { + struct group *g = getgrgid (p->pw_gid); + hack_uid_error = hack_uid_buf; + sprintf (hack_uid_error, "changing uid/gid to %s/%s (%ld/%ld).", + p->pw_name, (g ? g->gr_name : "???"), + (long) p->pw_uid, (long) p->pw_gid); + + /* Change the gid to be a safe one. If we can't do that, then + print a warning. We change the gid before the uid so that we + change the gid while still root. */ + if (setgid (p->pw_gid) != 0) + { + hack_uid_errno = errno; + sprintf (hack_uid_error, "couldn't set gid to %s (%ld)", + (g ? g->gr_name : "???"), (long) p->pw_gid); + } + + /* Now change the uid to be a safe one. */ + if (setuid (p->pw_uid) != 0) + { + hack_uid_errno = errno; + sprintf (hack_uid_error, "couldn't set uid to %s (%ld)", + p->pw_name, (long) p->pw_uid); + } + } + } +#ifndef NO_LOCKING + else /* disable locking if already being run as "someone else" */ + { + struct passwd *p = getpwuid (getuid ()); + if (!p || + !strcmp (p->pw_name, "root") || + !strcmp (p->pw_name, "nobody") || + !strcmp (p->pw_name, "daemon") || + !strcmp (p->pw_name, "bin") || + !strcmp (p->pw_name, "sys")) + { + si->locking_disabled_p = True; + si->nolock_reason = hack_uid_buf; + sprintf (si->nolock_reason, "running as %s", p->pw_name); + } + } +#endif /* NO_LOCKING */ +} + +void +hack_uid_warn (saver_info *si) +{ + saver_preferences *p = &si->prefs; + + if (! hack_uid_error) + ; + else if (hack_uid_errno == 0) + { + if (p->verbose_p) + printf ("%s: %s\n", progname, hack_uid_error); + } + else + { + char buf [255]; + sprintf (buf, "%s: %s", progname, hack_uid_error); + if (hack_uid_errno == -1) + fprintf (stderr, "%s\n", buf); + else + { + errno = hack_uid_errno; + perror (buf); + } + } +} + +#endif /* !NO_SETUID */ diff --git a/driver/timers.c b/driver/timers.c new file mode 100644 index 00000000..92aa4b93 --- /dev/null +++ b/driver/timers.c @@ -0,0 +1,633 @@ +/* timers.c --- detecting when the user is idle, and other timer-related tasks. + * xscreensaver, Copyright (c) 1991-1997 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +/* #define DEBUG_TIMERS */ + +#include +#include +#include +#include +#ifdef HAVE_XMU +# ifndef VMS +# include +# else /* VMS */ +# include +# endif /* VMS */ +# else /* !HAVE_XMU */ +# include "xmu.h" +#endif /* !HAVE_XMU */ + +#ifdef HAVE_XIDLE_EXTENSION +#include +#endif /* HAVE_XIDLE_EXTENSION */ + +#ifdef HAVE_MIT_SAVER_EXTENSION +#include +#endif /* HAVE_MIT_SAVER_EXTENSION */ + +#ifdef HAVE_SGI_SAVER_EXTENSION +#include +#endif /* HAVE_SGI_SAVER_EXTENSION */ + +#ifdef HAVE_XHPDISABLERESET +# include + extern Bool hp_locked_p; /* from windows.c */ +#endif /* HAVE_XHPDISABLERESET */ + +#include "xscreensaver.h" + + +void +idle_timer (XtPointer closure, XtIntervalId *id) +{ + saver_info *si = (saver_info *) closure; + + /* What an amazingly shitty design. Not only does Xt execute timeout + events from XtAppNextEvent() instead of from XtDispatchEvent(), but + there is no way to tell Xt to block until there is an X event OR a + timeout happens. Once your timeout proc is called, XtAppNextEvent() + still won't return until a "real" X event comes in. + + So this function pushes a stupid, gratuitous, unnecessary event back + on the event queue to force XtAppNextEvent to return Right Fucking Now. + When the code in sleep_until_idle() sees an event of type XAnyEvent, + which the server never generates, it knows that a timeout has occurred. + */ + XEvent fake_event; + fake_event.type = 0; /* XAnyEvent type, ignored. */ + fake_event.xany.display = si->dpy; + fake_event.xany.window = 0; + XPutBackEvent (si->dpy, &fake_event); +} + + +static void +notice_events (saver_info *si, Window window, Bool top_p) +{ + saver_preferences *p = &si->prefs; + XWindowAttributes attrs; + unsigned long events; + Window root, parent, *kids; + unsigned int nkids; + + if (XtWindowToWidget (si->dpy, window)) + /* If it's one of ours, don't mess up its event mask. */ + return; + + if (!XQueryTree (si->dpy, window, &root, &parent, &kids, &nkids)) + return; + if (window == root) + top_p = False; + + XGetWindowAttributes (si->dpy, window, &attrs); + events = ((attrs.all_event_masks | attrs.do_not_propagate_mask) + & KeyPressMask); + + /* Select for SubstructureNotify on all windows. + Select for KeyPress on all windows that already have it selected. + Do we need to select for ButtonRelease? I don't think so. + */ + XSelectInput (si->dpy, window, SubstructureNotifyMask | events); + + if (top_p && p->verbose_p && (events & KeyPressMask)) + { + /* Only mention one window per tree (hack hack). */ + printf ("%s: selected KeyPress on 0x%lX\n", progname, + (unsigned long) window); + top_p = False; + } + + if (kids) + { + while (nkids) + notice_events (si, kids [--nkids], top_p); + XFree ((char *) kids); + } +} + + +int +BadWindow_ehandler (Display *dpy, XErrorEvent *error) +{ + /* When we notice a window being created, we spawn a timer that waits + 30 seconds or so, and then selects events on that window. This error + handler is used so that we can cope with the fact that the window + may have been destroyed <30 seconds after it was created. + */ + if (error->error_code == BadWindow || + error->error_code == BadMatch || + error->error_code == BadDrawable) + return 0; + else + return saver_ehandler (dpy, error); +} + + +struct notice_events_timer_arg { + saver_info *si; + Window w; +}; + +static void +notice_events_timer (XtPointer closure, XtIntervalId *id) +{ + struct notice_events_timer_arg *arg = + (struct notice_events_timer_arg *) closure; + + XErrorHandler old_handler = XSetErrorHandler (BadWindow_ehandler); + + saver_info *si = arg->si; + Window window = arg->w; + + free(arg); + notice_events (si, window, True); + XSync (si->dpy, False); + XSetErrorHandler (old_handler); +} + +void +start_notice_events_timer (saver_info *si, Window w) +{ + saver_preferences *p = &si->prefs; + struct notice_events_timer_arg *arg = + (struct notice_events_timer_arg *) malloc(sizeof(*arg)); + arg->si = si; + arg->w = w; + XtAppAddTimeOut (si->app, p->notice_events_timeout, notice_events_timer, + (XtPointer) arg); +} + + +/* When the screensaver is active, this timer will periodically change + the running program. + */ +void +cycle_timer (XtPointer closure, XtIntervalId *id) +{ + saver_info *si = (saver_info *) closure; + saver_preferences *p = &si->prefs; + Time how_long = p->cycle; + if (si->dbox_up_p) + { + if (p->verbose_p) + printf ("%s: dbox up; delaying hack change.\n", progname); + how_long = 30000; /* 30 secs */ + } + else + { + if (p->verbose_p) + printf ("%s: changing graphics hacks.\n", progname); + kill_screenhack (si); + spawn_screenhack (si, False); + } + si->cycle_id = XtAppAddTimeOut (si->app, how_long, cycle_timer, + (XtPointer) si); + +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: starting cycle_timer (%ld, %ld)\n", + progname, how_long, si->cycle_id); +#endif +} + + +void +activate_lock_timer (XtPointer closure, XtIntervalId *id) +{ + saver_info *si = (saver_info *) closure; + saver_preferences *p = &si->prefs; + + if (p->verbose_p) + printf ("%s: timed out; activating lock\n", progname); + si->locked_p = True; + +#ifdef HAVE_XHPDISABLERESET + if (!hp_locked_p) + { + XHPDisableReset (si->dpy); /* turn off C-Sh-Reset */ + hp_locked_p = True; + } +#endif +} + + +/* Call this when user activity (or "simulated" activity) has been noticed. + */ +static void +reset_timers (saver_info *si) +{ + saver_preferences *p = &si->prefs; + if (p->use_mit_saver_extension || p->use_sgi_saver_extension) + return; + +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: killing idle_timer (%ld, %ld)\n", + progname, p->timeout, si->timer_id); +#endif + XtRemoveTimeOut (si->timer_id); + si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer, + (XtPointer) si); + if (si->cycle_id) abort (); + +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: restarting idle_timer (%ld, %ld)\n", + progname, p->timeout, si->timer_id); +#endif + + si->last_activity_time = time ((time_t *) 0); +} + +/* When we aren't using a server extension, this timer is used to periodically + wake up and poll the mouse position, which is possibly more reliable than + selecting motion events on every window. + */ +static void +check_pointer_timer (XtPointer closure, XtIntervalId *id) +{ + int i; + saver_info *si = (saver_info *) closure; + saver_preferences *p = &si->prefs; + Bool active_p = False; + + if (p->use_xidle_extension || + p->use_mit_saver_extension || + p->use_sgi_saver_extension) + abort (); + + si->check_pointer_timer_id = + XtAppAddTimeOut (si->app, p->pointer_timeout, check_pointer_timer, + (XtPointer) si); + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + Window root, child; + int root_x, root_y, x, y; + unsigned int mask; + + XQueryPointer (si->dpy, ssi->screensaver_window, &root, &child, + &root_x, &root_y, &x, &y, &mask); + + if (root_x == ssi->poll_mouse_last_root_x && + root_y == ssi->poll_mouse_last_root_y && + child == ssi->poll_mouse_last_child && + mask == ssi->poll_mouse_last_mask) + continue; + + active_p = True; + +#ifdef DEBUG_TIMERS + if (p->verbose_p) + if (root_x == ssi->poll_mouse_last_root_x && + root_y == ssi->poll_mouse_last_root_y && + child == ssi->poll_mouse_last_child) + printf ("%s: modifiers changed at %s on screen %d.\n", + progname, timestring(), i); + else + printf ("%s: pointer moved at %s on screen %d.\n", + progname, timestring(), i); +#endif + + si->last_activity_screen = ssi; + ssi->poll_mouse_last_root_x = root_x; + ssi->poll_mouse_last_root_y = root_y; + ssi->poll_mouse_last_child = child; + ssi->poll_mouse_last_mask = mask; + } + + if (active_p) + reset_timers (si); +} + + +void +sleep_until_idle (saver_info *si, Bool until_idle_p) +{ + saver_preferences *p = &si->prefs; + XEvent event; + + if (until_idle_p) + { + if (!p->use_mit_saver_extension && !p->use_sgi_saver_extension) + { + /* Wake up periodically to ask the server if we are idle. */ + si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer, + (XtPointer) si); +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: starting idle_timer (%ld, %ld)\n", + progname, p->timeout, si->timer_id); +#endif + } + + if (!p->use_xidle_extension && + !p->use_mit_saver_extension && + !p->use_sgi_saver_extension) + /* start polling the mouse position */ + check_pointer_timer ((XtPointer) si, 0); + } + + while (1) + { + XtAppNextEvent (si->app, &event); + + switch (event.xany.type) { + case 0: /* our synthetic "timeout" event has been signalled */ + if (until_idle_p) + { + Time idle; +#ifdef HAVE_XIDLE_EXTENSION + if (p->use_xidle_extension) + { + if (! XGetIdleTime (si->dpy, &idle)) + { + fprintf (stderr, "%s: XGetIdleTime() failed.\n", progname); + saver_exit (si, 1); + } + } + else +#endif /* HAVE_XIDLE_EXTENSION */ +#ifdef HAVE_MIT_SAVER_EXTENSION + if (p->use_mit_saver_extension) + { + /* We don't need to do anything in this case - the synthetic + event isn't necessary, as we get sent specific events + to wake us up. */ + idle = 0; + } + else +#endif /* HAVE_MIT_SAVER_EXTENSION */ +#ifdef HAVE_SGI_SAVER_EXTENSION + if (p->use_sgi_saver_extension) + { + /* We don't need to do anything in this case - the synthetic + event isn't necessary, as we get sent specific events + to wake us up. */ + idle = 0; + } + else +#endif /* HAVE_SGI_SAVER_EXTENSION */ + { + idle = 1000 * (si->last_activity_time - time ((time_t *) 0)); + } + + if (idle >= p->timeout) + goto DONE; + else if (!p->use_mit_saver_extension && + !p->use_sgi_saver_extension) + { + si->timer_id = XtAppAddTimeOut (si->app, p->timeout - idle, + idle_timer, (XtPointer) si); +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: starting idle_timer (%ld, %ld)\n", + progname, p->timeout - idle, si->timer_id); +#endif /* DEBUG_TIMERS */ + } + } + break; + + case ClientMessage: + if (handle_clientmessage (si, &event, until_idle_p)) + goto DONE; + break; + + case CreateNotify: + if (!p->use_xidle_extension && + !p->use_mit_saver_extension && + !p->use_sgi_saver_extension) + { + start_notice_events_timer (si, event.xcreatewindow.window); +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: starting notice_events_timer for 0x%X (%lu)\n", + progname, + (unsigned int) event.xcreatewindow.window, + p->notice_events_timeout); +#endif /* DEBUG_TIMERS */ + } + break; + + case KeyPress: + case KeyRelease: + case ButtonPress: + case ButtonRelease: + case MotionNotify: + +#ifdef DEBUG_TIMERS + if (p->verbose_p) + { + if (event.xany.type == MotionNotify) + printf ("%s: MotionNotify at %s\n", progname, timestring ()); + else if (event.xany.type == KeyPress) + printf ("%s: KeyPress seen on 0x%X at %s\n", progname, + (unsigned int) event.xkey.window, timestring ()); + } +#endif + + /* We got a user event */ + if (!until_idle_p) + goto DONE; + else + reset_timers (si); + break; + + default: + +#ifdef HAVE_MIT_SAVER_EXTENSION + if (event.type == si->mit_saver_ext_event_number) + { + XScreenSaverNotifyEvent *sevent = + (XScreenSaverNotifyEvent *) &event; + if (sevent->state == ScreenSaverOn) + { +# ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: ScreenSaverOn event received at %s\n", + progname, timestring ()); +# endif /* DEBUG_TIMERS */ + + /* Get the "real" server window(s) out of the way as soon + as possible. */ + int i = 0; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->server_mit_saver_window && + window_exists_p (si->dpy, + ssi->server_mit_saver_window)) + XUnmapWindow (si->dpy, ssi->server_mit_saver_window); + } + + if (sevent->kind != ScreenSaverExternal) + { +# ifdef DEBUG_TIMERS + fprintf (stderr, + "%s: ScreenSaverOn event wasn't of type External!\n", + progname); +# endif /* DEBUG_TIMERS */ + } + + if (until_idle_p) + goto DONE; + } + else if (sevent->state == ScreenSaverOff) + { +# ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: ScreenSaverOff event received at %s\n", + progname, timestring ()); +# endif /* DEBUG_TIMERS */ + if (!until_idle_p) + goto DONE; + } +# ifdef DEBUG_TIMERS + else if (p->verbose_p) + printf ("%s: unknown MIT-SCREEN-SAVER event received at %s\n", + progname, timestring ()); +# endif /* DEBUG_TIMERS */ + } + else + +#endif /* HAVE_MIT_SAVER_EXTENSION */ + + +#ifdef HAVE_SGI_SAVER_EXTENSION + if (event.type == (si->sgi_saver_ext_event_number + ScreenSaverStart)) + { +# ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: ScreenSaverStart event received at %s\n", + progname, timestring ()); +# endif /* DEBUG_TIMERS */ + + if (until_idle_p) + goto DONE; + } + else if (event.type == (si->sgi_saver_ext_event_number + + ScreenSaverEnd)) + { +# ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: ScreenSaverEnd event received at %s\n", + progname, timestring ()); +# endif /* DEBUG_TIMERS */ + if (!until_idle_p) + goto DONE; + } + else +#endif /* HAVE_SGI_SAVER_EXTENSION */ + + XtDispatchEvent (&event); + } + } + DONE: + + + /* If there's a user event on the queue, swallow it. + If we're using a server extension, and the user becomes active, we + get the extension event before the user event -- so the keypress or + motion or whatever is still on the queue. This makes "unfade" not + work, because it sees that event, and bugs out. (This problem + doesn't exhibit itself without an extension, because in that case, + there's only one event generated by user activity, not two.) + */ + XCheckMaskEvent (si->dpy, (KeyPressMask|ButtonPressMask|PointerMotionMask), + &event); + + + if (si->check_pointer_timer_id) + { + XtRemoveTimeOut (si->check_pointer_timer_id); + si->check_pointer_timer_id = 0; + } + if (si->timer_id) + { + XtRemoveTimeOut (si->timer_id); + si->timer_id = 0; + } + + if (until_idle_p && si->cycle_id) + abort (); + + return; +} + + +/* This timer goes off every few minutes, whether the user is idle or not, + to try and clean up anything that has gone wrong. + + It calls disable_builtin_screensaver() so that if xset has been used, + or some other program (like xlock) has messed with the XSetScreenSaver() + settings, they will be set back to sensible values (if a server extension + is in use, messing with xlock can cause xscreensaver to never get a wakeup + event, and could cause monitor power-saving to occur, and all manner of + heinousness.) + + If the screen is currently blanked, it raises the window, in case some + other window has been mapped on top of it. + + If the screen is currently blanked, and there is no hack running, it + clears the window, in case there is an error message printed on it (we + don't want the error message to burn in.) + */ + +static void +watchdog_timer (XtPointer closure, XtIntervalId *id) +{ + saver_info *si = (saver_info *) closure; + if (!si->demo_mode_p) + { + disable_builtin_screensaver (si, False); + if (si->screen_blanked_p) + { + Bool running_p = screenhack_running_p(si); +#ifdef DEBUG_TIMERS + if (si->prefs.verbose_p) + printf ("%s: watchdog timer raising %sscreen.\n", + progname, (running_p ? "" : "and clearing ")); +#endif + raise_window (si, True, True, running_p); + } + } +} + + +void +reset_watchdog_timer (saver_info *si, Bool on_p) +{ + saver_preferences *p = &si->prefs; + + if (si->watchdog_id) + { + XtRemoveTimeOut (si->watchdog_id); + si->watchdog_id = 0; + } + + if (on_p && p->watchdog_timeout) + { + si->watchdog_id = XtAppAddTimeOut (si->app, p->watchdog_timeout, + watchdog_timer, (XtPointer) si); + +#ifdef DEBUG_TIMERS + if (p->verbose_p) + printf ("%s: restarting watchdog_timer (%ld, %ld)\n", + progname, p->watchdog_timeout, si->watchdog_id); +#endif + } +} diff --git a/driver/vms-getpwnam.c b/driver/vms-getpwnam.c new file mode 100644 index 00000000..9408bb54 --- /dev/null +++ b/driver/vms-getpwnam.c @@ -0,0 +1,132 @@ +/* + * getpwnam(name) - retrieves a UAF entry + * + * Author: Patrick L. Mahan + * Location: TGV, Inc + * Date: 15-Nov-1991 + * + * Purpose: Provides emulation for the UNIX getpwname routine. + * + * Modification History + * + * Date | Who | Version | Reason + * ------------+-----------+---------------+--------------------------- + * 15-Nov-1991 | PLM | 1.0 | First Write + */ + +#define PASSWDROUTINES + +#include +#include +#include +#include +#include +#include +#include "vms-pwd.h" + +struct uic { + unsigned short uid; + unsigned short gid; +}; + +#define TEST(ptr, str) { if (ptr == NULL) { \ + fprintf(stderr, "getpwnam: memory allocation failure for \"%s\"\n", \ + str); \ + return ((struct passwd *)(NULL)); \ + } } + +struct passwd *getpwnam(name) +char *name; +{ + int istatus; + int UserNameLen; + int UserOwnerLen; + int UserDeviceLen; + int UserDirLen; + static char UserName[13]; + static char UserOwner[32]; + static char UserDevice[32]; + static char UserDir[64]; + char *cptr, *sptr; + unsigned long int UserPwd[2]; + unsigned short int UserSalt; + unsigned long int UserEncrypt; + struct uic UicValue; + struct passwd *entry; + + struct dsc$descriptor_s VMSNAME = + {strlen(name), DSC$K_DTYPE_T, DSC$K_CLASS_S, name}; + + struct itmlist3 { + unsigned short int length; + unsigned short int item; + unsigned long int addr; + unsigned long int retaddr; + } ItemList[] = { + {12, UAI$_USERNAME, (unsigned long)&UserName, (unsigned long)&UserNameLen}, + {8, UAI$_PWD, (unsigned long)&UserPwd, 0}, + {4, UAI$_UIC, (unsigned long)&UicValue, 0}, + {32, UAI$_OWNER, (unsigned long)&UserOwner, (unsigned long)&UserOwnerLen}, + {32, UAI$_DEFDEV, (unsigned long)&UserDevice, (unsigned long)&UserDeviceLen}, + {64, UAI$_DEFDIR, (unsigned long)&UserDir, (unsigned long)&UserDirLen}, + {2, UAI$_SALT, (unsigned long)&UserSalt, 0}, + {4, UAI$_ENCRYPT, (unsigned long)&UserEncrypt, 0}, + {0, 0, 0, 0} + }; + + UserNameLen = 0; + istatus = sys$getuai (0, 0, &VMSNAME, &ItemList, 0, 0, 0); + + if (!(istatus & 1)) { +#ifdef DEBUG + lib$signal(istatus); +#endif /* DEBUG */ + fprintf (stderr, "getpwnam: unable to retrieve passwd entry for %s\n", + name); + fprintf (stderr, "getpwnam: vms error number is 0x%x\n", istatus); + return ((struct passwd *)NULL); + } + + entry = (struct passwd *) calloc (1, sizeof(struct passwd)); + TEST(entry, "PASSWD_ENTRY"); + + entry->pw_uid = UicValue.uid; + entry->pw_gid = UicValue.gid; + entry->pw_salt = UserSalt; + entry->pw_encrypt = UserEncrypt; + + sptr = UserName; + cptr = calloc (UserNameLen+1, sizeof(char)); + TEST(cptr, "USERNAME"); + strncpy (cptr, sptr, UserNameLen); + cptr[UserNameLen] = '\0'; + entry->pw_name = cptr; + + cptr = calloc(8, sizeof(char)); + TEST(cptr, "PASSWORD"); + memcpy(cptr, UserPwd, 8); + entry->pw_passwd = cptr; + + sptr = UserOwner; sptr++; + cptr = calloc ((int)UserOwner[0]+1, sizeof(char)); + TEST(cptr, "FULLNAME"); + strncpy (cptr, sptr, (int)UserOwner[0]); + cptr[(int)UserOwner[0]] = '\0'; + entry->pw_gecos = cptr; + + cptr = calloc ((int)UserDevice[0]+(int)UserDir[0]+1, sizeof(char)); + TEST(cptr, "HOME"); + sptr = UserDevice; sptr++; + strncpy (cptr, sptr, (int)UserDevice[0]); + sptr = UserDir; sptr++; + strncat (cptr, sptr, (int)UserDir[0]); + cptr[(int)UserDevice[0]+(int)UserDir[0]] = '\0'; + entry->pw_dir = cptr; + + cptr = calloc (strlen("SYS$SYSTEM:LOGINOUT.EXE")+1, sizeof(char)); + TEST(cptr,"SHELL"); + strcpy (cptr, "SYS$SYSTEM:LOGINOUT.EXE"); + entry->pw_shell = cptr; + + return (entry); +} diff --git a/driver/vms-hpwd.c b/driver/vms-hpwd.c new file mode 100644 index 00000000..707e3ea5 --- /dev/null +++ b/driver/vms-hpwd.c @@ -0,0 +1,75 @@ +/* + * VAX/VMS Password hashing routines: + * + * uses the System Service SYS$HASH_PASSWORD + * + * 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. + * + */ + +#include +#include +#include +#include +/* + * Hashing routine + */ +hash_vms_password(output_buf,input_buf,input_length,username,encryption_type,salt) +char *output_buf; +char *input_buf; +int input_length; +char *username; +int encryption_type; +unsigned short salt; +{ + struct dsc$descriptor_s password; + struct dsc$descriptor_s user; + + /* + * Check the VMS Version. If this is V5.4 or later, then + * we can use the new system service SYS$HASH_PASSWORD. Else + * fail and return garbage. + */ + + static char VMS_Version[32]; + struct { + unsigned short int Size; + unsigned short int Code; + char *Buffer; + unsigned short int *Resultant_Size; + } Item_List[2]={32, SYI$_VERSION, VMS_Version, 0, 0, 0}; + struct {int Size; char *Ptr;} Descr1; + + /* + * Get the information + */ + sys$getsyiw(0,0,0,Item_List,0,0,0); + /* + * Call the old routine if this isn't V5.4 or later... + */ +#ifndef __DECC + if ((VMS_Version[1] < '5') || + ((VMS_Version[1] == '5') && (VMS_Version[3] < '4'))) { + printf("Unsupported OS version\n"); + return(1); + } +#endif /* !__DECC */ + /* + * Call the SYS$HASH_PASSWORD system service... + */ + password.dsc$b_dtype = DSC$K_DTYPE_T; + password.dsc$b_class = DSC$K_CLASS_S; + password.dsc$w_length = input_length; + password.dsc$a_pointer = input_buf; + user.dsc$b_dtype = DSC$K_DTYPE_T; + user.dsc$b_class = DSC$K_CLASS_S; + user.dsc$w_length = strlen(username); + user.dsc$a_pointer = username; + sys$hash_password (&password, encryption_type, salt, &user, output_buf); +} diff --git a/driver/vms-pwd.h b/driver/vms-pwd.h new file mode 100644 index 00000000..6cb73d3e --- /dev/null +++ b/driver/vms-pwd.h @@ -0,0 +1,48 @@ +/* @(#)pwd.h 1.7 89/08/24 SMI; from S5R2 1.1 */ + +#ifndef __pwd_h +#define __pwd_h + +#ifdef vax11c +#include +#else +#include +#endif /* vax11c */ + +#ifdef PASSWDROUTINES +#define EXTERN +#else +#define EXTERN extern +#endif /* PASSWDROUTINES */ + +struct passwd { + char *pw_name; + char *pw_passwd; + int pw_uid; + int pw_gid; + short pw_salt; + int pw_encrypt; + char *pw_age; + char *pw_comment; + char *pw_gecos; + char *pw_dir; + char *pw_shell; +}; + + +#ifndef _POSIX_SOURCE +extern struct passwd *getpwent(); + +struct comment { + char *c_dept; + char *c_name; + char *c_acct; + char *c_bin; +}; + +#endif + +EXTERN struct passwd *getpwuid(/* uid_t uid */); +EXTERN struct passwd *getpwnam(/* char *name */); + +#endif /* !__pwd_h */ diff --git a/driver/vms-validate.c b/driver/vms-validate.c new file mode 100644 index 00000000..8f7141d6 --- /dev/null +++ b/driver/vms-validate.c @@ -0,0 +1,75 @@ +/* + * validate a password for a user + * + * 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. + */ + +/* + * Includes + */ +#include +#include +#include + +#include "vms-pwd.h" +int hash_vms_password(char *output_buf,char *input_buf,int input_length, + char *username,int encryption_type,unsigned short salt); + +/* + * + * Validate a VMS UserName/Password pair. + * + */ + +int validate_user(name,password) +char *name; +char *password; +{ + char password_buf[64]; + char username_buf[31]; + char encrypt_buf[8]; + register int i; + register char *cp,*cp1; + struct passwd *user_entry; + + /* + * Get the users UAF entry + */ + user_entry = getpwnam(name); + + /* + * If user_entry == NULL then we got a bad error + * return -1 to indicate a bad error + */ + if (user_entry == NULL) return (-1); + + /* + * Uppercase the password + */ + cp = password; + cp1 = password_buf; + while (*cp) + if (islower(*cp)) + *cp1++ = toupper(*cp++); + else + *cp1++ = *cp++; + /* + * Get the length of the password + */ + i = strlen(password); + /* + * Encrypt the password + */ + hash_vms_password(encrypt_buf,password_buf,i,user_entry->pw_name, + user_entry->pw_encrypt, user_entry->pw_salt); + if (memcmp(encrypt_buf,user_entry->pw_passwd,8) == 0) + return(1); + else return(0); +} + diff --git a/driver/vms_axp.opt b/driver/vms_axp.opt new file mode 100644 index 00000000..04d465df --- /dev/null +++ b/driver/vms_axp.opt @@ -0,0 +1,5 @@ +[-.UTILS]UTILS.OLB_AXP/LIB +SYS$SHARE:DECW$XMLIBSHR.EXE/SHARE +SYS$SHARE:DECW$XMULIBSHR.EXE/SHARE +SYS$SHARE:DECW$XTSHR.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/driver/vms_axp_12.opt b/driver/vms_axp_12.opt new file mode 100644 index 00000000..25dd1f18 --- /dev/null +++ b/driver/vms_axp_12.opt @@ -0,0 +1,5 @@ +[-.UTILS]UTILS.OLB_AXP/LIB +SYS$SHARE:DECW$XMLIBSHR12.EXE/SHARE +SYS$SHARE:DECW$XMULIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/driver/vms_decc.opt b/driver/vms_decc.opt new file mode 100644 index 00000000..65bec033 --- /dev/null +++ b/driver/vms_decc.opt @@ -0,0 +1,5 @@ +[-.UTILS]UTILS.OLB_DECC/LIB +SYS$SHARE:DECW$XMLIBSHR.EXE/SHARE +SYS$SHARE:DECW$XMULIBSHR.EXE/SHARE +SYS$SHARE:DECW$XTSHR.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/driver/vms_decc_12.opt b/driver/vms_decc_12.opt new file mode 100644 index 00000000..fdd9a802 --- /dev/null +++ b/driver/vms_decc_12.opt @@ -0,0 +1,5 @@ +[-.UTILS]UTILS.OLB_DECC/LIB +SYS$SHARE:DECW$XMLIBSHR12.EXE/SHARE +SYS$SHARE:DECW$XMULIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/driver/windows.c b/driver/windows.c new file mode 100644 index 00000000..7dabe9f1 --- /dev/null +++ b/driver/windows.c @@ -0,0 +1,1126 @@ +/* windows.c --- turning the screen black; dealing with visuals, virtual roots. + * xscreensaver, Copyright (c) 1991-1997 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef VMS +# include /* for getpid() */ +# include "vms-gtod.h" /* for gettimeofday() */ +# if !defined(HAVE_UNAME) && (__VMS_VER >= 70000000) +# define HAVE_UNAME 1 +# endif /* !HAVE_UNAME */ +#endif /* VMS */ + +# ifdef HAVE_UNAME +# include /* for uname() */ +# endif /* HAVE_UNAME */ + +#include +#include /* for CARD32 */ +#include +#include /* for XSetClassHint() */ +#include +#include /* for time() */ +#include /* for the signal names */ + +#ifdef HAVE_MIT_SAVER_EXTENSION +# include +#endif /* HAVE_MIT_SAVER_EXTENSION */ + + +#ifdef HAVE_XHPDISABLERESET +# include + + /* Calls to XHPDisableReset and XHPEnableReset must be balanced, + or BadAccess errors occur. (Ok for this to be global, since it + affects the whole machine, not just the current screen.) */ + Bool hp_locked_p = False; + +#endif /* HAVE_XHPDISABLERESET */ + + +/* This file doesn't need the Xt headers, so stub these types out... */ +#undef XtPointer +#define XtAppContext void* +#define XrmDatabase void* +#define XtIntervalId void* +#define XtPointer void* +#define Widget void* + +#include "xscreensaver.h" +#include "visual.h" +#include "fade.h" + +extern int kill (pid_t, int); /* signal() is in sys/signal.h... */ + +Atom XA_VROOT, XA_XSETROOT_ID; +Atom XA_SCREENSAVER_VERSION, XA_SCREENSAVER_ID; +Atom XA_SCREENSAVER_TIME; + + +extern saver_info *global_si_kludge; /* I hate C so much... */ + + +static void store_activate_time (saver_info *si, Bool use_last_p); + +#define ALL_POINTER_EVENTS \ + (ButtonPressMask | ButtonReleaseMask | EnterWindowMask | \ + LeaveWindowMask | PointerMotionMask | PointerMotionHintMask | \ + Button1MotionMask | Button2MotionMask | Button3MotionMask | \ + Button4MotionMask | Button5MotionMask | ButtonMotionMask) + +/* I don't really understand Sync vs Async, but these seem to work... */ +#define grab_kbd(dpy,win) \ + XGrabKeyboard ((dpy), (win), True, GrabModeSync, GrabModeAsync, CurrentTime) +#define grab_mouse(dpy,win,cursor) \ + XGrabPointer ((dpy), (win), True, ALL_POINTER_EVENTS, \ + GrabModeAsync, GrabModeAsync, None, cursor, CurrentTime) + +void +grab_keyboard_and_mouse (Display *dpy, Window window, Cursor cursor) +{ + Status status; + XSync (dpy, False); + + status = grab_kbd (dpy, window); + if (status != GrabSuccess) + { /* try again in a second */ + sleep (1); + status = grab_kbd (dpy, window); + if (status != GrabSuccess) + fprintf (stderr, "%s: couldn't grab keyboard! (%d)\n", + progname, status); + } + status = grab_mouse (dpy, window, cursor); + if (status != GrabSuccess) + { /* try again in a second */ + sleep (1); + status = grab_mouse (dpy, window, cursor); + if (status != GrabSuccess) + fprintf (stderr, "%s: couldn't grab pointer! (%d)\n", + progname, status); + } +} + +void +ungrab_keyboard_and_mouse (Display *dpy) +{ + XUngrabPointer (dpy, CurrentTime); + XUngrabKeyboard (dpy, CurrentTime); +} + + +void +ensure_no_screensaver_running (Display *dpy, Screen *screen) +{ + int i; + Window root = RootWindowOfScreen (screen); + Window root2, parent, *kids; + unsigned int nkids; + XErrorHandler old_handler = XSetErrorHandler (BadWindow_ehandler); + + if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids)) + abort (); + if (root != root2) + abort (); + if (parent) + abort (); + for (i = 0; i < nkids; i++) + { + Atom type; + int format; + unsigned long nitems, bytesafter; + char *version; + + if (XGetWindowProperty (dpy, kids[i], XA_SCREENSAVER_VERSION, 0, 1, + False, XA_STRING, &type, &format, &nitems, + &bytesafter, (unsigned char **) &version) + == Success + && type != None) + { + char *id; + if (!XGetWindowProperty (dpy, kids[i], XA_SCREENSAVER_ID, 0, 512, + False, XA_STRING, &type, &format, &nitems, + &bytesafter, (unsigned char **) &id) + == Success + || type == None) + id = "???"; + + fprintf (stderr, + "%s: already running on display %s (window 0x%x)\n from process %s.\n", + progname, DisplayString (dpy), (int) kids [i], id); + exit (1); + } + } + + if (kids) XFree ((char *) kids); + XSync (dpy, False); + XSetErrorHandler (old_handler); +} + + + +/* Virtual-root hackery */ + +#ifdef _VROOT_H_ +ERROR! You must not include vroot.h in this file. +#endif + +static void +store_vroot_property (Display *dpy, Window win, Window value) +{ +#if 0 + if (p->verbose_p) + fprintf (stderr, + "%s: storing XA_VROOT = 0x%x (%s) = 0x%x (%s)\n", progname, + win, + (win == screensaver_window ? "ScreenSaver" : + (win == real_vroot ? "VRoot" : + (win == real_vroot_value ? "Vroot_value" : "???"))), + value, + (value == screensaver_window ? "ScreenSaver" : + (value == real_vroot ? "VRoot" : + (value == real_vroot_value ? "Vroot_value" : "???")))); +#endif + XChangeProperty (dpy, win, XA_VROOT, XA_WINDOW, 32, PropModeReplace, + (unsigned char *) &value, 1); +} + +static void +remove_vroot_property (Display *dpy, Window win) +{ +#if 0 + if (p->verbose_p) + fprintf (stderr, "%s: removing XA_VROOT from 0x%x (%s)\n", progname, win, + (win == screensaver_window ? "ScreenSaver" : + (win == real_vroot ? "VRoot" : + (win == real_vroot_value ? "Vroot_value" : "???")))); +#endif + XDeleteProperty (dpy, win, XA_VROOT); +} + + +static void +kill_xsetroot_data (Display *dpy, Window window, Bool verbose_p) +{ + Atom type; + int format; + unsigned long nitems, bytesafter; + Pixmap *dataP = 0; + + /* If the user has been using xv or xsetroot as a screensaver (to display + an image on the screensaver window, as a kind of slideshow) then the + pixmap and its associated color cells have been put in RetainPermanent + CloseDown mode. Since we're not destroying the xscreensaver window, + but merely unmapping it, we need to free these resources or those + colormap cells will stay allocated while the screensaver is off. (We + could just delete the screensaver window and recreate it later, but + that could cause other problems.) This code does an atomic read-and- + delete of the _XSETROOT_ID property, and if it held a pixmap, then we + cause the RetainPermanent resources of the client which created it + (and which no longer exists) to be freed. + */ + if (XGetWindowProperty (dpy, window, XA_XSETROOT_ID, 0, 1, + True, AnyPropertyType, &type, &format, &nitems, + &bytesafter, (unsigned char **) &dataP) + == Success + && type != None) + { + if (dataP && *dataP && type == XA_PIXMAP && format == 32 && + nitems == 1 && bytesafter == 0) + { + if (verbose_p) + printf ("%s: destroying xsetroot data (0x%lX).\n", + progname, *dataP); + XKillClient (dpy, *dataP); + } + else + fprintf (stderr, "%s: deleted unrecognised _XSETROOT_ID property: \n\ + %lu, %lu; type: %lu, format: %d, nitems: %lu, bytesafter %ld\n", + progname, (unsigned long) dataP, (dataP ? *dataP : 0), type, + format, nitems, bytesafter); + } +} + + +static void handle_signals (saver_info *si, Bool on_p); + +static void +save_real_vroot (saver_screen_info *ssi) +{ + saver_info *si = ssi->global; + Display *dpy = si->dpy; + Screen *screen = ssi->screen; + int i; + Window root = RootWindowOfScreen (screen); + Window root2, parent, *kids; + unsigned int nkids; + + ssi->real_vroot = 0; + ssi->real_vroot_value = 0; + if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids)) + abort (); + if (root != root2) + abort (); + if (parent) + abort (); + for (i = 0; i < nkids; i++) + { + Atom type; + int format; + unsigned long nitems, bytesafter; + Window *vrootP = 0; + + if (XGetWindowProperty (dpy, kids[i], XA_VROOT, 0, 1, False, XA_WINDOW, + &type, &format, &nitems, &bytesafter, + (unsigned char **) &vrootP) + != Success) + continue; + if (! vrootP) + continue; + if (ssi->real_vroot) + { + if (*vrootP == ssi->screensaver_window) abort (); + fprintf (stderr, + "%s: more than one virtual root window found (0x%x and 0x%x).\n", + progname, (int) ssi->real_vroot, (int) kids [i]); + exit (1); + } + ssi->real_vroot = kids [i]; + ssi->real_vroot_value = *vrootP; + } + + if (ssi->real_vroot) + { + handle_signals (si, True); + remove_vroot_property (si->dpy, ssi->real_vroot); + XSync (dpy, False); + } + + XFree ((char *) kids); +} + + +static Bool +restore_real_vroot_2 (saver_screen_info *ssi) +{ + saver_info *si = ssi->global; + saver_preferences *p = &si->prefs; + if (p->verbose_p && ssi->real_vroot) + printf ("%s: restoring __SWM_VROOT property on the real vroot (0x%lx).\n", + progname, (unsigned long) ssi->real_vroot); + remove_vroot_property (si->dpy, ssi->screensaver_window); + if (ssi->real_vroot) + { + store_vroot_property (si->dpy, ssi->real_vroot, ssi->real_vroot_value); + ssi->real_vroot = 0; + ssi->real_vroot_value = 0; + /* make sure the property change gets there before this process + terminates! We might be doing this because we have intercepted + SIGTERM or something. */ + XSync (si->dpy, False); + return True; + } + return False; +} + +static Bool +restore_real_vroot_1 (saver_info *si) +{ + int i; + Bool did_any = False; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (restore_real_vroot_2 (ssi)) + did_any = True; + } + return did_any; +} + +void +restore_real_vroot (saver_info *si) +{ + if (restore_real_vroot_1 (si)) + handle_signals (si, False); +} + + +/* Signal hackery to ensure that the vroot doesn't get left in an + inconsistent state + */ + +const char * +signal_name(int signal) +{ + switch (signal) { + case SIGHUP: return "SIGHUP"; + case SIGINT: return "SIGINT"; + case SIGQUIT: return "SIGQUIT"; + case SIGILL: return "SIGILL"; + case SIGTRAP: return "SIGTRAP"; +#ifdef SIGABRT + case SIGABRT: return "SIGABRT"; +#endif + case SIGFPE: return "SIGFPE"; + case SIGKILL: return "SIGKILL"; + case SIGBUS: return "SIGBUS"; + case SIGSEGV: return "SIGSEGV"; + case SIGPIPE: return "SIGPIPE"; + case SIGALRM: return "SIGALRM"; + case SIGTERM: return "SIGTERM"; +#ifdef SIGSTOP + case SIGSTOP: return "SIGSTOP"; +#endif +#ifdef SIGCONT + case SIGCONT: return "SIGCONT"; +#endif +#ifdef SIGUSR1 + case SIGUSR1: return "SIGUSR1"; +#endif +#ifdef SIGUSR2 + case SIGUSR2: return "SIGUSR2"; +#endif +#ifdef SIGEMT + case SIGEMT: return "SIGEMT"; +#endif +#ifdef SIGSYS + case SIGSYS: return "SIGSYS"; +#endif +#ifdef SIGCHLD + case SIGCHLD: return "SIGCHLD"; +#endif +#ifdef SIGPWR + case SIGPWR: return "SIGPWR"; +#endif +#ifdef SIGWINCH + case SIGWINCH: return "SIGWINCH"; +#endif +#ifdef SIGURG + case SIGURG: return "SIGURG"; +#endif +#ifdef SIGIO + case SIGIO: return "SIGIO"; +#endif +#ifdef SIGVTALRM + case SIGVTALRM: return "SIGVTALRM"; +#endif +#ifdef SIGXCPU + case SIGXCPU: return "SIGXCPU"; +#endif +#ifdef SIGXFSZ + case SIGXFSZ: return "SIGXFSZ"; +#endif +#ifdef SIGDANGER + case SIGDANGER: return "SIGDANGER"; +#endif + default: + { + static char buf[50]; + sprintf(buf, "signal %d\n", signal); + return buf; + } + } +} + + + +static RETSIGTYPE +restore_real_vroot_handler (int sig) +{ + saver_info *si = global_si_kludge; /* I hate C so much... */ + + signal (sig, SIG_DFL); + if (restore_real_vroot_1 (si)) + fprintf (real_stderr, "\n%s: %s intercepted, vroot restored.\n", + progname, signal_name(sig)); + kill (getpid (), sig); +} + +static void +catch_signal (saver_info *si, int sig, Bool on_p) +{ + if (! on_p) + signal (sig, SIG_DFL); + else + { + if (((long) signal (sig, restore_real_vroot_handler)) == -1L) + { + char buf [255]; + sprintf (buf, "%s: couldn't catch %s", progname, signal_name(sig)); + perror (buf); + saver_exit (si, 1); + } + } +} + +static void +handle_signals (saver_info *si, Bool on_p) +{ +#if 0 + if (on_p) printf ("handling signals\n"); + else printf ("unhandling signals\n"); +#endif + + catch_signal (si, SIGHUP, on_p); + catch_signal (si, SIGINT, on_p); + catch_signal (si, SIGQUIT, on_p); + catch_signal (si, SIGILL, on_p); + catch_signal (si, SIGTRAP, on_p); + catch_signal (si, SIGIOT, on_p); + catch_signal (si, SIGABRT, on_p); +#ifdef SIGEMT + catch_signal (si, SIGEMT, on_p); +#endif + catch_signal (si, SIGFPE, on_p); + catch_signal (si, SIGBUS, on_p); + catch_signal (si, SIGSEGV, on_p); +#ifdef SIGSYS + catch_signal (si, SIGSYS, on_p); +#endif + catch_signal (si, SIGTERM, on_p); +#ifdef SIGXCPU + catch_signal (si, SIGXCPU, on_p); +#endif +#ifdef SIGXFSZ + catch_signal (si, SIGXFSZ, on_p); +#endif +#ifdef SIGDANGER + catch_signal (si, SIGDANGER, on_p); +#endif +} + +void +saver_exit (saver_info *si, int status) +{ + saver_preferences *p = &si->prefs; + static Bool exiting = False; + Bool vrs; + + if (exiting) + exit(status); + + exiting = True; + + vrs = restore_real_vroot_1 (si); + emergency_kill_subproc (si); + + if (vrs && (p->verbose_p || status != 0)) + fprintf (real_stderr, "%s: vroot restored, exiting.\n", progname); + else if (p->verbose_p) + fprintf (real_stderr, "%s: no vroot to restore; exiting.\n", progname); + + fflush(real_stdout); + +#ifdef VMS /* on VMS, 1 is the "normal" exit code instead of 0. */ + if (status == 0) status = 1; + else if (status == 1) status = -1; +#endif + +#ifdef DEBUG + if (si->prefs.debug_p) + /* Do this to drop a core file, so that we can get a stack trace. */ + abort(); +#endif + + exit (status); +} + + +/* Managing the actual screensaver window */ + +Bool +window_exists_p (Display *dpy, Window window) +{ + XErrorHandler old_handler; + XWindowAttributes xgwa; + xgwa.screen = 0; + old_handler = XSetErrorHandler (BadWindow_ehandler); + XGetWindowAttributes (dpy, window, &xgwa); + XSync (dpy, False); + XSetErrorHandler (old_handler); + return (xgwa.screen != 0); +} + +static void +initialize_screensaver_window_1 (saver_screen_info *ssi) +{ + saver_info *si = ssi->global; + saver_preferences *p = &si->prefs; + + /* 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 + meantime. We could just destroy and recreate the window, but that has + its own set of problems... + */ + XColor black; + XClassHint class_hints; + XSetWindowAttributes attrs; + unsigned long attrmask; + int width = WidthOfScreen (ssi->screen); + int height = HeightOfScreen (ssi->screen); + char id [2048]; + static Bool printed_visual_info = False; /* only print the message once. */ + + black.red = black.green = black.blue = 0; + + if (ssi->cmap == DefaultColormapOfScreen (ssi->screen)) + ssi->cmap = 0; + + if (p->install_cmap_p || + ssi->current_visual != DefaultVisualOfScreen (ssi->screen)) + { + if (! ssi->cmap) + { + ssi->cmap = XCreateColormap (si->dpy, RootWindowOfScreen (ssi->screen), + ssi->current_visual, AllocNone); + if (! XAllocColor (si->dpy, ssi->cmap, &black)) abort (); + ssi->black_pixel = black.pixel; + } + } + else + { + if (ssi->cmap) + { + XFreeColors (si->dpy, ssi->cmap, &ssi->black_pixel, 1, 0); + if (ssi->cmap != ssi->demo_cmap) + XFreeColormap (si->dpy, ssi->cmap); + } + ssi->cmap = DefaultColormapOfScreen (ssi->screen); + 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; + + /* When use_mit_saver_extension or use_sgi_saver_extension is true, we won't + actually be reading these events during normal operation; but we still + need to see Button events for demo-mode to work properly. + */ + attrs.event_mask = (KeyPressMask | KeyReleaseMask | + ButtonPressMask | ButtonReleaseMask | + PointerMotionMask); + + attrs.backing_store = NotUseful; + attrs.colormap = ssi->cmap; + attrs.background_pixel = ssi->black_pixel; + attrs.backing_pixel = ssi->black_pixel; + attrs.border_pixel = ssi->black_pixel; + +#ifdef DEBUG + if (p->debug_p) width = width / 2; +#endif /* DEBUG */ + + if (!p->verbose_p || printed_visual_info) + ; + else if (ssi->current_visual == DefaultVisualOfScreen (ssi->screen)) + { + fprintf (stderr, "%s: using default visual ", progname); + describe_visual (stderr, ssi->screen, ssi->current_visual); + } + else + { + fprintf (stderr, "%s: using visual: ", progname); + describe_visual (stderr, ssi->screen, ssi->current_visual); + fprintf (stderr, "%s: default visual: ", progname); + describe_visual (stderr, ssi->screen, + DefaultVisualOfScreen (ssi->screen)); + } + printed_visual_info = True; + +#ifdef HAVE_MIT_SAVER_EXTENSION + if (p->use_mit_saver_extension) + { + XScreenSaverInfo *info; + Window root = RootWindowOfScreen (ssi->screen); + +#if 0 + /* This call sets the server screensaver timeouts to what we think + they should be (based on the resources and args xscreensaver was + started with.) It's important that we do this to sync back up + with the server - if we have turned on prematurely, as by an + ACTIVATE ClientMessage, then the server may decide to activate + the screensaver while it's already active. That's ok for us, + since we would know to ignore that ScreenSaverActivate event, + but a side effect of this would be that the server would map its + saver window (which we then hide again right away) meaning that + the bits currently on the screen get blown away. Ugly. */ + + /* #### Ok, that doesn't work - when we tell the server that the + screensaver is "off" it sends us a Deactivate event, which is + sensible... but causes the saver to never come on. Hmm. */ + disable_builtin_screensaver (si, True); +#endif /* 0 */ + +#if 0 + /* #### The MIT-SCREEN-SAVER extension gives us access to the + window that the server itself uses for saving the screen. + However, using this window in any way, in particular, calling + XScreenSaverSetAttributes() as below, tends to make the X server + crash. So fuck it, let's try and get along without using it... + + It's also inconvenient to use this window because it doesn't + always exist (though the ID is constant.) So to use this + window, we'd have to reimplement the ACTIVATE ClientMessage to + tell the *server* to tell *us* to turn on, to cause the window + to get created at the right time. Gag. */ + XScreenSaverSetAttributes (si->dpy, root, + 0, 0, width, height, 0, + current_depth, InputOutput, visual, + attrmask, &attrs); + XSync (si->dpy, False); +#endif /* 0 */ + + info = XScreenSaverAllocInfo (); + XScreenSaverQueryInfo (si->dpy, root, info); + ssi->server_mit_saver_window = info->window; + if (! ssi->server_mit_saver_window) abort (); + XFree (info); + } +#endif /* HAVE_MIT_SAVER_EXTENSION */ + + if (ssi->screensaver_window) + { + XWindowChanges changes; + unsigned int changesmask = CWX|CWY|CWWidth|CWHeight|CWBorderWidth; + changes.x = 0; + changes.y = 0; + changes.width = width; + changes.height = height; + changes.border_width = 0; + + XConfigureWindow (si->dpy, ssi->screensaver_window, + changesmask, &changes); + XChangeWindowAttributes (si->dpy, ssi->screensaver_window, + attrmask, &attrs); + } + else + { + ssi->screensaver_window = + XCreateWindow (si->dpy, RootWindowOfScreen (ssi->screen), 0, 0, + width, height, 0, ssi->current_depth, InputOutput, + ssi->current_visual, attrmask, &attrs); + reset_stderr (ssi); + store_activate_time(si, True); + if (p->verbose_p) + fprintf (stderr, "%s: saver window is 0x%lx.\n", + progname, (unsigned long) ssi->screensaver_window); + } + +#ifdef HAVE_MIT_SAVER_EXTENSION + if (!p->use_mit_saver_extension || + window_exists_p (si->dpy, ssi->screensaver_window)) + /* When using the MIT-SCREEN-SAVER extension, the window pointed to + by screensaver_window only exists while the saver is active. + So we must be careful to only try and manipulate it while it + exists... + (#### The above comment would be true if the MIT extension actually + worked, but it's not true today -- see `server_mit_saver_window'.) + */ +#endif /* HAVE_MIT_SAVER_EXTENSION */ + { + class_hints.res_name = progname; + class_hints.res_class = progclass; + XSetClassHint (si->dpy, ssi->screensaver_window, &class_hints); + XStoreName (si->dpy, ssi->screensaver_window, "screensaver"); + XChangeProperty (si->dpy, ssi->screensaver_window, + XA_SCREENSAVER_VERSION, + XA_STRING, 8, PropModeReplace, + (unsigned char *) si->version, + strlen (si->version)); + + sprintf (id, "%lu on host ", (unsigned long) getpid ()); + +# if defined(HAVE_UNAME) + { + struct utsname uts; + if (uname (&uts) < 0) + strcat (id, "???"); + else + strcat (id, uts.nodename); + } +# elif defined(VMS) + strcat (id, getenv("SYS$NODE")); +# else /* !HAVE_UNAME && !VMS */ + strcat (id, "???"); +# endif /* !HAVE_UNAME && !VMS */ + + XChangeProperty (si->dpy, ssi->screensaver_window, + XA_SCREENSAVER_ID, XA_STRING, + 8, PropModeReplace, (unsigned char *) id, strlen (id)); + + if (!ssi->cursor) + { + Pixmap bit; + bit = XCreatePixmapFromBitmapData (si->dpy, ssi->screensaver_window, + "\000", 1, 1, + BlackPixelOfScreen (ssi->screen), + BlackPixelOfScreen (ssi->screen), + 1); + ssi->cursor = XCreatePixmapCursor (si->dpy, bit, bit, &black, &black, + 0, 0); + XFreePixmap (si->dpy, bit); + } + + XSetWindowBackground (si->dpy, ssi->screensaver_window, + ssi->black_pixel); + if (si->demo_mode_p) + XUndefineCursor (si->dpy, ssi->screensaver_window); + else + XDefineCursor (si->dpy, ssi->screensaver_window, ssi->cursor); + } +} + +void +initialize_screensaver_window (saver_info *si) +{ + int i; + for (i = 0; i < si->nscreens; i++) + initialize_screensaver_window_1 (&si->screens[i]); +} + + +void +raise_window (saver_info *si, + Bool inhibit_fade, Bool between_hacks_p, Bool dont_clear) +{ + saver_preferences *p = &si->prefs; + int i; + + initialize_screensaver_window (si); + reset_watchdog_timer (si, True); + + if (p->fade_p && !inhibit_fade && !si->demo_mode_p) + { + int grabbed = -1; + Colormap *current_maps = (Colormap *) + calloc(sizeof(Colormap), si->nscreens); + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + current_maps[i] = (between_hacks_p + ? ssi->cmap + : DefaultColormapOfScreen (ssi->screen)); + } + + if (p->verbose_p) fprintf (stderr, "%s: fading... ", progname); + + XGrabServer (si->dpy); + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + + /* grab and blacken mouse on the root window (saver not mapped yet) + */ + if (grabbed != GrabSuccess) + grabbed = grab_mouse (si->dpy, ssi->screensaver_window, + (si->demo_mode_p ? 0 : ssi->cursor)); + + if (!dont_clear || ssi->stderr_overlay_window) + /* Do this before the fade, since the stderr cmap won't fade + even if we uninstall it (beats me...) */ + clear_stderr (ssi); + } + + fade_screens (si->dpy, current_maps, p->fade_seconds, p->fade_ticks, + True); + + if (p->verbose_p) fprintf (stderr, "fading done.\n"); + + 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); + } + + if (grabbed == GrabSuccess) + XUngrabPointer (si->dpy, CurrentTime); + XUngrabServer (si->dpy); + } + else + { + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (!dont_clear) + XClearWindow (si->dpy, ssi->screensaver_window); + if (!dont_clear || ssi->stderr_overlay_window) + clear_stderr (ssi); + 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 */ + } + } + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->cmap) + XInstallColormap (si->dpy, ssi->cmap); + } +} + +void +blank_screen (saver_info *si) +{ + int i; + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + + save_real_vroot (ssi); + store_vroot_property (si->dpy, + ssi->screensaver_window, + ssi->screensaver_window); + } + store_activate_time (si, True); + raise_window (si, False, False, False); + /* #### */ + grab_keyboard_and_mouse (si->dpy, si->screens[0].screensaver_window, + (si->demo_mode_p ? 0 : si->screens[0].cursor)); +#ifdef HAVE_XHPDISABLERESET + if (si->locked_p && !hp_locked_p) + { + XHPDisableReset (si->dpy); /* turn off C-Sh-Reset */ + hp_locked_p = True; + } +#endif + + si->screen_blanked_p = True; +} + +void +unblank_screen (saver_info *si) +{ + saver_preferences *p = &si->prefs; + int i, j; + + store_activate_time (si, True); + reset_watchdog_timer (si, False); + + 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); + + if (p->verbose_p) fprintf (stderr, "%s: unfading... ", progname); + + /* 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]); + } + } + + XGrabServer (si->dpy); + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + 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); + + for (i = 0; i < ncmaps; i++) + if (cmaps[i]) XFreeColormap (si->dpy, cmaps[i]); + free (cmaps); + + if (p->verbose_p) fprintf (stderr, "unfading done.\n"); + if (grabbed == GrabSuccess) + XUngrabPointer (si->dpy, CurrentTime); + } + else + { + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (ssi->cmap) + { + Colormap c = DefaultColormapOfScreen (ssi->screen); + /* avoid technicolor */ + XClearWindow (si->dpy, ssi->screensaver_window); + if (c) XInstallColormap (si->dpy, c); + } + XUnmapWindow (si->dpy, ssi->screensaver_window); + } + } + + + /* If the focus window does has a non-default colormap, then install + that colormap as well. (On SGIs, this will cause both the root map + and the focus map to be installed simultaniously. It'd be nice to + pick up the other colormaps that had been installed, too; perhaps + XListInstalledColormaps could be used for that?) + */ + { + Window focus = 0; + int revert_to; + XGetInputFocus (si->dpy, &focus, &revert_to); + if (focus && focus != PointerRoot && focus != None) + { + XWindowAttributes xgwa; + xgwa.colormap = 0; + XGetWindowAttributes (si->dpy, focus, &xgwa); + if (xgwa.colormap && + xgwa.colormap != DefaultColormapOfScreen (xgwa.screen)) + XInstallColormap (si->dpy, xgwa.colormap); + } + } + + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + kill_xsetroot_data (si->dpy, ssi->screensaver_window, p->verbose_p); + } + + ungrab_keyboard_and_mouse (si->dpy); + restore_real_vroot (si); + +#ifdef HAVE_XHPDISABLERESET + if (hp_locked_p) + { + XHPEnableReset (si->dpy); /* turn C-Sh-Reset back on */ + hp_locked_p = False; + } +#endif + + si->screen_blanked_p = False; +} + + +static void +store_activate_time (saver_info *si, Bool use_last_p) +{ + static time_t last_time = 0; + time_t now = ((use_last_p && last_time) ? last_time : time ((time_t) 0)); + CARD32 now32 = (CARD32) now; + int i; + last_time = now; + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + if (!ssi->screensaver_window) continue; + XChangeProperty (si->dpy, ssi->screensaver_window, XA_SCREENSAVER_TIME, + XA_INTEGER, 32, PropModeReplace, + (unsigned char *) &now32, 1); + } +} + + +Bool +select_visual (saver_screen_info *ssi, const char *visual_name) +{ + saver_info *si = ssi->global; + saver_preferences *p = &si->prefs; + Visual *new_v; + Bool got_it; + + if (visual_name && *visual_name) + new_v = get_visual (ssi->screen, visual_name, True, False); + else + new_v = ssi->default_visual; + + got_it = !!new_v; + + if (new_v && ssi->current_visual != new_v) + { + Colormap old_c = ssi->cmap; + Window old_w = ssi->screensaver_window; + + if (p->verbose_p) + { +#if 0 + fprintf (stderr, "%s: switching visuals\tfrom: ", progname); + describe_visual (stderr, ssi->screen, ssi->current_visual); + fprintf (stderr, "\t\t\t\tto: "); + describe_visual (stderr, ssi->screen, new_v); +#else + fprintf (stderr, "%s: switching to visual ", progname); + describe_visual (stderr, ssi->screen, new_v); +#endif + } + + reset_stderr (ssi); + ssi->current_visual = new_v; + ssi->current_depth = visual_depth(ssi->screen, new_v); + ssi->cmap = 0; + ssi->screensaver_window = 0; + + initialize_screensaver_window_1 (ssi); + raise_window (si, True, True, False); + store_vroot_property (si->dpy, + ssi->screensaver_window, ssi->screensaver_window); + store_activate_time (si, False); + + XDestroyWindow (si->dpy, old_w); + if (old_c && + old_c != DefaultColormapOfScreen (ssi->screen) && + old_c != ssi->demo_cmap) + XFreeColormap (si->dpy, old_c); + } + + return got_it; +} diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c new file mode 100644 index 00000000..09ae5a01 --- /dev/null +++ b/driver/xscreensaver-command.c @@ -0,0 +1,255 @@ +/* xscreensaver-command, Copyright (c) 1991-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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include /* for CARD32 */ +#include +#include +#include /* for XGetClassHint() */ +#include +#include + +#include "version.h" + +#ifdef _VROOT_H_ +ERROR! you must not include vroot.h in this file +#endif + +static char *screensaver_version; +static char *usage = "usage: %s -\n\ +\n\ + This program provides external control of a running xscreensaver process.\n\ + Version %s, copyright (c) 1991-1997 Jamie Zawinski .\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\ + -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\ +\n\ + See the man page for more details.\n\ + For updates, check http://people.netscape.com/jwz/xscreensaver/\n\ +\n"; + +static Window +find_screensaver_window (Display *dpy, char *progname, char **version) +{ + int i; + Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy)); + Window root2, parent, *kids; + unsigned int nkids; + + if (version) *version = 0; + + if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids)) + abort (); + if (root != root2) + abort (); + if (parent) + abort (); + if (! (kids && nkids)) + abort (); + for (i = 0; i < nkids; i++) + { + Atom type; + int format; + unsigned long nitems, bytesafter; + char *v; + + if (XGetWindowProperty (dpy, kids[i], + XInternAtom (dpy, "_SCREENSAVER_VERSION", False), + 0, 200, False, XA_STRING, + &type, &format, &nitems, &bytesafter, + (unsigned char **) &v) + == Success + && type != None) + { + if (version) + *version = v; + return kids[i]; + } + } + fprintf (stderr, "%s: no screensaver is running on display %s\n", progname, + DisplayString (dpy)); + exit (1); +} + + +#define USAGE() \ + { fprintf (stderr, usage, argv[0], screensaver_version); exit (1); } + +int +main (int argc, char **argv) +{ + Display *dpy; + Window window; + int i; + int query = 0; +#define Q_version 1 +#define Q_time 2 + char *message = 0, *dpyname = 0; + char *v = 0; + + screensaver_version = (char *) malloc (5); + memcpy (screensaver_version, screensaver_id + 17, 4); + screensaver_version [4] = 0; + for (i = 1; i < argc; i++) + { + char *s = argv [i]; + int L = strlen (s); + if (L < 2) USAGE (); + if (!strncmp (s, "-display", L)) dpyname = argv [++i]; + else if (message) USAGE () + else if (!strncmp (s, "-activate", L)) message = "ACTIVATE"; + else if (!strncmp (s, "-deactivate", L)) message = "DEACTIVATE"; + else if (!strncmp (s, "-cycle", L)) message = "CYCLE"; + else if (!strncmp (s, "-next", L)) message = "NEXT"; + else if (!strncmp (s, "-prev", L)) message = "PREV"; + else if (!strncmp (s, "-exit", L)) message = "EXIT"; + else if (!strncmp (s, "-restart", L)) message = "RESTART"; + else if (!strncmp (s, "-demo", L)) message = "DEMO"; + else if (!strncmp (s, "-lock", L)) message = "LOCK"; + else if (!strncmp (s, "-version", L)) query = Q_version; + else if (!strncmp (s, "-time", L)) query = Q_time; + else USAGE (); + } + if (!message && !query) USAGE (); + if (!dpyname) dpyname = (char *) getenv ("DISPLAY"); + dpy = XOpenDisplay (dpyname); + if (!dpy) + { + fprintf (stderr, "%s: can't open display %s\n", argv[0], + (dpyname ? dpyname : "(null)")); + exit (1); + } + window = find_screensaver_window (dpy, argv[0], &v); + + if (message) + { + XEvent event; + event.xany.type = ClientMessage; + event.xclient.display = dpy; + event.xclient.window = window; + event.xclient.message_type = XInternAtom (dpy, "SCREENSAVER", False); + event.xclient.format = 32; + event.xclient.data.l[0] = (long) XInternAtom (dpy, message, False); + if (! XSendEvent (dpy, window, False, 0L, &event)) + { + fprintf (stderr, "%s: XSendEvent(dpy, 0x%x ...) failed.\n", argv [0], + (unsigned int) window); + exit (1); + } + } + else if (query) + { + XClassHint hint; + memset (&hint, 0, sizeof(hint)); + if (!v || !*v) + { + fprintf (stderr, "%s: version property not set on window 0x%x?\n", + argv [0], (unsigned int) window); + exit (1); + } + + XGetClassHint(dpy, window, &hint); + if (!hint.res_class) + { + fprintf (stderr, "%s: class hints not set on window 0x%x?\n", + argv [0], (unsigned int) window); + exit (1); + } + + fprintf (stdout, "%s %s", hint.res_class, v); + + if (query != Q_time) + { + fprintf (stdout, "\n"); + } + else + { + Atom type; + int format; + unsigned long nitems, bytesafter; + unsigned char *data = 0; + XWindowAttributes xgwa; + Bool active_p = False; + + xgwa.map_state = IsViewable; + XGetWindowAttributes (dpy, window, &xgwa); + + if (XGetWindowProperty (dpy, window, + XInternAtom (dpy, "__SWM_VROOT", False), + 0, 0, False, XA_WINDOW, + &type, &format, &nitems, &bytesafter, + &data) + == Success + && type != None) + active_p = True; + + if (data) free (data); + data = 0; + + if (XGetWindowProperty (dpy, window, + XInternAtom (dpy, "_SCREENSAVER_TIME",False), + 0, 1, False, XA_INTEGER, + &type, &format, &nitems, &bytesafter, + &data) + == Success + && type == XA_INTEGER + && data) + { + CARD32 time32 = *((CARD32 *)data); + time_t tt = (time_t) time32; + + if (active_p) + fprintf (stdout, ": active since "); + else + fprintf (stdout, ": inactive since "); + fprintf (stdout, "%s", ctime(&tt)); + if (data) free (data); + } + else + { + if (data) free (data); + fprintf (stdout, "\n"); + fflush (stdout); + fprintf (stderr, "%s: no time on window 0x%x (%s %s).\n", + argv[0], (unsigned int) window, + hint.res_class, (v ? v : "???")); + exit (1); + } + } + } + + XSync (dpy, 0); + fflush (stdout); + fflush (stderr); + exit (0); +} diff --git a/driver/xscreensaver-command.man b/driver/xscreensaver-command.man new file mode 100644 index 00000000..1416fe8c --- /dev/null +++ b/driver/xscreensaver-command.man @@ -0,0 +1,132 @@ +.de EX \"Begin example +.ne 5 +.if n .sp 1 +.if t .sp .5 +.nf +.in +.5i +.. +.de EE +.fi +.in -.5i +.if n .sp 1 +.if t .sp .5 +.. +.TH XScreenSaver 1 "31-May-97" "X Version 11" +.SH NAME +xscreensaver-command - control a running xscreensaver process +.SH SYNOPSIS +.B xscreensaver-command +[\-help] [\-demo] [\-activate] [\-deactivate] [\-lock] [\-cycle] [\-next] [\-prev] [\-exit] [\-restart] [\-version] [\-time] +.SH DESCRIPTION +The \fIxscreensaver\-command\fP program controls a running \fIxscreensaver\fP +process by sending it client-messages. +.SH OPTIONS +.I xscreensaver-command +accepts the following options: +.TP 8 +.B \-help +Prints a brief summary of command-line options. +.TP 8 +.B \-demo +Cause the screensaver to enter its interactive demo mode, in which one +can experiment with the various graphics hacks available. See +.BR xscreensaver (1) +for details. +.TP 8 +.B \-activate +Tell the screensaver to turn on immediately (that is, pretend that the +user been idle for long enough.) It will turn off as soon as there is +any user activity, as usual. + +It is useful to run this from a menu; you may wish to run it as +.EX +sleep 5 ; xscreensaver-command -activate +.EE +to be sure that you have time to remove your hand from the mouse before +the screensaver comes on. +.TP 8 +.B \-deactivate +Tell the screensaver to turn off, as if there had been user activity. +If locking is enabled, then the screensaver will prompt for a password +as usual. +.TP 8 +.B \-lock +Like \fI\-activate\fP, but a password will be required before the screensaver +turns off, even if the screensaver's \fIlock\fP resource is false. The +display will be locked immediately even if the screensaver's \fIlockTimeout\fP +resource is non-zero. +.TP 8 +.B \-cycle +Tell the screensaver to change which graphics hack it is running, just +as if the ``cycle'' timer had expired. A new hack will be chosen randomly. +.TP 8 +.B \-next +This is like either \fI\-activate\fP or \fI\-cycle\fP, depending on which is +more appropriate, except that the screenhack that will be run is the next +one in the list of programs, instead of a randomly-chosen one. Repeatedly +executing this will cycle through each hack in turn (though using +the \fI\-demo\fP option is probably an easier way to accomplish that.) +.TP 8 +.B \-prev +This is like \fI\-next\fP, but cycles in the other direction. +.TP 8 +.B \-exit +Causes the screensaver process to exit gracefully. This is a safer and +easier way to kill the screensaver than by using \fIkill\fP. + +.B Warning: +never use \fIkill -9\fP with \fIxscreensaver\fP while the screensaver is +active. If you are using a virtual root window manager, that can leave +things in an inconsistent state, and you may need to restart your window +manager to repair the damage. +.TP 8 +.B \-restart +Causes the screensaver process to exit and then restart with the same command +line arguments. This is a good way of causing the screensaver to re-read the +resource database. + +If the screensaver is run from \fIxdm(1)\fP (that is, it is already running +before you log in) then you may want to issue the ``restart'' command from +one of your startup scripts, so that the screensaver gets your resource +settings instead of the default ones. +.TP 8 +.B \-version +Print (on stdout) the version number of the xscreensaver program that is +running on $DISPLAY. (To see the version number of \fIxscreensaver-command\fP +itself, use the \fI\-help\fP option.) +.TP 8 +.B \-time +This option prints on stdout the time at which the screensaver last activated +(blanked the screen) or deactivated (restored the screen.) Note that the +activation-time is not the last time at which the user was active, but is +some time later (it is the time at which either: xscreensaver decided that +the user has been idle long enough; or, the user explicitly activated the +screensaver or locker.) +.SH ENVIRONMENT +.PP +.TP 8 +.B DISPLAY +to get the host and display number of the screen whose saver is +to be manipulated. +.TP 8 +.B PATH +to find the executable to restart (for the \fI\-restart\fP command). +Note that this variable is consulted in the environment of +the \fIxscreensaver\fP process, not the \fIxscreensaver-command\fP process. +.SH "SEE ALSO" +.BR X (1), +.BR xscreensaver (1) +.SH BUGS +Some diagnostics are reported on the stderr of the \fIxscreensaver\fP +process, not this process, so the caller of \fIxscreensaver-command\fP +may not see the error messages. +.SH COPYRIGHT +Copyright \(co 1992, 1993, 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 , 13-aug-92. diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c new file mode 100644 index 00000000..0d5796b8 --- /dev/null +++ b/driver/xscreensaver.c @@ -0,0 +1,1128 @@ +/* xscreensaver, Copyright (c) 1991-1997 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. + */ + +/* ======================================================================== + * First we wait until the keyboard and mouse become idle for the specified + * amount of time. We do this in one of three different ways: periodically + * checking with the XIdle server extension; selecting key and mouse events + * on (nearly) all windows; or by waiting for the MIT-SCREEN-SAVER extension + * to send us a "you are idle" event. + * + * Then, we map a full screen black window (or, in the case of the + * MIT-SCREEN-SAVER extension, use the one it gave us.) + * + * We place a __SWM_VROOT property on this window, so that newly-started + * clients will think that this window is a "virtual root" window. + * + * If there is an existing "virtual root" window (one that already had + * an __SWM_VROOT property) then we remove that property from that window. + * Otherwise, clients would see that window (the real virtual root) instead + * of ours (the impostor.) + * + * Then we pick a random program to run, and start it. Two assumptions + * are made about this program: that it has been specified with whatever + * command-line options are necessary to make it run on the root window; + * and that it has been compiled with vroot.h, so that it is able to find + * the root window when a virtual-root window manager (or this program) is + * running. + * + * Then, we wait for keyboard or mouse events to be generated on the window. + * When they are, we kill the inferior process, unmap the window, and restore + * the __SWM_VROOT property to the real virtual root window if there was one. + * + * While we are waiting, we also set up timers so that, after a certain + * amount of time has passed, we can start a different screenhack. We do + * this by killing the running child process with SIGTERM, and then starting + * a new one in the same way. + * + * If there was a real virtual root, meaning that we removed the __SWM_VROOT + * property from it, meaning we must (absolutely must) restore it before we + * exit, then we set up signal handlers for most signals (SIGINT, SIGTERM, + * etc.) that do this. Most Xlib and Xt routines are not reentrant, so it + * is not generally safe to call them from signal handlers; however, this + * program spends most of its time waiting, so the window of opportunity + * when code could be called reentrantly is fairly small; and also, the worst + * that could happen is that the call would fail. If we've gotten one of + * these signals, then we're on our way out anyway. If we didn't restore the + * __SWM_VROOT property, that would be very bad, so it's worth a shot. Note + * that this means that, if you're using a virtual-root window manager, you + * can really fuck up the world by killing this process with "kill -9". + * + * This program accepts ClientMessages of type SCREENSAVER; these messages + * may contain the atom ACTIVATE or DEACTIVATE, meaning to turn the + * screensaver on or off now, regardless of the idleness of the user, + * and a few other things. The included "xscreensaver_command" program + * sends these messsages. + * + * If we don't have the XIdle, MIT-SCREEN-SAVER, or SGI SCREEN_SAVER + * extensions, then we do the XAutoLock trick: notice every window that + * gets created, and wait 30 seconds or so until its creating process has + * settled down, and then select KeyPress events on those windows which + * already select for KeyPress events. It's important that we not select + * KeyPress on windows which don't select them, because that would + * interfere with event propagation. This will break if any program + * changes its event mask to contain KeyRelease or PointerMotion more than + * 30 seconds after creating the window, but that's probably pretty rare. + * + * The reason that we can't select KeyPresses on windows that don't have + * them already is that, when dispatching a KeyPress event, X finds the + * lowest (leafmost) window in the hierarchy on which *any* client selects + * for KeyPress, and sends the event to that window. This means that if a + * client had a window with subwindows, and expected to receive KeyPress + * events on the parent window instead of the subwindows, then that client + * would malfunction if some other client selected KeyPress events on the + * subwindows. It is an incredible misdesign that one client can make + * another client malfunction in this way. + * + * To detect mouse motion, we periodically wake up and poll the mouse + * position and button/modifier state, and notice when something has + * changed. We make this check every five seconds by default, and since the + * screensaver timeout has a granularity of one minute, this makes the + * chance of a false positive very small. We could detect mouse motion in + * the same way as keyboard activity, but that would suffer from the same + * "client changing event mask" problem that the KeyPress events hack does. + * I think polling is more reliable. + * + * None of this crap happens if we're using one of the extensions, so install + * one of them if the description above sounds just too flaky to live. It + * is, but those are your choices. + * + * A third idle-detection option could be implemented (but is not): when + * running on the console display ($DISPLAY is `localhost`:0) and we're on a + * machine where /dev/tty and /dev/mouse have reasonable last-modification + * times, we could just stat() those. But the incremental benefit of + * implementing this is really small, so forget I said anything. + * + * Debugging hints: + * - Have a second terminal handy. + * - Be careful where you set your breakpoints, you don't want this to + * stop under the debugger with the keyboard grabbed or the blackout + * window exposed. + * - If you run your debugger under XEmacs, try M-ESC (x-grab-keyboard) + * to keep your emacs window alive even when xscreensaver has grabbed. + * - Go read the code related to -DDEBUG. + * - You probably can't set breakpoints in functions that are called on + * the other side of a call to fork() -- if your clients are dying + * with signal 5, Trace/BPT Trap, you're losing in this way. + * - If you aren't using a server extension, don't leave this stopped + * under the debugger for very long, or the X input buffer will get + * huge because of the keypress events it's selecting for. This can + * make your X server wedge with "no more input buffers." + * + * ======================================================================== */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_XMU +# ifndef VMS +# include +# else /* !VMS */ +# include +# endif /* !VMS */ +#else /* !HAVE_XMU */ +# include "xmu.h" +#endif /* !HAVE_XMU */ + +#ifdef HAVE_XIDLE_EXTENSION +#include +#endif /* HAVE_XIDLE_EXTENSION */ + +#include "xscreensaver.h" +#include "version.h" +#include "yarandom.h" +#include "resources.h" +#include "visual.h" + +saver_info *global_si_kludge = 0; /* I hate C so much... */ + +char *progname = 0; +char *progclass = 0; +XrmDatabase db = 0; + + +static Atom XA_SCREENSAVER; +static Atom XA_ACTIVATE, XA_DEACTIVATE, XA_CYCLE, XA_NEXT, XA_PREV; +static Atom XA_EXIT, XA_RESTART, XA_DEMO, XA_LOCK; + + +static XrmOptionDescRec options [] = { + { "-timeout", ".timeout", XrmoptionSepArg, 0 }, + { "-cycle", ".cycle", XrmoptionSepArg, 0 }, + { "-idelay", ".initialDelay", XrmoptionSepArg, 0 }, + { "-nice", ".nice", XrmoptionSepArg, 0 }, + { "-visual", ".visualID", XrmoptionSepArg, 0 }, + { "-lock-timeout", ".lockTimeout", XrmoptionSepArg, 0 }, + { "-install", ".installColormap", XrmoptionNoArg, "on" }, + { "-no-install", ".installColormap", XrmoptionNoArg, "off" }, + { "-verbose", ".verbose", XrmoptionNoArg, "on" }, + { "-silent", ".verbose", XrmoptionNoArg, "off" }, + { "-xidle-extension", ".xidleExtension", XrmoptionNoArg, "on" }, + { "-no-xidle-extension", ".xidleExtension", XrmoptionNoArg, "off" }, + { "-mit-extension", ".mitSaverExtension",XrmoptionNoArg, "on" }, + { "-no-mit-extension", ".mitSaverExtension",XrmoptionNoArg, "off" }, + { "-sgi-extension", ".sgiSaverExtension",XrmoptionNoArg, "on" }, + { "-no-sgi-extension", ".sgiSaverExtension",XrmoptionNoArg, "off" }, + { "-lock", ".lock", XrmoptionNoArg, "on" }, + { "-no-lock", ".lock", XrmoptionNoArg, "off" } +}; + +static char *defaults[] = { +#include "XScreenSaver_ad.h" + 0 +}; + +static void +do_help (saver_info *si) +{ + printf ("\ +xscreensaver %s, copyright (c) 1991-1997 by Jamie Zawinski \n\ +The standard Xt command-line options are accepted; other options include:\n\ +\n\ + -timeout When the screensaver should activate.\n\ + -cycle How long to let each hack run.\n\ + -idelay How long to sleep before startup.\n\ + -visual Which X visual to run on.\n\ + -demo Enter interactive demo mode on startup.\n\ + -install Install a private colormap.\n\ + -no-install Don't.\n\ + -verbose Be loud.\n\ + -silent Don't.\n\ + -xidle-extension Use the R5 XIdle server extension.\n\ + -no-xidle-extension Don't.\n\ + -mit-extension Use the R6 MIT_SCREEN_SAVER server extension.\n\ + -no-mit-extension Don't.\n\ + -sgi-extension Use the SGI SCREEN-SAVER server extension.\n\ + -no-sgi-extension Don't.\n\ + -lock Require a password before deactivating.\n\ + -no-lock Don't.\n\ + -lock-timeout Grace period before locking; default 0.\n\ + -help This message.\n\ +\n\ +Use the `xscreensaver-command' program to control a running screensaver.\n\ +\n\ +The *programs resource controls which graphics demos will be launched by the\n\ +screensaver. See the man page for more details. For updates, check\n\ +http://people.netscape.com/jwz/xscreensaver/\n\n", + si->version); + +#ifdef NO_LOCKING + printf ("Support for locking was not enabled at compile-time.\n"); +#endif +#ifdef NO_DEMO_MODE + printf ("Support for demo mode was not enabled at compile-time.\n"); +#endif +#if !defined(HAVE_XIDLE_EXTENSION) && !defined(HAVE_MIT_SAVER_EXTENSION) && !defined(HAVE_SGI_SAVER_EXTENSION) + printf ("Support for the XIDLE, SCREEN_SAVER, and MIT-SCREEN-SAVER server\ + extensions\nwas not enabled at compile-time.\n"); +#endif /* !HAVE_XIDLE_EXTENSION && !HAVE_MIT_SAVER_EXTENSION && !HAVE_SGI_SAVER_EXTENSION */ + + fflush (stdout); + exit (1); +} + + +static char * +reformat_hack(const char *hack) +{ + int i; + const char *in = hack; + int indent = 13; + char *h2 = (char *) malloc(strlen(in) + indent + 2); + char *out = h2; + + while (isspace(*in)) in++; /* skip whitespace */ + while (!isspace(*in) && *in != ':') + *out++ = *in++; /* snarf first token */ + while (isspace(*in)) in++; /* skip whitespace */ + + if (*in == ':') + *out++ = *in++; /* copy colon */ + else + { + in = hack; + out = h2; /* reset to beginning */ + } + + *out = 0; + + while (isspace(*in)) in++; /* skip whitespace */ + for (i = strlen(h2); i < indent; i++) /* indent */ + *out++ = ' '; + + while (*in) *out++ = *in++; /* copy rest of line */ + *out = 0; + + return h2; +} + + +static void +get_screenhacks (saver_info *si) +{ + saver_preferences *p = &si->prefs; + int i = 0; + int hacks_size = 60; + int size; + char *d; + + d = get_string_resource ("monoPrograms", "MonoPrograms"); + if (d && !*d) { free(d); d = 0; } + if (!d) + d = get_string_resource ("colorPrograms", "ColorPrograms"); + if (d && !*d) { free(d); d = 0; } + + if (d) + { + fprintf (stderr, + "%s: the `monoPrograms' and `colorPrograms' resources are obsolete;\n\ + see the manual for details.\n", progname); + free(d); + } + + d = get_string_resource ("programs", "Programs"); + + size = strlen (d); + p->screenhacks = (char **) malloc (sizeof (char *) * hacks_size); + p->screenhacks_count = 0; + + while (i < size) + { + int end, start = i; + if (d[i] == ' ' || d[i] == '\t' || d[i] == '\n' || d[i] == 0) + { + i++; + continue; + } + if (hacks_size <= p->screenhacks_count) + p->screenhacks = (char **) realloc (p->screenhacks, + (hacks_size = hacks_size * 2) * + sizeof (char *)); + p->screenhacks [p->screenhacks_count++] = d + i; + while (d[i] != 0 && d[i] != '\n') + i++; + end = i; + while (i > start && (d[i-1] == ' ' || d[i-1] == '\t')) + i--; + d[i] = 0; + i = end + 1; + } + + /* shrink all whitespace to one space, for the benefit of the "demo" + mode display. We only do this when we can easily tell that the + whitespace is not significant (no shell metachars). + */ + for (i = 0; i < p->screenhacks_count; i++) + { + char *s = p->screenhacks [i]; + char *s2; + int L = strlen (s); + int j, k; + for (j = 0; j < L; j++) + { + switch (s[j]) + { + case '\'': case '"': case '`': case '\\': + goto DONE; + case '\t': + s[j] = ' '; + case ' ': + k = 0; + for (s2 = s+j+1; *s2 == ' ' || *s2 == '\t'; s2++) + k++; + if (k > 0) + for (s2 = s + j + 1; *s2; s2++) + s2 [0] = s2 [k]; + break; + } + } + DONE: + p->screenhacks[i] = reformat_hack(s); /* mallocs */ + } + + if (p->screenhacks_count) + { + /* Shrink down the screenhacks array to be only as big as it needs to. + This doesn't really matter at all. */ + p->screenhacks = (char **) + realloc (p->screenhacks, ((p->screenhacks_count + 1) * + sizeof(char *))); + p->screenhacks [p->screenhacks_count] = 0; + } + else + { + free (p->screenhacks); + p->screenhacks = 0; + } +} + + +static void +get_resources (saver_info *si) +{ + char *s; + saver_preferences *p = &si->prefs; + + p->verbose_p = get_boolean_resource ("verbose", "Boolean"); + p->lock_p = get_boolean_resource ("lock", "Boolean"); + p->fade_p = get_boolean_resource ("fade", "Boolean"); + p->unfade_p = get_boolean_resource ("unfade", "Boolean"); + p->fade_seconds = get_seconds_resource ("fadeSeconds", "Time"); + p->fade_ticks = get_integer_resource ("fadeTicks", "Integer"); + p->install_cmap_p = get_boolean_resource ("installColormap", "Boolean"); + p->nice_inferior = get_integer_resource ("nice", "Nice"); + + p->initial_delay = get_seconds_resource ("initialDelay", "Time"); + p->timeout = 1000 * get_minutes_resource ("timeout", "Time"); + p->lock_timeout = 1000 * get_minutes_resource ("lockTimeout", "Time"); + p->cycle = 1000 * get_minutes_resource ("cycle", "Time"); + +#ifndef NO_LOCKING + p->passwd_timeout = 1000 * get_seconds_resource ("passwdTimeout", "Time"); +#endif + + p->pointer_timeout = 1000 * get_seconds_resource ("pointerPollTime", "Time"); + p->notice_events_timeout = 1000*get_seconds_resource("windowCreationTimeout", + "Time"); + p->shell = get_string_resource ("bourneShell", "BourneShell"); + + + /* don't set use_xidle_extension unless it is explicitly specified */ + if ((s = get_string_resource ("xidleExtension", "Boolean"))) + p->use_xidle_extension = get_boolean_resource ("xidleExtension","Boolean"); + else +#ifdef HAVE_XIDLE_EXTENSION /* pick a default */ + p->use_xidle_extension = True; /* if we have it, use it */ +#else /* !HAVE_XIDLE_EXTENSION */ + p->use_xidle_extension = False; +#endif /* !HAVE_XIDLE_EXTENSION */ + if (s) free (s); + + /* don't set use_mit_extension unless it is explicitly specified */ + if ((s = get_string_resource ("mitSaverExtension", "Boolean"))) + p->use_mit_saver_extension = get_boolean_resource ("mitSaverExtension", + "Boolean"); + else +#ifdef HAVE_MIT_SAVER_EXTENSION /* pick a default */ + p->use_mit_saver_extension = False; /* Default false, because it sucks */ +#else /* !HAVE_MIT_SAVER_EXTENSION */ + p->use_mit_saver_extension = False; +#endif /* !HAVE_MIT_SAVER_EXTENSION */ + if (s) free (s); + + + /* don't set use_mit_extension unless it is explicitly specified */ + if ((s = get_string_resource ("sgiSaverExtension", "Boolean"))) + p->use_sgi_saver_extension = get_boolean_resource ("sgiSaverExtension", + "Boolean"); + else +#ifdef HAVE_SGI_SAVER_EXTENSION /* pick a default */ + p->use_sgi_saver_extension = True; /* if we have it, use it */ +#else /* !HAVE_SGI_SAVER_EXTENSION */ + p->use_sgi_saver_extension = False; +#endif /* !HAVE_SGI_SAVER_EXTENSION */ + if (s) free (s); + + + /* Throttle the various timeouts to reasonable values. + */ +#ifndef NO_LOCKING + if (p->passwd_timeout == 0) p->passwd_timeout = 30000; /* 30 secs */ +#endif + if (p->timeout < 10000) p->timeout = 10000; /* 10 secs */ + if (p->cycle != 0 && p->cycle < 2000) p->cycle = 2000; /* 2 secs */ + if (p->pointer_timeout == 0) p->pointer_timeout = 5000; /* 5 secs */ + if (p->notice_events_timeout == 0) + p->notice_events_timeout = 10000; /* 10 secs */ + if (p->fade_seconds == 0 || p->fade_ticks == 0) + p->fade_p = False; + if (! p->fade_p) p->unfade_p = False; + + p->watchdog_timeout = p->cycle; + if (p->watchdog_timeout < 30000) p->watchdog_timeout = 30000; /* 30 secs */ + if (p->watchdog_timeout > 3600000) p->watchdog_timeout = 3600000; /* 1 hr */ + +#ifdef NO_LOCKING + si->locking_disabled_p = True; + si->nolock_reason = "not compiled with locking support"; + if (p->lock_p) + { + p->lock_p = False; + fprintf (stderr, "%s: not compiled with support for locking.\n", + progname); + } +#else /* ! NO_LOCKING */ + if (p->lock_p && si->locking_disabled_p) + { + fprintf (stderr, "%s: locking is disabled (%s).\n", progname, + si->nolock_reason); + p->lock_p = False; + } +#endif /* ! NO_LOCKING */ + + get_screenhacks (si); + +#ifdef DEBUG + if (p->debug_p) + { + XSynchronize(si->dpy, True); + p->verbose_p = True; + p->initial_delay = 0; + } +#endif /* DEBUG */ +} + + +char * +timestring (void) +{ + time_t now = time ((time_t *) 0); + char *str = (char *) ctime (&now); + char *nl = (char *) strchr (str, '\n'); + if (nl) *nl = 0; /* take off that dang newline */ + return str; +} + +static void initialize (saver_info *si, int argc, char **argv); +static void main_loop (saver_info *si); + +int +main (int argc, char **argv) +{ + saver_info si; + memset(&si, 0, sizeof(si)); + global_si_kludge = &si; /* I hate C so much... */ + initialize (&si, argc, argv); + main_loop (&si); /* doesn't return */ + return 0; +} + + +int +saver_ehandler (Display *dpy, XErrorEvent *error) +{ + saver_info *si = global_si_kludge; /* I hate C so much... */ + + fprintf (real_stderr, "\nX error in %s:\n", progname); + if (XmuPrintDefaultErrorMessage (dpy, error, real_stderr)) + saver_exit (si, -1); + else + fprintf (real_stderr, " (nonfatal.)\n"); + return 0; +} + +static void +initialize_connection (saver_info *si, int argc, char **argv) +{ + int i; + Widget toplevel_shell = XtAppInitialize (&si->app, progclass, + options, XtNumber (options), + &argc, argv, defaults, 0, 0); + + si->dpy = XtDisplay (toplevel_shell); + si->db = XtDatabase (si->dpy); + XtGetApplicationNameAndClass (si->dpy, &progname, &progclass); + + db = si->db; /* resources.c needs this */ + + if (argc == 2 && !strcmp (argv[1], "-help")) + do_help (si); +#ifdef DEBUG + else if (argc == 2 && !strcmp (argv[1], "-debug")) + si->prefs.debug_p = True; /* no resource for this one, out of paranoia. */ +#endif /* DEBUG */ + else if (argc > 1) + { + fprintf (stderr, "%s: unknown option %s\n", progname, argv [1]); + exit (1); + } + get_resources (si); +#ifndef NO_SETUID + hack_uid_warn (si); +#endif /* NO_SETUID */ + XA_VROOT = XInternAtom (si->dpy, "__SWM_VROOT", False); + XA_SCREENSAVER = XInternAtom (si->dpy, "SCREENSAVER", False); + XA_SCREENSAVER_VERSION = XInternAtom (si->dpy, "_SCREENSAVER_VERSION",False); + XA_SCREENSAVER_ID = XInternAtom (si->dpy, "_SCREENSAVER_ID", False); + XA_SCREENSAVER_TIME = XInternAtom (si->dpy, "_SCREENSAVER_TIME", False); + XA_XSETROOT_ID = XInternAtom (si->dpy, "_XSETROOT_ID", False); + XA_ACTIVATE = XInternAtom (si->dpy, "ACTIVATE", False); + XA_DEACTIVATE = XInternAtom (si->dpy, "DEACTIVATE", False); + XA_RESTART = XInternAtom (si->dpy, "RESTART", False); + XA_CYCLE = XInternAtom (si->dpy, "CYCLE", False); + XA_NEXT = XInternAtom (si->dpy, "NEXT", False); + XA_PREV = XInternAtom (si->dpy, "PREV", False); + XA_EXIT = XInternAtom (si->dpy, "EXIT", False); + XA_DEMO = XInternAtom (si->dpy, "DEMO", False); + XA_LOCK = XInternAtom (si->dpy, "LOCK", False); + + si->nscreens = ScreenCount(si->dpy); + si->screens = (saver_screen_info *) + calloc(sizeof(saver_screen_info), si->nscreens); + + si->default_screen = &si->screens[DefaultScreen(si->dpy)]; + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + ssi->global = si; + ssi->screen = ScreenOfDisplay (si->dpy, i); + + /* Note: we can't use the resource ".visual" because Xt is SO FUCKED. */ + ssi->default_visual = + get_visual_resource (ssi->screen, "visualID", "VisualID", False); + + ssi->current_visual = ssi->default_visual; + ssi->current_depth = visual_depth (ssi->screen, ssi->current_visual); + + if (ssi == si->default_screen) + /* Since this is the default screen, use the one already created. */ + ssi->toplevel_shell = toplevel_shell; + else + /* Otherwise, each screen must have its own unmapped root widget. */ + ssi->toplevel_shell = + XtVaAppCreateShell(progname, progclass, applicationShellWidgetClass, + si->dpy, + XtNscreen, ssi->screen, + XtNvisual, ssi->current_visual, + XtNdepth, visual_depth(ssi->screen, + ssi->current_visual), + 0); + } +} + + +static void +initialize (saver_info *si, int argc, char **argv) +{ + int i; + saver_preferences *p = &si->prefs; + Bool initial_demo_mode_p = False; + si->version = (char *) malloc (5); + memcpy (si->version, screensaver_id + 17, 4); + si->version [4] = 0; + progname = argv[0]; /* reset later; this is for the benefit of lock_init() */ + +#ifdef NO_LOCKING + si->locking_disabled_p = True; + si->nolock_reason = "not compiled with locking support"; +#else + si->locking_disabled_p = False; + +#ifdef SCO + set_auth_parameters(argc, argv); +#endif + + if (! lock_init (argc, argv)) /* before hack_uid() for proper permissions */ + { + si->locking_disabled_p = True; + si->nolock_reason = "error getting password"; + } +#endif + +#ifndef NO_SETUID + hack_uid (si); +#endif + + progclass = "XScreenSaver"; + + /* remove -demo switch before saving argv */ + for (i = 1; i < argc; i++) + while (!strcmp ("-demo", argv [i])) + { + int j; + initial_demo_mode_p = True; + for (j = i; j < argc; j++) + argv [j] = argv [j+1]; + argv [j] = 0; + argc--; + if (argc <= i) break; + } + save_argv (argc, argv); + initialize_connection (si, argc, argv); + + if (p->verbose_p) + printf ("\ +%s %s, copyright (c) 1991-1997 by Jamie Zawinski \n\ + pid = %d.\n", progname, si->version, (int) getpid ()); + + + for (i = 0; i < si->nscreens; i++) + ensure_no_screensaver_running (si->dpy, si->screens[i].screen); + + si->demo_mode_p = initial_demo_mode_p; + srandom ((int) time ((time_t *) 0)); + + if (p->use_sgi_saver_extension) + { +#ifdef HAVE_SGI_SAVER_EXTENSION + if (! query_sgi_saver_extension (si)) + { + fprintf (stderr, + "%s: display %s does not support the SGI SCREEN_SAVER extension.\n", + progname, DisplayString (si->dpy)); + p->use_sgi_saver_extension = False; + } + else if (p->use_mit_saver_extension) + { + fprintf (stderr, "%s: SGI SCREEN_SAVER extension used instead\ + of MIT-SCREEN-SAVER extension.\n", + progname); + p->use_mit_saver_extension = False; + } + else if (p->use_xidle_extension) + { + fprintf (stderr, + "%s: SGI SCREEN_SAVER extension used instead of XIDLE extension.\n", + progname); + p->use_xidle_extension = False; + } +#else /* !HAVE_MIT_SAVER_EXTENSION */ + fprintf (stderr, + "%s: not compiled with support for the SGI SCREEN_SAVER extension.\n", + progname); + p->use_sgi_saver_extension = False; +#endif /* !HAVE_SGI_SAVER_EXTENSION */ + } + + if (p->use_mit_saver_extension) + { +#ifdef HAVE_MIT_SAVER_EXTENSION + if (! query_mit_saver_extension (si)) + { + fprintf (stderr, + "%s: display %s does not support the MIT-SCREEN-SAVER extension.\n", + progname, DisplayString (si->dpy)); + p->use_mit_saver_extension = False; + } + else if (p->use_xidle_extension) + { + fprintf (stderr, + "%s: MIT-SCREEN-SAVER extension used instead of XIDLE extension.\n", + progname); + p->use_xidle_extension = False; + } +#else /* !HAVE_MIT_SAVER_EXTENSION */ + fprintf (stderr, + "%s: not compiled with support for the MIT-SCREEN-SAVER extension.\n", + progname); + p->use_mit_saver_extension = False; +#endif /* !HAVE_MIT_SAVER_EXTENSION */ + } + + if (p->use_xidle_extension) + { +#ifdef HAVE_XIDLE_EXTENSION + int first_event, first_error; + if (! XidleQueryExtension (si->dpy, &first_event, &first_error)) + { + fprintf (stderr, + "%s: display %s does not support the XIdle extension.\n", + progname, DisplayString (si->dpy)); + p->use_xidle_extension = False; + } +#else /* !HAVE_XIDLE_EXTENSION */ + fprintf (stderr, "%s: not compiled with support for XIdle.\n", + progname); + p->use_xidle_extension = False; +#endif /* !HAVE_XIDLE_EXTENSION */ + } + + /* Call this only after having probed for presence of desired extension. */ + initialize_screensaver_window (si); + + init_sigchld (); + + disable_builtin_screensaver (si, True); + + if (p->verbose_p && p->use_mit_saver_extension) + fprintf (stderr, "%s: using MIT-SCREEN-SAVER server extension.\n", + progname); + if (p->verbose_p && p->use_sgi_saver_extension) + fprintf (stderr, "%s: using SGI SCREEN_SAVER server extension.\n", + progname); + if (p->verbose_p && p->use_xidle_extension) + fprintf (stderr, "%s: using XIdle server extension.\n", + progname); + + initialize_stderr (si); + XSetErrorHandler (saver_ehandler); + + if (initial_demo_mode_p) + /* If the user wants demo mode, don't wait around before doing it. */ + p->initial_delay = 0; + + if (!p->use_xidle_extension && + !p->use_mit_saver_extension && + !p->use_sgi_saver_extension) + { + if (p->initial_delay) + { + if (p->verbose_p) + { + printf ("%s: waiting for %d second%s...", progname, + (int) p->initial_delay, + (p->initial_delay == 1 ? "" : "s")); + fflush (stdout); + } + sleep (p->initial_delay); + if (p->verbose_p) + printf (" done.\n"); + } + if (p->verbose_p) + { + printf ("%s: selecting events on extant windows...", progname); + fflush (stdout); + } + + /* Select events on the root windows of every screen. This also selects + for window creation events, so that new subwindows will be noticed. + */ + for (i = 0; i < si->nscreens; i++) + start_notice_events_timer (si, + RootWindowOfScreen (si->screens[i].screen)); + + if (p->verbose_p) + printf (" done.\n"); + } +} + +static void +main_loop (saver_info *si) +{ + saver_preferences *p = &si->prefs; + while (1) + { + if (! si->demo_mode_p) + sleep_until_idle (si, True); + +#ifndef NO_DEMO_MODE + if (si->demo_mode_p) + demo_mode (si); + else +#endif + { + if (p->verbose_p) + printf ("%s: user is idle; waking up at %s.\n", progname, + timestring()); + blank_screen (si); + spawn_screenhack (si, True); + if (p->cycle) + si->cycle_id = XtAppAddTimeOut (si->app, p->cycle, cycle_timer, + (XtPointer) si); + +#ifndef NO_LOCKING + if (p->lock_p && p->lock_timeout == 0) + si->locked_p = True; + if (p->lock_p && !si->locked_p) + /* locked_p might be true already because of ClientMessage */ + si->lock_id = XtAppAddTimeOut (si->app, p->lock_timeout, + activate_lock_timer, + (XtPointer) si); +#endif + + PASSWD_INVALID: + + sleep_until_idle (si, False); /* until not idle */ + +#ifndef NO_LOCKING + if (si->locked_p) + { + Bool val; + if (si->locking_disabled_p) abort (); + si->dbox_up_p = True; + + /* We used to ungrab the keyboard here, before calling unlock_p() + to pop up the dialog box. This left the keyboard ungrabbed + for a small window, during an insecure state. Bennett Todd + was seeing the bahavior that, when the load was high, he could + actually get characters through to a shell under the saver + window (he accidentally typed his password there...) + + So the ungrab has been moved down into pop_passwd_dialog() + just after the server is grabbed, closing this window + entirely. + */ + /* ungrab_keyboard_and_mouse (); */ + + { + saver_screen_info *ssi = si->default_screen; + suspend_screenhack (si, True); + XUndefineCursor (si->dpy, ssi->screensaver_window); + if (p->verbose_p) + printf ("%s: prompting for password.\n", progname); + val = unlock_p (si); + if (p->verbose_p && val == False) + printf ("%s: password incorrect!\n", progname); + si->dbox_up_p = False; + XDefineCursor (si->dpy, ssi->screensaver_window, ssi->cursor); + suspend_screenhack (si, False); + + /* I think this grab is now redundant, but it shouldn't hurt. + */ + if (!si->demo_mode_p) + grab_keyboard_and_mouse (si->dpy, ssi->screensaver_window, + ssi->cursor); + } + + if (! val) + goto PASSWD_INVALID; + si->locked_p = False; + } +#endif + unblank_screen (si); + kill_screenhack (si); + if (si->cycle_id) + { + XtRemoveTimeOut (si->cycle_id); + si->cycle_id = 0; + } +#ifndef NO_LOCKING + if (si->lock_id) + { + XtRemoveTimeOut (si->lock_id); + si->lock_id = 0; + } +#endif + if (p->verbose_p) + printf ("%s: user is active; going to sleep at %s.\n", progname, + timestring ()); + } + } +} + + + +Bool +handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p) +{ + saver_preferences *p = &si->prefs; + Atom type = 0; + if (event->xclient.message_type != XA_SCREENSAVER) + { + char *str; + str = XGetAtomName (si->dpy, event->xclient.message_type); + fprintf (stderr, "%s: unrecognised ClientMessage type %s received\n", + progname, (str ? str : "(null)")); + if (str) XFree (str); + return False; + } + if (event->xclient.format != 32) + { + fprintf (stderr, "%s: ClientMessage of format %d received, not 32\n", + progname, event->xclient.format); + return False; + } + + type = event->xclient.data.l[0]; + if (type == XA_ACTIVATE) + { + if (until_idle_p) + { + if (p->verbose_p) + printf ("%s: ACTIVATE ClientMessage received.\n", progname); + if (p->use_mit_saver_extension || p->use_sgi_saver_extension) + { + XForceScreenSaver (si->dpy, ScreenSaverActive); + return False; + } + else + { + return True; + } + } + fprintf (stderr, + "%s: ClientMessage ACTIVATE received while already active.\n", + progname); + } + else if (type == XA_DEACTIVATE) + { + if (! until_idle_p) + { + if (p->verbose_p) + printf ("%s: DEACTIVATE ClientMessage received.\n", progname); + if (p->use_mit_saver_extension || p->use_sgi_saver_extension) + { + XForceScreenSaver (si->dpy, ScreenSaverReset); + return False; + } + else + { + return True; + } + } + fprintf (stderr, + "%s: ClientMessage DEACTIVATE received while inactive.\n", + progname); + } + else if (type == XA_CYCLE) + { + if (! until_idle_p) + { + if (p->verbose_p) + printf ("%s: CYCLE ClientMessage received.\n", progname); + if (si->cycle_id) + XtRemoveTimeOut (si->cycle_id); + si->cycle_id = 0; + cycle_timer ((XtPointer) si, 0); + return False; + } + fprintf (stderr, "%s: ClientMessage CYCLE received while inactive.\n", + progname); + } + else if (type == XA_NEXT || type == XA_PREV) + { + if (p->verbose_p) + printf ("%s: %s ClientMessage received.\n", progname, + (type == XA_NEXT ? "NEXT" : "PREV")); + si->next_mode_p = 1 + (type == XA_PREV); + + if (! until_idle_p) + { + if (si->cycle_id) + XtRemoveTimeOut (si->cycle_id); + si->cycle_id = 0; + cycle_timer ((XtPointer) si, 0); + } + else + return True; + } + else if (type == XA_EXIT) + { + /* Ignore EXIT message if the screen is locked. */ + if (until_idle_p || !si->locked_p) + { + if (p->verbose_p) + printf ("%s: EXIT ClientMessage received.\n", progname); + if (! until_idle_p) + { + unblank_screen (si); + kill_screenhack (si); + XSync (si->dpy, False); + } + saver_exit (si, 0); + } + else + fprintf (stderr, "%s: EXIT ClientMessage received while locked.\n", + progname); + } + else if (type == XA_RESTART) + { + /* The RESTART message works whether the screensaver is active or not, + unless the screen is locked, in which case it doesn't work. + */ + if (until_idle_p || !si->locked_p) + { + if (p->verbose_p) + printf ("%s: RESTART ClientMessage received.\n", progname); + if (! until_idle_p) + { + unblank_screen (si); + kill_screenhack (si); + XSync (si->dpy, False); + } + + /* make sure error message shows up before exit. */ + if (real_stderr && stderr != real_stderr) + dup2 (fileno(real_stderr), fileno(stderr)); + + restart_process (si); + exit (1); /* shouldn't get here; but if restarting didn't work, + make this command be the same as EXIT. */ + } + else + fprintf(stderr, "%s: RESTART ClientMessage received while locked.\n", + progname); + } + else if (type == XA_DEMO) + { +#ifdef NO_DEMO_MODE + fprintf (stderr, "%s: not compiled with support for DEMO mode\n", + progname); +#else + if (until_idle_p) + { + if (p->verbose_p) + printf ("%s: DEMO ClientMessage received.\n", progname); + si->demo_mode_p = True; + return True; + } + fprintf (stderr, + "%s: DEMO ClientMessage received while active.\n", progname); +#endif + } + else if (type == XA_LOCK) + { +#ifdef NO_LOCKING + fprintf (stderr, "%s: not compiled with support for LOCK mode\n", + progname); +#else + if (si->locking_disabled_p) + fprintf (stderr, + "%s: LOCK ClientMessage received, but locking is disabled.\n", + progname); + else if (si->locked_p) + fprintf (stderr, + "%s: LOCK ClientMessage received while already locked.\n", + progname); + else + { + si->locked_p = True; + if (p->verbose_p) + printf ("%s: LOCK ClientMessage received;%s locking.\n", + progname, until_idle_p ? " activating and" : ""); + + if (si->lock_id) /* we're doing it now, so lose the timeout */ + { + XtRemoveTimeOut (si->lock_id); + si->lock_id = 0; + } + + if (until_idle_p) + { + if (p->use_mit_saver_extension || p->use_sgi_saver_extension) + { + XForceScreenSaver (si->dpy, ScreenSaverActive); + return False; + } + else + { + return True; + } + } + } +#endif + } + else + { + char *str; + str = (type ? XGetAtomName(si->dpy, type) : 0); + if (str) + fprintf (stderr, + "%s: unrecognised screensaver ClientMessage %s received\n", + progname, str); + else + fprintf (stderr, + "%s: unrecognised screensaver ClientMessage 0x%x received\n", + progname, (unsigned int) event->xclient.data.l[0]); + if (str) XFree (str); + } + return False; +} diff --git a/driver/xscreensaver.h b/driver/xscreensaver.h new file mode 100644 index 00000000..6dba82a6 --- /dev/null +++ b/driver/xscreensaver.h @@ -0,0 +1,368 @@ +/* xscreensaver, Copyright (c) 1993-1997 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. + */ + +#ifndef __XSCREENSAVER_H__ +#define __XSCREENSAVER_H__ + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include + +extern char *progname; +extern char *progclass; + +typedef struct saver_preferences saver_preferences; +typedef struct saver_info saver_info; +typedef struct saver_screen_info saver_screen_info; + + +#undef countof +#define countof(x) (sizeof((x))/sizeof((*x))) + + + +/* This structure holds all the user-specified parameters, read from the + command line, the resource database, or entered through a dialog box. + */ +struct saver_preferences { + Bool verbose_p; + Bool lock_p; /* whether to lock as well as save */ + + Bool debug_p; + Bool fade_p; /* whether to fade to black */ + Bool unfade_p; /* whether to fade from black */ + int fade_seconds; /* how long that should take */ + int fade_ticks; /* how many ticks should be used */ + + Bool install_cmap_p; /* whether we should use our own colormap + when using the screen's default visual. */ + + char **screenhacks; /* the programs to run */ + int screenhacks_count; + + int nice_inferior; /* nice value for subprocs */ + + int initial_delay; /* how long to sleep after launch */ + Time timeout; /* how much idle time before activation */ + Time lock_timeout; /* how long after activation locking starts */ + Time cycle; /* how long each hack should run */ +#ifndef NO_LOCKING + Time passwd_timeout; /* how much time before pw dialog goes down */ +#endif + Time pointer_timeout; /* how often to check mouse position */ + Time notice_events_timeout; /* how long after window creation to select */ + Time watchdog_timeout; /* how often to re-raise and re-blank screen */ + + Bool use_xidle_extension; /* which extension to use, if possible */ + Bool use_mit_saver_extension; + Bool use_sgi_saver_extension; + + char *shell; /* where to find /bin/sh */ + +}; + + +/* This structure holds all the data that applies to the program as a whole, + or to the non-screen-specific parts of the display connection. + */ +struct saver_info { + char *version; + saver_preferences prefs; + + int nscreens; + saver_screen_info *screens; + saver_screen_info *default_screen; /* ...on which dialogs will appear. */ + + /* ======================================================================= + global connection info + ======================================================================= */ + + XtAppContext app; + Display *dpy; + XrmDatabase db; + + /* ======================================================================= + server extension info + ======================================================================= */ + +# ifdef HAVE_MIT_SAVER_EXTENSION + int mit_saver_ext_event_number; + int mit_saver_ext_error_number; +# endif +# ifdef HAVE_SGI_SAVER_EXTENSION + int sgi_saver_ext_event_number; + int sgi_saver_ext_error_number; +# endif + + + /* ======================================================================= + blanking + ======================================================================= */ + + Bool screen_blanked_p; /* Whether the saver is currently active. */ + + + /* ======================================================================= + locking + ======================================================================= */ + + Bool locking_disabled_p; /* Sometimes locking is impossible. */ + char *nolock_reason; /* This is why. */ + Bool locked_p; /* Whether the screen is currently locked. */ + Bool dbox_up_p; /* Whether the demo-mode or passwd dialogs + are currently visible */ + + + /* ======================================================================= + demoing + ======================================================================= */ + + Bool demo_mode_p; /* Whether demo-mode is active */ + char *demo_hack; /* The hack that has been selected from the + dialog box, which should be run next. */ + + + /* ======================================================================= + timers + ======================================================================= */ + + XtIntervalId lock_id; /* Timer to implement `prefs.lock_timeout' */ + XtIntervalId cycle_id; /* Timer to implement `prefs.cycle' */ + XtIntervalId timer_id; /* Timer to implement `prefs.timeout' */ + XtIntervalId watchdog_id; /* Timer to implement `prefs.watchdog */ + XtIntervalId check_pointer_timer_id; /* `prefs.pointer_timeout' */ + + time_t last_activity_time; /* Used only when no server exts. */ + saver_screen_info *last_activity_screen; + + + /* ======================================================================= + remote control + ======================================================================= */ + + int next_mode_p; /* Set to 1 if the NEXT ClientMessage has just + been received; set to 2 if PREV has just + been received. (#### This is nasty.) */ + + /* ======================================================================= + subprocs + ======================================================================= */ + + XtIntervalId stderr_popup_timer; + +}; + + +/* This structure holds all the data that applies to the screen-specific parts + of the display connection; if the display has multiple screens, there will + be one of these for each screen. + */ +struct saver_screen_info { + saver_info *global; + + Screen *screen; + Widget toplevel_shell; + + /* ======================================================================= + blanking + ======================================================================= */ + + Window screensaver_window; /* The window that will impersonate the root, + when the screensaver activates. Note that + the window stored here may change, as we + destroy and recreate it on different + visuals. */ + Colormap cmap; /* The colormap that goes with the window. */ + 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. */ + + Window real_vroot; /* The original virtual-root window. */ + Window real_vroot_value; /* What was in the __SWM_VROOT property. */ + + Cursor cursor; /* A blank cursor that goes with the + real root window. */ + unsigned long black_pixel; /* Black, allocated from `cmap'. */ + +# ifdef HAVE_MIT_SAVER_EXTENSION + Window server_mit_saver_window; +# endif + + + /* ======================================================================= + demoing + ======================================================================= */ + + Colormap demo_cmap; /* The colormap that goes with the dialogs: + this might be the same as `cmap' so care + must be taken not to free it while it's + still in use. */ + + /* ======================================================================= + timers + ======================================================================= */ + + int poll_mouse_last_root_x; /* Used only when no server exts. */ + int poll_mouse_last_root_y; + Window poll_mouse_last_child; + unsigned int poll_mouse_last_mask; + + + /* ======================================================================= + subprocs + ======================================================================= */ + + int current_hack; /* Index into `prefs.screenhacks' */ + pid_t pid; + + int stderr_text_x; + int stderr_text_y; + int stderr_line_height; + XFontStruct *stderr_font; + GC stderr_gc; + Window stderr_overlay_window; /* Used if the server has overlay planes */ + Colormap stderr_cmap; +}; + + + + +/* ======================================================================= + server extensions and virtual roots + ======================================================================= */ + +extern void restore_real_vroot (saver_info *si); +extern void disable_builtin_screensaver (saver_info *si, Bool turn_off_p); +extern void ensure_no_screensaver_running (Display *, Screen *); + +#ifdef HAVE_MIT_SAVER_EXTENSION +extern Bool query_mit_saver_extension (saver_info *); +#endif +#ifdef HAVE_SGI_SAVER_EXTENSION +extern Bool query_sgi_saver_extension (saver_info *); +#endif + + +/* ======================================================================= + blanking + ======================================================================= */ + +extern void initialize_screensaver_window (saver_info *si); +extern void raise_window (saver_info *si, + Bool inhibit_fade, Bool between_hacks_p, + Bool dont_clear); +extern void blank_screen (saver_info *si); +extern void unblank_screen (saver_info *si); +extern void grab_keyboard_and_mouse (Display *, Window, Cursor); +extern void ungrab_keyboard_and_mouse (Display *dpy); + +/* ======================================================================= + locking + ======================================================================= */ + +#ifndef NO_LOCKING +extern Bool unlock_p (saver_info *si); +extern create_passwd_dialog (Widget, Visual *, Colormap); +extern Bool lock_init (int argc, char **argv); +extern Bool passwd_valid_p (const char *typed_passwd); +#endif + +/* ======================================================================= + demoing + ======================================================================= */ + +#ifndef NO_DEMO_MODE +extern void demo_mode (saver_info *si); +extern void demo_mode_restart_process (saver_info *si); +extern create_demo_dialog (Widget, Visual *, Colormap); +extern create_resources_dialog (Widget, Visual *, Colormap); +#endif + +#if !defined(NO_LOCKING) || !defined(NO_DEMO_MODE) +extern void pop_up_dialog_box (Widget dialog, Widget form, int where); +extern void format_into_label (Widget label, const char *arg); +extern void steal_focus_and_colormap (Widget dialog); +#endif + +/* ======================================================================= + timers + ======================================================================= */ + +extern void start_notice_events_timer (saver_info *, Window); +extern void cycle_timer (XtPointer si, XtIntervalId *id); +extern void activate_lock_timer (XtPointer si, XtIntervalId *id); +extern void reset_watchdog_timer (saver_info *si, Bool on_p); +extern void idle_timer (XtPointer si, XtIntervalId *id); +extern void sleep_until_idle (saver_info *si, Bool until_idle_p); + +/* ======================================================================= + remote control + ======================================================================= */ + +extern Bool handle_clientmessage (saver_info *, XEvent *, Bool); + +/* ======================================================================= + subprocs + ======================================================================= */ + +extern void init_sigchld (void); +extern void spawn_screenhack (saver_info *si, Bool first_time_p); +extern void kill_screenhack (saver_info *si); +extern void suspend_screenhack (saver_info *si, Bool suspend_p); +extern Bool screenhack_running_p (saver_info *si); +extern void emergency_kill_subproc (saver_info *si); +extern Bool select_visual (saver_screen_info *ssi, const char *visual_name); +extern const char *signal_name (int signal); + +/* ======================================================================= + subprocs security + ======================================================================= */ + +#ifdef NO_SETUID +# define hack_uid() +# define hack_uid_warn() +#else /* !NO_SETUID */ + extern void hack_uid (saver_info *si); + extern void hack_uid_warn (saver_info *si); +#endif /* NO_SETUID */ + +/* ======================================================================= + subprocs diagnostics + ======================================================================= */ + +extern FILE *real_stderr; +extern FILE *real_stdout; +extern void initialize_stderr (saver_info *si); +extern void reset_stderr (saver_screen_info *ssi); +extern void clear_stderr (saver_screen_info *ssi); + +/* ======================================================================= + misc + ======================================================================= */ + +extern void save_argv (int argc, char **argv); +extern void saver_exit (saver_info *si, int status); +extern void restart_process (saver_info *si); + +extern int saver_ehandler (Display *dpy, XErrorEvent *error); +extern int BadWindow_ehandler (Display *dpy, XErrorEvent *error); +extern Bool window_exists_p (Display *dpy, Window window); +extern char *timestring (void); + +extern Atom XA_VROOT, XA_XSETROOT_ID; +extern Atom XA_SCREENSAVER_VERSION, XA_SCREENSAVER_ID; +extern Atom XA_SCREENSAVER_TIME; + +#endif /* __XSCREENSAVER_H__ */ diff --git a/driver/xscreensaver.man b/driver/xscreensaver.man new file mode 100644 index 00000000..8cef0182 --- /dev/null +++ b/driver/xscreensaver.man @@ -0,0 +1,691 @@ +..de EX \"Begin example +.ne 5 +.if n .sp 1 +.if t .sp .5 +.nf +.in +.5i +.. +.de EE +.fi +.in -.5i +.if n .sp 1 +.if t .sp .5 +.. +.TH XScreenSaver 1 "31-May-97" "X Version 11" +.SH NAME +xscreensaver - graphics hack and screen locker, launched when the user is idle +.SH SYNOPSIS +.B xscreensaver +[\-display \fIhost:display.screen\fP] [\-timeout \fIint\fP] [\-cycle \fIint\fP] [\-nice \fIint\fP] [\-lock] [\-no\-lock] [\-lock\-timeout \fIint\fP] [\-demo] [\-visual \fIvisual\fP] [\-install] [\-no\-install] [\-verbose] [\-silent] [\-xidle\-extension] [\-no\-xidle\-extension] [\-sgi\-extension] [\-no\-sgi\-extension] [\-mit\-extension] [\-no\-mit\-extension] [\-xrm \fIresources\fP] +.SH DESCRIPTION +The \fIxscreensaver\fP program waits until the keyboard and mouse have been +idle for a period, and then runs a graphics demo chosen at random. It +turns off as soon as there is any mouse or keyboard activity. + +This program can lock your terminal in order to prevent others from using it, +though its default mode of operation is merely to display pretty pictures on +your screen when it is not in use. + +The benefit that this program has over the combination of the +.BR xlock (1) +and +.BR xautolock (1) +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 OPTIONS +.I xscreensaver +accepts the following command line options: +.TP 8 +.B \-timeout \fIminutes\fP +The screensaver will activate after the keyboard and mouse have been idle +for this many minutes. Default 10. +.TP 8 +.B \-cycle \fIminutes\fP +After the screensaver has been running for this many minutes, the currently +running graphics hack sub-process will be killed (with \fBSIGTERM\fP), and a +new one started. If this is 0, then the graphics hack will not be changed: +only one demo will run until the screensaver is deactivated by user activity. +Default 10. +.TP 8 +.B \-nice \fIinteger\fP +The sub-processes created by \fIxscreensaver\fP will be ``niced'' to this +level, so that they are given lower priority than other processes on the +system, and don't increase the load unnecessarily. The default is 20. + +(Higher numbers mean lower priority; see +.BR nice (1) +for details.) +.TP 8 +.B \-lock +Enable locking: before the screensaver will turn off, it requires you to +type the password of the person who launched the screensaver, or the root +password. (Note: this doesn't work if the screensaver is launched +by +.BR xdm (1) +because it can't know the user-id of the logged-in user.) +.TP 8 +.B \-no\-lock +Disable locking. This is the default. +.TP 8 +.B \-lock\-timeout \fIminutes\fP +This is how long after the screensaver activates that locking is enabled. +For example, if this is 5, and \fI\-timeout\fP is 10, then after 10 minutes, +the screen would blank. If there was user activity at 12 minutes, no password +would be required. But, if there was user activity at 15 minutes or later +(\fI\-lock\-timeout\fP minutes after activation) then a password would be +required. The default is 0, meaning that if locking is enabled, then +a password will be required as soon as the screensaver activates. +.TP 8 +.B \-demo +Enter the interactive demo mode immediately after startup. Normally +demo mode is invoked via the +.BR xscreensaver\-command (1) +program, but this is a shortcut for new users. See below for a description +of how demo-mode works. +.TP 8 +.B \-visual \fIvisual\fP +Specify which X visual to use by default. Legal values are: +.RS 8 +.TP 8 +.B default +Use the screen's default visual (the visual of the root window.) +This is the default. +.TP 8 +.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. +.TP 8 +.B mono +Use a monochrome visual, if there is one. +.TP 8 +.B gray +Use a grayscale or staticgray visual, if there is one and it has more than +one plane (that is, it's not monochrome.) +.TP 8 +.B color +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. +.TP 8 +.I number +where \fInumber\fP (decimal or hex) is interpreted as a visual id number, +as reported by the +.BR xdpyinfo (1) +program; in this way you can have finer control over exactly which visual +gets used, for example, to select a shallower one than would otherwise +have been chosen. +.RE +.RS 8 +.PP +Note that this option specifies only the \fIdefault\fP visual that will +be used: the visual used may be overridden on a program-by-program basis. +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.) +.TP 8 +.B \-no\-install +Use the default colormap. +.TP 8 +.B \-verbose +Print diagnostics. +.TP 8 +.B \-silent + +.TP 8 +.B \-xidle\-extension +Use the \fBXIDLE\fP server extension to decide whether the user is idle. +This is the default if \fIxscreensaver\fP has been compiled with support +for this extension. On X11R4 or X11R5 systems, the XIdle method is faster +and more reliable than what will be done otherwise, so use it if you can. +.TP 8 +.B \-no\-xidle\-extension +Don't use the \fBXIDLE\fP server extension. +.TP 8 +.B \-sgi\-extension +Use the SGI \fBSCREEN_SAVER\fP server extension to decide whether the user +is idle. This is the default if \fIxscreensaver\fP has been compiled with +support for this extension (which is the default on SGI systems.). If it +is available, the \fBSCREEN_SAVER\fP method is faster and more reliable than +what will be done otherwise, so use it if you can. +.TP 8 +.B \-no\-sgi\-extension +Don't use the SGI \fBSCREEN_SAVER\fP server extension. +.TP 8 +.B \-mit\-extension +Use the \fBMIT\-SCREEN\-SAVER\fP server extension to decide whether the user +is idle. This is the default if \fIxscreensaver\fP has been compiled with +support for this extension. However, this extension is flaky, so it's use +is not really recommended. (It also makes the \fIfade\fP option not work +properly.) +.TP 8 +.B \-no\-mit\-extension +Don't use the \fBMIT\-SCREEN\-SAVER\fP server extension. +.SH X RESOURCES +\fIxscreensaver\fP understands the following resources: +.PP +.TP 8 +.B timeout \fR(class \fBTime\fP) +Same as the \fI\-timeout\fP command-line option. Default 10 minutes. +.TP 8 +.B cycle \fR(class \fBTime\fP) +Same as the \fI\-cycle\fP command-line option. Default 10 minutes. +.TP 8 +.B nice \fR(class \fBNice\fP) +Same as the \fI\-nice\fP command-line option. Default 10. +.TP 8 +.B lock \fR(class \fBBoolean\fP) +Same as the \fI\-lock\fP command-line option. +.TP 8 +.B lockTimeout \fR(class \fBTime\fP) +Same as the \fI\-lock\-timeout\fP command-line option. +.TP 8 +.B passwdTimeout \fR(class \fBTime\fP) +If the screen is locked, then this is how many seconds the password dialog box +should be left on the screen before giving up (default 30.) This should not +be too large: the X server is grabbed for the duration that the password +dialog box is up (for security purposes) and leaving the server grabbed for +too long can cause problems. +.TP 8 +.B verbose \fR(class \fBBoolean\fP) +Same as the \fI\-verbose\fP command-line option. +.TP 8 +.B xidle \fR(class \fBBoolean\fP) +Same as the \fI\-xidle\fP command-line option. +.TP 8 +.B fade \fR(class \fBBoolean\fP) +If this is true, then when the screensaver activates, the current contents +of the screen will fade to black instead of simply winking out. This only +works on displays with writable colormaps, that is, if the screen's default +visual is a PseudoColor visual. Default true. A fade will also be done when +switching graphics hacks (when the \fIcycle\fP timer expires.) +.TP 8 +.B unfade \fR(class \fBBoolean\fP) +If this is true, then when the screensaver deactivates, the original contents +of the screen will fade in from black instead of appearing immediately. This +only works on displays with writable colormaps, and if \fIfade\fP is true +as well. Default false. +.TP 8 +.B fadeSeconds \fR(class \fBTime\fP) +If \fIfade\fP is true, this is how long the fade will be in +seconds (default 3.) +.TP 8 +.B fadeTicks \fR(class \fBInteger\fP) +If \fIfade\fP is true, this is how many times a second the colormap will +be changed to effect a fade. Higher numbers yield smoother fades, but +may make the fades take longer than the specified \fIfadeSeconds\fP if +your server isn't fast enough to keep up. Default 20. +.TP 8 +.B visualID \fR(class \fBVisualID\fP) +Same as the \fI\-visual\fP command-line option. Default \fBdefault\fP. +.TP 8 +.B installColormap \fR(class \fBBoolean\fP) +Same as the \fI\-install\fP command-line option. Default true. +.TP 8 +.B captureStderr \fR(class \fBBoolean\fP) +Whether \fIxscreensaver\fP should redirect its standard-error stream to the +window itself. Since its nature is to take over the screen, you would not +normally see error messages generated by the screensaver or the programs it +runs; this resource will cause the output of all relevant programs to be +drawn on the screensaver window itself instead of written to the controlling +terminal of the screensaver driver process. Default true. +.TP 8 +.B captureStdout \fR(class \fBBoolean\fP) +Like \fBcaptureStderr\fP but for the standard-output stream. Default true. +.TP 8 +.B font \fR(class \fBFont\fP) +The font used for the stdout/stderr text, if \fBcaptureStdout\fP or +\fBcaptureStderr\fP are true. Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP +(a 14 point fixed-width font.) +.TP 8 +.B textForeground \fR(class \fBForeground\fP) +The foreground color used for the stdout/stderr text, if \fBcaptureStdout\fP +or \fBcaptureStderr\fP are true. Default: Yellow. +.TP 8 +.B textBackground \fR(class \fBBackground\fP) +The background color used for the stdout/stderr text, if \fBcaptureStdout\fP +or \fBcaptureStderr\fP are true. Default: Black. +.TP 8 +.B programs \fR(class \fBPrograms\fP) +The graphics hacks which \fIxscreensaver\fP runs when the user is idle. +The value of this resource is a string, one \fIsh\fP-syntax command per line. +Each line must contain exactly one command -- no semicolons, no ampersands. + +When the screensaver starts up, one of these is selected at random, and +run. After the \fIcycle\fP period expires, it is killed, and another +is selected and run. + +If the value of this resource is empty, then no programs will be run; the +screen will simply be made black. + +If the display has multiple screens, then a different program will be run +for each screen. + +Note that you must escape the newlines; here is an example of how you +might set this in your \fI.Xdefaults\fP file: + +.EX +xscreensaver.programs: \\ + qix -root \\n\\ + ico -r -faces -sleep 1 -obj ico \\n\\ + xdaliclock -builtin2 -root \\n\\ + xv -root -rmode 5 image.gif -quit \\n +.EE +.RS 8 +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'' +windows, as used by virtual window managers such as \fItvtwm\fP. (Generally, +this is accomplished by just including the \fI"vroot.h"\fP header file in +the program's source.) + +If there are some programs that you want to run only when using a color +display, and others that you want to run only when using a monochrome +display, you can specify that like this: + +.EX + mono: mono-program -root \\n\\ + color: color-program -root \\n\\ +.EE +.RE +.RS 8 +More generally, you can specify the kind of visual that should be used for +the window on which the program will be drawing. For example, if one +program works best if it has a colormap, but another works best if it has +a 24-bit visual, both can be accomidated: + +.EX + PseudoColor: cmap-program -root \\n\\ + TrueColor: 24bit-program -root \\n\\ +.EE +.RE +.RS 8 +(This sort of thing used to be accomplished with the \fIcolorPrograms\fP +and \fImonoPrograms\fP resources, but those resources have now been removed; +a warning will be issued if they are used.) + +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 +arrange for appropriate hacks to be run on each. For example, if one screen +is color and the other is monochrome, hacks that look good in mono can be +run on one, and hacks that only look good in color will show up on the other. +.RE +.PP +.PP +Normally you won't need to change the following resources: +.TP 8 +.B bourneShell \fR(class \fBBourneShell\fP) +The pathname of the shell that \fIxscreensaver\fP uses to start subprocesses. +This must be whatever your local variant of \fB/bin/sh\fP is -- in particular, +it must not be \fBcsh\fP. +.TP 8 +.B windowCreationTimeout \fR(class \fBTime\fP) +When server extensions are not in use, this controls the delay between when +windows are created and when \fIxscreensaver\fP selects events on them. +Default 30 seconds. +.TP 8 +.B pointerPollTime \fR(class \fBTime\fP) +When server extensions are not in use, this controls how +frequently \fIxscreensaver\fP checks to see if the mouse position or buttons +have changed. Default 5 seconds. +.TP 8 +.B initialDelay \fR(class \fBTime\fP) +When server extensions are not in use, \fIxscreensaver\fP will wait this many +seconds before selecting events on existing windows, under the assumption that +\fIxscreensaver\fP is started during your login procedure, and the window +state may be in flux. Default 30 seconds. +.TP 8 +.B overlayStderr \fR(class \fBBoolean\fP) +If \fBcaptureStderr\fP or \fBcaptureStdout\fP are True, and your server +supports ``overlay'' visuals, then the text will be written into one of +the higher layers instead of into the same layer as the running screenhack. +Set this to False to disable that (though you shouldn't need to.) +.SH "HOW IT WORKS" +When it is time to activate the screensaver, a full-screen black window is +created on each screen of the display. The window or windows is given the +appropriate properties so that, to any subsequently-created programs, it +will appear to be a ``virtual root'' window. Because of this, any program +which draws on the root window (and which understands virtual roots) can be +used as a screensaver. + +When the user becomes active again, the screensaver windows are unmapped and +the running subprocesses are killed by sending them \fBSIGTERM\fP. This is +also how the subprocesses are killed when the screensaver decides that it's +time to run a different demo: the old one is killed and a new one is launched. + +Before launching a subprocess, \fIxscreensaver\fP stores an appropriate value +for \fB$DISPLAY\fP in the environment that the child will recieve. (This is +so that if you start \fIxscreensaver\fP with a \fI-display\fP argument, the +programs which \fIxscreensaver\fP launches will draw on the same display; +and so that the child will end up drawing on the appropriate screen of a +multi-headed display.) + +When the screensaver turns off, or is killed, care is taken to restore +the ``real'' virtual root window if there is one. Because of this, it is +important that you not kill the screensaver process with \fIkill -9\fP if +you are running a virtual-root window manager. If you kill it with \-9, +you may need to restart your window manager to repair the damage. This +isn't an issue if you aren't running a virtual-root window manager. + +For all the gory details, see the commentary at the top of xscreensaver.c. + +You can control a running screensaver process by using the +.BR xscreensaver\-command (1) +program (which see.) +.SH USING XDM(1) +You can run \fIxscreensaver\fP from your xdm session, so that the +screensaver will run even when nobody is logged in on the console. +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. + +(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 +in the \fIxdm-config\fP file. See the man page for +.BR xdm (1) +for more details.) + +Users may want to add \fB"xscreensaver-command -restart"\fP to their +startup scripts, so that the screensaver will be reinitialized with +their private resource settings when they log in. + +It is safe to run this program as root (as \fIxdm\fP is likely to do.) If +run as root, \fIxscreensaver\fP changes its effective user and group ids to +something safe (like \fI"nobody"\fP) before connecting to the X server +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: + +.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 +.BR xscreensaver\-command (1) +except that when executed from this button, the screensaver will +automatically return to demo mode after restarting. +.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.) +.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. +.TP 8 +Machine Load +Although this program ``nices'' the subprocesses that it starts, +graphics-intensive subprograms can still overload the machine by causing +the X server process itself (which is not ``niced'') to suck a lot of +cycles. Care should be taken to slow down programs intended for use as +screensavers by inserting strategic calls to +.BR sleep (3) +or +.BR usleep (3) +(or making liberal use of any \fI\-delay\fP options which the programs +may provide.) + +Also, an active screensaver will cause your X server to be pretty much +permanently swapped in; but the same is true of any program that draws +periodically, like +.BR xclock (1) +or +.BR xload (1). +.TP 8 +Latency and Responsiveness +If the subprocess is drawing too quickly and the connection to the X +server is a slow one (such as an X terminal running over a phone line) then +the screensaver might not turn off right away when the user becomes active +again (the +.BR ico (1) +demo has this problem if being run in full-speed mode). This can be +alleviated by inserting strategic calls to +.BR XSync (3) +in code intended for use as a screensaver. This prevents too much graphics +activity from being buffered up. +.TP 8 +Locking and XDM +Locking doesn't work if the screensaver is launched by \fIxdm\fP. +The reason for this is that when it is launched by \fIxdm\fP, the +screensaver process is owned by some standard user id (such as \fIroot\fP +or \fIdaemon\fP) instead of the user who is logged in on the console: +because the screensaver was started \fIbefore\fP anyone was logged in. +In order for the screensaver to prompt for the password of the person +who had logged in from \fIxdm\fP, it would need to know who that user was, +and there is no reliable and safe way to figure that out. (And even if +there was, there would be some other security issues here as well.) + +So if you want to use it as a locker, you must start it with your user id. +If it has already been started by \fIxdm\fP, you can kill it with +\fBxscreensaver-command -exit\fP, and then start it again as you. +.TP 8 +Passwords +If you get an error message like ``couldn't get password of \fIuser\fP'' +then this probably means that you're on a system in which the +.BR getpwent (3) +library routine can only be effectively used by root. If this is the case, +then \fIxscreensaver\fP must be installed as setuid to root. Care has +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. +.TP 8 +TWM and Colormaps +The \fBinstallColormap\fP option doesn't work very well with the +.BR twm (1) +window manager and its descendants. + +There is a race condition between the screensaver and this window manager, +which can result in the screensaver's colormap not getting installed +properly, meaning the graphics hacks will appear in essentially random +colors. (If the screen goes white instead of black, this is probably why.) + +The +.BR mwm (1) +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 +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 +not do it if the screensaver comes on of its own volition, or is activated +from another console. Any thoughts on this problem are welcome... +.TP 8 +XView Clients +Apparently there are some problems with XView programs getting confused +and thinking that the screensaver window is the real root window even when +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. +.TP 8 +MIT Extension and Fading +When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with +the \fBfade\fP option, you may notice an unattractive flicker just before +the fade begins. This is because the server maps a black window just before +it tells the \fIxscreensaver\fP process to activate. The \fIxscreensaver\fP +process immediately unmaps that window, but this results in a flicker. I +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. +.TP 8 +Red Hot Lava +There need to be a lot more graphics hacks. In particular, there should be +a simulation of a Lavalite (tm). +.SH ENVIRONMENT +.PP +.TP 8 +.B DISPLAY +to get the default host and display number, and to inform the sub-programs +of the screen on which to draw. +.TP 8 +.B XENVIRONMENT +to get the name of a resource file that overrides the global resources +stored in the RESOURCE_MANAGER property. +.SH UPGRADES +The latest version can always be found at +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 attraction (1), +.BR greynetic (1), +.BR helix (1), +.BR hopalong (1), +.BR noseguy (1), +.BR pyro (1), +.BR xroger (1), +.BR qix (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 sierpinski (1), +.BR hopalong (1), +.BR braid (1), +.BR bouboule (1), +.BR galaxy (1), +.BR flag (1), +.BR forest (1), +.BR sphere (1), +.BR lisa (1), +.BR xdaliclock (1), +.BR xbouncebits (1), +.BR ico (1), +.BR xswarm (1), +.BR xwave (1), +.BR xv (1), +.BR xtacy (1), +.BR bongo (1), +.BR xfishtank (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 +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 . Written in late 1991; first posted +to comp.sources.x on 13-Aug-1992. + +Please let me know if you find any bugs or make any improvements. + +Thanks to David Wojtowicz for implementing \fIlockTimeout\fP. + +Thanks to Martin Kraemer for adding support for shadow passwords and +locking-disabled diagnostics. + +Thanks to the many people who have contributed graphics demos to the package. + +Thanks to Patrick Moreau for the VMS port. + +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. diff --git a/driver/xset.c b/driver/xset.c new file mode 100644 index 00000000..cd2aa38c --- /dev/null +++ b/driver/xset.c @@ -0,0 +1,232 @@ +/* xset.c --- interacting with server extensions and the builtin screensaver. + * xscreensaver, Copyright (c) 1991-1997 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include + +/* This file doesn't need the Xt headers, so stub these types out... */ +#undef XtPointer +#define XtAppContext void* +#define XrmDatabase void* +#define XtIntervalId void* +#define XtPointer void* +#define Widget void* + +#include "xscreensaver.h" + + +/* MIT SCREEN-SAVER server extension hackery. + */ + +#ifdef HAVE_MIT_SAVER_EXTENSION + +# include + +Bool +query_mit_saver_extension (saver_info *si) +{ + return XScreenSaverQueryExtension (si->dpy, + &si->mit_saver_ext_event_number, + &si->mit_saver_ext_error_number); +} + +static int +ignore_all_errors_ehandler (Display *dpy, XErrorEvent *error) +{ + return 0; +} + +static void +init_mit_saver_extension (saver_info *si) +{ + int i; + Pixmap *blank_pix = (Pixmap *) calloc (sizeof(Pixmap), si->nscreens); + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + XID kill_id = 0; + Atom kill_type = 0; + Window root = RootWindowOfScreen (ssi->screen); + blank_pix[i] = XCreatePixmap (si->dpy, root, 1, 1, 1); + + /* Kill off the old MIT-SCREEN-SAVER client if there is one. + This tends to generate X errors, though (possibly due to a bug + in the server extension itself?) so just ignore errors here. */ + if (XScreenSaverGetRegistered (si->dpy, + XScreenNumberOfScreen (ssi->screen), + &kill_id, &kill_type) + && kill_id != blank_pix[i]) + { + XErrorHandler old_handler = + XSetErrorHandler (ignore_all_errors_ehandler); + XKillClient (si->dpy, kill_id); + XSync (si->dpy, False); + XSetErrorHandler (old_handler); + } + XScreenSaverSelectInput (si->dpy, root, ScreenSaverNotifyMask); + XScreenSaverRegister (si->dpy, + XScreenNumberOfScreen (ssi->screen), + (XID) blank_pix[i], XA_PIXMAP); + } + free(blank_pix); +} +#endif /* HAVE_MIT_SAVER_EXTENSION */ + + +/* SGI SCREEN_SAVER server extension hackery. + */ + +#ifdef HAVE_SGI_SAVER_EXTENSION + +# include + +Bool +query_sgi_saver_extension (saver_info *si) +{ + return XScreenSaverQueryExtension (si->dpy, + &si->sgi_saver_ext_event_number, + &si->sgi_saver_ext_error_number); +} + +static void +init_sgi_saver_extension (saver_info *si) +{ + saver_preferences *p = &si->prefs; + int i; + if (si->screen_blanked_p) + /* If you mess with this while the server thinks it's active, + the server crashes. */ + return; + + for (i = 0; i < si->nscreens; i++) + { + saver_screen_info *ssi = &si->screens[i]; + XScreenSaverDisable (si->dpy, XScreenNumberOfScreen(ssi->screen)); + if (! XScreenSaverEnable (si->dpy, XScreenNumberOfScreen(ssi->screen))) + { + fprintf (stderr, + "%s: SGI SCREEN_SAVER extension exists, but can't be initialized;\n\ + perhaps some other screensaver program is already running?\n", + progname); + p->use_sgi_saver_extension = False; + return; + } + } +} + +#endif /* HAVE_SGI_SAVER_EXTENSION */ + + +/* Figuring out what the appropriate XSetScreenSaver() paramters are + (one wouldn't expect this to be rocket science.) + */ + +void +disable_builtin_screensaver (saver_info *si, Bool turn_off_p) +{ + saver_preferences *p = &si->prefs; + int current_server_timeout, current_server_interval; + int current_prefer_blank, current_allow_exp; + int desired_server_timeout, desired_server_interval; + int desired_prefer_blank, desired_allow_exp; + + XGetScreenSaver (si->dpy, ¤t_server_timeout, ¤t_server_interval, + ¤t_prefer_blank, ¤t_allow_exp); + + desired_server_timeout = current_server_timeout; + desired_server_interval = current_server_interval; + desired_prefer_blank = current_prefer_blank; + desired_allow_exp = current_allow_exp; + + /* 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. + + 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. + */ + desired_server_interval = 0; + + /* I suspect (but am not sure) that DontAllowExposures might have + something to do with powering off the monitor as well. */ + desired_allow_exp = AllowExposures; + +#if defined(HAVE_MIT_SAVER_EXTENSION) || defined(HAVE_SGI_SAVER_EXTENSION) + if (p->use_mit_saver_extension || p->use_sgi_saver_extension) + { + desired_server_timeout = (p->timeout / 1000); + + /* The SGI extension won't give us events unless blanking is on. + I think (unsure right now) that the MIT extension is the opposite. */ + if (p->use_sgi_saver_extension) + desired_prefer_blank = PreferBlanking; + else + desired_prefer_blank = DontPreferBlanking; + } + else +#endif /* HAVE_MIT_SAVER_EXTENSION || HAVE_SGI_SAVER_EXTENSION */ + { + desired_server_timeout = 0; + } + + if (desired_server_timeout != current_server_timeout || + desired_server_interval != current_server_interval || + desired_prefer_blank != current_prefer_blank || + desired_allow_exp != current_allow_exp) + { + if (desired_server_timeout == 0) + printf ("%s%sisabling server builtin screensaver.\n\ + You can re-enable it with \"xset s on\".\n", + (p->verbose_p ? "" : progname), + (p->verbose_p ? "\n\tD" : ": d")); + + if (p->verbose_p) + fprintf (stderr, "%s: (xset s %d %d %s %s)\n", progname, + desired_server_timeout, desired_server_interval, + (desired_prefer_blank ? "blank" : "noblank"), + (desired_allow_exp ? "noexpose" : "expose")); + + XSetScreenSaver (si->dpy, + desired_server_timeout, desired_server_interval, + desired_prefer_blank, desired_allow_exp); + XSync(si->dpy, False); + } + + +#if defined(HAVE_MIT_SAVER_EXTENSION) || defined(HAVE_SGI_SAVER_EXTENSION) + { + static Bool extension_initted = False; + if (!extension_initted) + { + extension_initted = True; +# ifdef HAVE_MIT_SAVER_EXTENSION + if (p->use_mit_saver_extension) init_mit_saver_extension(si); +# endif +# ifdef HAVE_SGI_SAVER_EXTENSION + if (p->use_sgi_saver_extension) init_sgi_saver_extension(si); +# endif + } + } +#endif /* HAVE_MIT_SAVER_EXTENSION || HAVE_SGI_SAVER_EXTENSION */ + + if (turn_off_p) + /* Turn off the server builtin saver if it is now running. */ + XForceScreenSaver (si->dpy, ScreenSaverReset); +} diff --git a/hacks/.gdbinit b/hacks/.gdbinit new file mode 100644 index 00000000..78a72360 --- /dev/null +++ b/hacks/.gdbinit @@ -0,0 +1,4 @@ +set args -geom =600x480+0+0 -sync +b screenhack_ehandler +b exit +b abort diff --git a/hacks/Makefile.in b/hacks/Makefile.in new file mode 100644 index 00000000..8efdb451 --- /dev/null +++ b/hacks/Makefile.in @@ -0,0 +1,917 @@ +# hacks/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# the `../configure' script generates `hacks/Makefile' from this file. + +@SET_MAKE@ +.SUFFIXES: +.SUFFIXES: .c .o + +srcdir = @srcdir@ +VPATH = @srcdir@ + +install_prefix = +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +mansuffix = 1 + +CC = @CC@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +DEFS = -DSTANDALONE @DEFS@ +LIBS = @LIBS@ + +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +SHELL = /bin/sh +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +HACKDIR = @HACKDIR@ + +X_CFLAGS = @X_CFLAGS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ + +HACK_PRE = $(LIBS) $(X_LIBS) $(X_PRE_LIBS) +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) + +UTILS_SRC = $(srcdir)/../utils +UTILS_BIN = ../utils + +INCLUDES = -I$(srcdir) -I$(srcdir)/.. -I$(UTILS_SRC) @INCLUDES@ + +UTIL_SRCS = $(UTILS_SRC)/alpha.c $(UTILS_SRC)/colors.c \ + $(UTILS_SRC)/grabscreen.c $(UTILS_SRC)/hsv.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 +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 + +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 \ + 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 + +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 \ + 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 + +EXES = attraction blitspin bouboule braid bubbles decayscreen deco \ + drift flag flame forest fract 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 + +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) + +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 \ + 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 +STAR = * +EXTRAS = README Makefile.in xlock.h default.xbm bob.xbm .gdbinit \ + noses/nose-$(STAR).xbm noses/nose-$(STAR).xpm \ + bubbles-tools/bubbles$(STAR) \ + bubbles-tools/xpm$(STAR) \ + bubbles-sources/$(STAR).pov \ + bubbles-samples/$(STAR).bub.gz + +VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \ + vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt + +TARFILES = $(SRCS) $(HDRS) $(MEN) $(EXTRAS) $(VMSFILES) + + +all: $(EXES) + +install: install-program install-man +uninstall: uninstall-program uninstall-man + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install + +install-program: + @for program in $(EXES); do \ + echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ; \ + $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ; \ + done + +install-man: + @men="$(MEN)" ; \ + for man in $$men; do \ + instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ + echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ; \ + $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ; \ + done + +uninstall-program: + @for program in $(EXES); do \ + echo rm -f $(HACKDIR)/$$program ; \ + rm -f $(HACKDIR)/$$program ; \ + done + +uninstall-man: + @men="$(MEN)" ; \ + for man in $$men; do \ + instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ + echo rm -f $(man1dir)/$$instname ; \ + rm -f $(man1dir)/$$instname ; \ + done + +clean: + -rm -f *.o a.out core $(EXES) + +distclean: clean + -rm -f Makefile *~ "#"* + +# Adds all current dependencies to Makefile +depend: + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SRCS) + +# Adds some dependencies to Makefile.in -- not totally accurate, but pretty +# 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: + @echo updating dependencies in `pwd`/Makefile.in... ; \ + $(DEPEND) -w 0 -f - \ + -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SRCS) | \ + ( \ + awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@\.\./utils@$$(UTILS_SRC)@g' \ + -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +TAGS: tags +tags: + find $(srcdir) -name '*.[chly]' -print | xargs etags -a + +echo_tarfiles: + @echo $(TARFILES) + + +# 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... +# +$(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)/hsv.o: $(UTILS_SRC)/hsv.c +$(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c +$(UTILS_BIN)/spline.o: $(UTILS_SRC)/spline.c +$(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c +$(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c +$(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c +$(UTILS_BIN)/xroger.o: $(UTILS_SRC)/xroger.c +$(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c + +$(UTIL_OBJS): + cd $(UTILS_BIN) ; \ + $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +# How we build object files in this directory. +.c.o: + $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< + +# Some hacks use a slightly-differently-compiled variant of this file. +# This is how to make the the other .o file from it. +# +screenhack-xlock.o: screenhack.c + $(CC) -o $@ -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) \ + -DXLOCKMORE $(srcdir)/screenhack.c + +# Some abbreviations to keep the lines short... +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 +COL = $(COLOR_OBJS) + +CC_HACK = $(CC) $(LDFLAGS) + + +# The rules for those hacks which follow the `screenhack.c' API. +# If make wasn't such an utter abomination, these could all be combined +# into one rule, but we don't live in such a perfect world. The $< rule +# is pretty much useless in the face of more than one dependency, as far +# as I can tell. +# +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) + +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) + +deco: $(HACK_OBJS) deco.o $(COL) + $(CC_HACK) -o $@ $(HACK_OBJS) deco.o $(COL) $(HACK_LIBS) + +flame: $(HACK_OBJS) flame.o $(COL) + $(CC_HACK) -o $@ $(HACK_OBJS) flame.o $(COL) $(HACK_LIBS) + +greynetic: $(HACK_OBJS) greynetic.o + $(CC_HACK) -o $@ $(HACK_OBJS) greynetic.o $(HACK_LIBS) + +halo: $(HACK_OBJS) halo.o $(COL) + $(CC_HACK) -o $@ $(HACK_OBJS) halo.o $(COL) $(HACK_LIBS) + +helix: $(HACK_OBJS) helix.o $(HSV) + $(CC_HACK) -o $@ $(HACK_OBJS) helix.o $(HSV) $(HACK_LIBS) + +hypercube: $(HACK_OBJS) hypercube.o + $(CC_HACK) -o $@ $(HACK_OBJS) hypercube.o $(HACK_LIBS) + +imsmap: $(HACK_OBJS) imsmap.o $(COL) + $(CC_HACK) -o $@ $(HACK_OBJS) imsmap.o $(COL) $(HACK_LIBS) + +kaleidescope: $(HACK_OBJS) kaleidescope.o + $(CC_HACK) -o $@ $(HACK_OBJS) kaleidescope.o $(HACK_LIBS) + +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) + +moire: $(HACK_OBJS) moire.o $(COL) + $(CC_HACK) -o $@ $(HACK_OBJS) moire.o $(COL) $(HACK_LIBS) + +noseguy: $(HACK_OBJS) noseguy.o + $(CC_HACK) -o $@ $(HACK_OBJS) noseguy.o $(XPM_LIBS) + +pedal: $(HACK_OBJS) pedal.o $(HSV) + $(CC_HACK) -o $@ $(HACK_OBJS) pedal.o $(HSV) $(HACK_LIBS) + +pyro: $(HACK_OBJS) pyro.o $(HSV) + $(CC_HACK) -o $@ $(HACK_OBJS) pyro.o $(HSV) $(HACK_LIBS) + +qix: $(HACK_OBJS) qix.o $(ALP) + $(CC_HACK) -o $@ $(HACK_OBJS) qix.o $(ALP) $(HACK_LIBS) + +rocks: $(HACK_OBJS) rocks.o + $(CC_HACK) -o $@ $(HACK_OBJS) rocks.o $(HACK_LIBS) + +rorschach: $(HACK_OBJS) rorschach.o $(HSV) + $(CC_HACK) -o $@ $(HACK_OBJS) rorschach.o $(HSV) $(HACK_LIBS) + +slidescreen: $(HACK_OBJS) slidescreen.o $(GRAB_OBJS) + $(CC_HACK) -o $@ $(HACK_OBJS) slidescreen.o $(GRAB_OBJS) $(HACK_LIBS) + +xroger: $(HACK_OBJS) xroger-hack.o $(HSV) $(XROG) + $(CC_HACK) -o $@ $(HACK_OBJS) xroger-hack.o $(HSV) $(XROG) $(HACK_LIBS) + +goop: $(HACK_OBJS) goop.o $(ALP) $(SPL) + $(CC_HACK) -o $@ $(HACK_OBJS) goop.o $(ALP) $(SPL) $(HACK_LIBS) + +starfish: $(HACK_OBJS) starfish.o $(COL) $(SPL) + $(CC_HACK) -o $@ $(HACK_OBJS) starfish.o $(COL) $(SPL) $(HACK_LIBS) + +munch: $(HACK_OBJS) munch.o $(COL) $(SPL) + $(CC_HACK) -o $@ $(HACK_OBJS) munch.o $(COL) $(SPL) $(HACK_LIBS) + + +# The rules for those hacks which follow the `xlockmore' API. +# + +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) + +drift: drift.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(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) + +fract: fract.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +galaxy: galaxy.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +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) + +ifs: ifs.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +julia: julia.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +laser: laser.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +lightning: lightning.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +lisa: lisa.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +penrose: penrose.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +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) + +sphere: sphere.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +spiral: spiral.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +strange: strange.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +swirl: swirl.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +fadeplot: fadeplot.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +attraction.o: $(srcdir)/screenhack.h +attraction.o: $(srcdir)/../config.h +attraction.o: $(UTILS_SRC)/yarandom.h +attraction.o: $(UTILS_SRC)/usleep.h +attraction.o: $(UTILS_SRC)/resources.h +attraction.o: $(UTILS_SRC)/hsv.h +attraction.o: $(UTILS_SRC)/colors.h +attraction.o: $(UTILS_SRC)/grabscreen.h +attraction.o: $(UTILS_SRC)/visual.h +attraction.o: $(UTILS_SRC)/spline.h +blitspin.o: $(srcdir)/screenhack.h +blitspin.o: $(srcdir)/../config.h +blitspin.o: $(UTILS_SRC)/yarandom.h +blitspin.o: $(UTILS_SRC)/usleep.h +blitspin.o: $(UTILS_SRC)/resources.h +blitspin.o: $(UTILS_SRC)/hsv.h +blitspin.o: $(UTILS_SRC)/colors.h +blitspin.o: $(UTILS_SRC)/grabscreen.h +blitspin.o: $(UTILS_SRC)/visual.h +blitspin.o: $(srcdir)/default.xbm +bouboule.o: $(srcdir)/xlockmore.h +bouboule.o: $(srcdir)/../config.h +bouboule.o: $(srcdir)/xlockmoreI.h +bouboule.o: $(srcdir)/screenhack.h +bouboule.o: $(UTILS_SRC)/yarandom.h +bouboule.o: $(UTILS_SRC)/usleep.h +bouboule.o: $(UTILS_SRC)/resources.h +bouboule.o: $(UTILS_SRC)/hsv.h +bouboule.o: $(UTILS_SRC)/colors.h +bouboule.o: $(UTILS_SRC)/grabscreen.h +bouboule.o: $(UTILS_SRC)/visual.h +braid.o: $(srcdir)/xlockmore.h +braid.o: $(srcdir)/../config.h +braid.o: $(srcdir)/xlockmoreI.h +braid.o: $(srcdir)/screenhack.h +braid.o: $(UTILS_SRC)/yarandom.h +braid.o: $(UTILS_SRC)/usleep.h +braid.o: $(UTILS_SRC)/resources.h +braid.o: $(UTILS_SRC)/hsv.h +braid.o: $(UTILS_SRC)/colors.h +braid.o: $(UTILS_SRC)/grabscreen.h +braid.o: $(UTILS_SRC)/visual.h +bubbles.o: $(srcdir)/screenhack.h +bubbles.o: $(srcdir)/../config.h +bubbles.o: $(UTILS_SRC)/yarandom.h +bubbles.o: $(UTILS_SRC)/usleep.h +bubbles.o: $(UTILS_SRC)/resources.h +bubbles.o: $(UTILS_SRC)/hsv.h +bubbles.o: $(UTILS_SRC)/colors.h +bubbles.o: $(UTILS_SRC)/grabscreen.h +bubbles.o: $(UTILS_SRC)/visual.h +bubbles.o: $(srcdir)/bubbles.h +bubbles_default.o: $(srcdir)/../config.h +bubbles_default.o: $(srcdir)/bubbles.h +decayscreen.o: $(srcdir)/screenhack.h +decayscreen.o: $(srcdir)/../config.h +decayscreen.o: $(UTILS_SRC)/yarandom.h +decayscreen.o: $(UTILS_SRC)/usleep.h +decayscreen.o: $(UTILS_SRC)/resources.h +decayscreen.o: $(UTILS_SRC)/hsv.h +decayscreen.o: $(UTILS_SRC)/colors.h +decayscreen.o: $(UTILS_SRC)/grabscreen.h +decayscreen.o: $(UTILS_SRC)/visual.h +deco.o: $(srcdir)/screenhack.h +deco.o: $(srcdir)/../config.h +deco.o: $(UTILS_SRC)/yarandom.h +deco.o: $(UTILS_SRC)/usleep.h +deco.o: $(UTILS_SRC)/resources.h +deco.o: $(UTILS_SRC)/hsv.h +deco.o: $(UTILS_SRC)/colors.h +deco.o: $(UTILS_SRC)/grabscreen.h +deco.o: $(UTILS_SRC)/visual.h +drift.o: $(srcdir)/xlockmore.h +drift.o: $(srcdir)/../config.h +drift.o: $(srcdir)/xlockmoreI.h +drift.o: $(srcdir)/screenhack.h +drift.o: $(UTILS_SRC)/yarandom.h +drift.o: $(UTILS_SRC)/usleep.h +drift.o: $(UTILS_SRC)/resources.h +drift.o: $(UTILS_SRC)/hsv.h +drift.o: $(UTILS_SRC)/colors.h +drift.o: $(UTILS_SRC)/grabscreen.h +drift.o: $(UTILS_SRC)/visual.h +flag.o: $(srcdir)/xlockmore.h +flag.o: $(srcdir)/../config.h +flag.o: $(srcdir)/xlockmoreI.h +flag.o: $(srcdir)/screenhack.h +flag.o: $(UTILS_SRC)/yarandom.h +flag.o: $(UTILS_SRC)/usleep.h +flag.o: $(UTILS_SRC)/resources.h +flag.o: $(UTILS_SRC)/hsv.h +flag.o: $(UTILS_SRC)/colors.h +flag.o: $(UTILS_SRC)/grabscreen.h +flag.o: $(UTILS_SRC)/visual.h +flag.o: $(srcdir)/bob.xbm +flame.o: $(srcdir)/screenhack.h +flame.o: $(srcdir)/../config.h +flame.o: $(UTILS_SRC)/yarandom.h +flame.o: $(UTILS_SRC)/usleep.h +flame.o: $(UTILS_SRC)/resources.h +flame.o: $(UTILS_SRC)/hsv.h +flame.o: $(UTILS_SRC)/colors.h +flame.o: $(UTILS_SRC)/grabscreen.h +flame.o: $(UTILS_SRC)/visual.h +forest.o: $(srcdir)/xlockmore.h +forest.o: $(srcdir)/../config.h +forest.o: $(srcdir)/xlockmoreI.h +forest.o: $(srcdir)/screenhack.h +forest.o: $(UTILS_SRC)/yarandom.h +forest.o: $(UTILS_SRC)/usleep.h +forest.o: $(UTILS_SRC)/resources.h +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 +galaxy.o: $(srcdir)/xlockmore.h +galaxy.o: $(srcdir)/../config.h +galaxy.o: $(srcdir)/xlockmoreI.h +galaxy.o: $(srcdir)/screenhack.h +galaxy.o: $(UTILS_SRC)/yarandom.h +galaxy.o: $(UTILS_SRC)/usleep.h +galaxy.o: $(UTILS_SRC)/resources.h +galaxy.o: $(UTILS_SRC)/hsv.h +galaxy.o: $(UTILS_SRC)/colors.h +galaxy.o: $(UTILS_SRC)/grabscreen.h +galaxy.o: $(UTILS_SRC)/visual.h +grav.o: $(srcdir)/xlockmore.h +grav.o: $(srcdir)/../config.h +grav.o: $(srcdir)/xlockmoreI.h +grav.o: $(srcdir)/screenhack.h +grav.o: $(UTILS_SRC)/yarandom.h +grav.o: $(UTILS_SRC)/usleep.h +grav.o: $(UTILS_SRC)/resources.h +grav.o: $(UTILS_SRC)/hsv.h +grav.o: $(UTILS_SRC)/colors.h +grav.o: $(UTILS_SRC)/grabscreen.h +grav.o: $(UTILS_SRC)/visual.h +greynetic.o: $(srcdir)/screenhack.h +greynetic.o: $(srcdir)/../config.h +greynetic.o: $(UTILS_SRC)/yarandom.h +greynetic.o: $(UTILS_SRC)/usleep.h +greynetic.o: $(UTILS_SRC)/resources.h +greynetic.o: $(UTILS_SRC)/hsv.h +greynetic.o: $(UTILS_SRC)/colors.h +greynetic.o: $(UTILS_SRC)/grabscreen.h +greynetic.o: $(UTILS_SRC)/visual.h +halo.o: $(srcdir)/screenhack.h +halo.o: $(srcdir)/../config.h +halo.o: $(UTILS_SRC)/yarandom.h +halo.o: $(UTILS_SRC)/usleep.h +halo.o: $(UTILS_SRC)/resources.h +halo.o: $(UTILS_SRC)/hsv.h +halo.o: $(UTILS_SRC)/colors.h +halo.o: $(UTILS_SRC)/grabscreen.h +halo.o: $(UTILS_SRC)/visual.h +helix.o: $(srcdir)/screenhack.h +helix.o: $(srcdir)/../config.h +helix.o: $(UTILS_SRC)/yarandom.h +helix.o: $(UTILS_SRC)/usleep.h +helix.o: $(UTILS_SRC)/resources.h +helix.o: $(UTILS_SRC)/hsv.h +helix.o: $(UTILS_SRC)/colors.h +helix.o: $(UTILS_SRC)/grabscreen.h +helix.o: $(UTILS_SRC)/visual.h +hopalong.o: $(srcdir)/xlockmore.h +hopalong.o: $(srcdir)/../config.h +hopalong.o: $(srcdir)/xlockmoreI.h +hopalong.o: $(srcdir)/screenhack.h +hopalong.o: $(UTILS_SRC)/yarandom.h +hopalong.o: $(UTILS_SRC)/usleep.h +hopalong.o: $(UTILS_SRC)/resources.h +hopalong.o: $(UTILS_SRC)/hsv.h +hopalong.o: $(UTILS_SRC)/colors.h +hopalong.o: $(UTILS_SRC)/grabscreen.h +hopalong.o: $(UTILS_SRC)/visual.h +hypercube.o: $(srcdir)/screenhack.h +hypercube.o: $(srcdir)/../config.h +hypercube.o: $(UTILS_SRC)/yarandom.h +hypercube.o: $(UTILS_SRC)/usleep.h +hypercube.o: $(UTILS_SRC)/resources.h +hypercube.o: $(UTILS_SRC)/hsv.h +hypercube.o: $(UTILS_SRC)/colors.h +hypercube.o: $(UTILS_SRC)/grabscreen.h +hypercube.o: $(UTILS_SRC)/visual.h +ifs.o: $(srcdir)/xlockmore.h +ifs.o: $(srcdir)/../config.h +ifs.o: $(srcdir)/xlockmoreI.h +ifs.o: $(srcdir)/screenhack.h +ifs.o: $(UTILS_SRC)/yarandom.h +ifs.o: $(UTILS_SRC)/usleep.h +ifs.o: $(UTILS_SRC)/resources.h +ifs.o: $(UTILS_SRC)/hsv.h +ifs.o: $(UTILS_SRC)/colors.h +ifs.o: $(UTILS_SRC)/grabscreen.h +ifs.o: $(UTILS_SRC)/visual.h +imsmap.o: $(srcdir)/screenhack.h +imsmap.o: $(srcdir)/../config.h +imsmap.o: $(UTILS_SRC)/yarandom.h +imsmap.o: $(UTILS_SRC)/usleep.h +imsmap.o: $(UTILS_SRC)/resources.h +imsmap.o: $(UTILS_SRC)/hsv.h +imsmap.o: $(UTILS_SRC)/colors.h +imsmap.o: $(UTILS_SRC)/grabscreen.h +imsmap.o: $(UTILS_SRC)/visual.h +julia.o: $(srcdir)/xlockmore.h +julia.o: $(srcdir)/../config.h +julia.o: $(srcdir)/xlockmoreI.h +julia.o: $(srcdir)/screenhack.h +julia.o: $(UTILS_SRC)/yarandom.h +julia.o: $(UTILS_SRC)/usleep.h +julia.o: $(UTILS_SRC)/resources.h +julia.o: $(UTILS_SRC)/hsv.h +julia.o: $(UTILS_SRC)/colors.h +julia.o: $(UTILS_SRC)/grabscreen.h +julia.o: $(UTILS_SRC)/visual.h +kaleidescope.o: $(UTILS_SRC)/spline.h +kaleidescope.o: $(srcdir)/screenhack.h +kaleidescope.o: $(srcdir)/../config.h +kaleidescope.o: $(UTILS_SRC)/yarandom.h +kaleidescope.o: $(UTILS_SRC)/usleep.h +kaleidescope.o: $(UTILS_SRC)/resources.h +kaleidescope.o: $(UTILS_SRC)/hsv.h +kaleidescope.o: $(UTILS_SRC)/colors.h +kaleidescope.o: $(UTILS_SRC)/grabscreen.h +kaleidescope.o: $(UTILS_SRC)/visual.h +laser.o: $(srcdir)/xlockmore.h +laser.o: $(srcdir)/../config.h +laser.o: $(srcdir)/xlockmoreI.h +laser.o: $(srcdir)/screenhack.h +laser.o: $(UTILS_SRC)/yarandom.h +laser.o: $(UTILS_SRC)/usleep.h +laser.o: $(UTILS_SRC)/resources.h +laser.o: $(UTILS_SRC)/hsv.h +laser.o: $(UTILS_SRC)/colors.h +laser.o: $(UTILS_SRC)/grabscreen.h +laser.o: $(UTILS_SRC)/visual.h +lightning.o: $(srcdir)/xlockmore.h +lightning.o: $(srcdir)/../config.h +lightning.o: $(srcdir)/xlockmoreI.h +lightning.o: $(srcdir)/screenhack.h +lightning.o: $(UTILS_SRC)/yarandom.h +lightning.o: $(UTILS_SRC)/usleep.h +lightning.o: $(UTILS_SRC)/resources.h +lightning.o: $(UTILS_SRC)/hsv.h +lightning.o: $(UTILS_SRC)/colors.h +lightning.o: $(UTILS_SRC)/grabscreen.h +lightning.o: $(UTILS_SRC)/visual.h +lisa.o: $(srcdir)/xlockmore.h +lisa.o: $(srcdir)/../config.h +lisa.o: $(srcdir)/xlockmoreI.h +lisa.o: $(srcdir)/screenhack.h +lisa.o: $(UTILS_SRC)/yarandom.h +lisa.o: $(UTILS_SRC)/usleep.h +lisa.o: $(UTILS_SRC)/resources.h +lisa.o: $(UTILS_SRC)/hsv.h +lisa.o: $(UTILS_SRC)/colors.h +lisa.o: $(UTILS_SRC)/grabscreen.h +lisa.o: $(UTILS_SRC)/visual.h +lmorph.o: $(srcdir)/screenhack.h +lmorph.o: $(srcdir)/../config.h +lmorph.o: $(UTILS_SRC)/yarandom.h +lmorph.o: $(UTILS_SRC)/usleep.h +lmorph.o: $(UTILS_SRC)/resources.h +lmorph.o: $(UTILS_SRC)/hsv.h +lmorph.o: $(UTILS_SRC)/colors.h +lmorph.o: $(UTILS_SRC)/grabscreen.h +lmorph.o: $(UTILS_SRC)/visual.h +maze.o: $(srcdir)/screenhack.h +maze.o: $(srcdir)/../config.h +maze.o: $(UTILS_SRC)/yarandom.h +maze.o: $(UTILS_SRC)/usleep.h +maze.o: $(UTILS_SRC)/resources.h +maze.o: $(UTILS_SRC)/hsv.h +maze.o: $(UTILS_SRC)/colors.h +maze.o: $(UTILS_SRC)/grabscreen.h +maze.o: $(UTILS_SRC)/visual.h +moire.o: $(srcdir)/screenhack.h +moire.o: $(srcdir)/../config.h +moire.o: $(UTILS_SRC)/yarandom.h +moire.o: $(UTILS_SRC)/usleep.h +moire.o: $(UTILS_SRC)/resources.h +moire.o: $(UTILS_SRC)/hsv.h +moire.o: $(UTILS_SRC)/colors.h +moire.o: $(UTILS_SRC)/grabscreen.h +moire.o: $(UTILS_SRC)/visual.h +noseguy.o: $(srcdir)/screenhack.h +noseguy.o: $(srcdir)/../config.h +noseguy.o: $(UTILS_SRC)/yarandom.h +noseguy.o: $(UTILS_SRC)/usleep.h +noseguy.o: $(UTILS_SRC)/resources.h +noseguy.o: $(UTILS_SRC)/hsv.h +noseguy.o: $(UTILS_SRC)/colors.h +noseguy.o: $(UTILS_SRC)/grabscreen.h +noseguy.o: $(UTILS_SRC)/visual.h +noseguy.o: $(srcdir)/noses/nose-f1.xpm +noseguy.o: $(srcdir)/noses/nose-f2.xpm +noseguy.o: $(srcdir)/noses/nose-f3.xpm +noseguy.o: $(srcdir)/noses/nose-f4.xpm +noseguy.o: $(srcdir)/noses/nose-l1.xpm +noseguy.o: $(srcdir)/noses/nose-l2.xpm +noseguy.o: $(srcdir)/noses/nose-r1.xpm +noseguy.o: $(srcdir)/noses/nose-r2.xpm +pedal.o: $(srcdir)/screenhack.h +pedal.o: $(srcdir)/../config.h +pedal.o: $(UTILS_SRC)/yarandom.h +pedal.o: $(UTILS_SRC)/usleep.h +pedal.o: $(UTILS_SRC)/resources.h +pedal.o: $(UTILS_SRC)/hsv.h +pedal.o: $(UTILS_SRC)/colors.h +pedal.o: $(UTILS_SRC)/grabscreen.h +pedal.o: $(UTILS_SRC)/visual.h +penrose.o: $(srcdir)/xlockmore.h +penrose.o: $(srcdir)/../config.h +penrose.o: $(srcdir)/xlockmoreI.h +penrose.o: $(srcdir)/screenhack.h +penrose.o: $(UTILS_SRC)/yarandom.h +penrose.o: $(UTILS_SRC)/usleep.h +penrose.o: $(UTILS_SRC)/resources.h +penrose.o: $(UTILS_SRC)/hsv.h +penrose.o: $(UTILS_SRC)/colors.h +penrose.o: $(UTILS_SRC)/grabscreen.h +penrose.o: $(UTILS_SRC)/visual.h +pyro.o: $(srcdir)/screenhack.h +pyro.o: $(srcdir)/../config.h +pyro.o: $(UTILS_SRC)/yarandom.h +pyro.o: $(UTILS_SRC)/usleep.h +pyro.o: $(UTILS_SRC)/resources.h +pyro.o: $(UTILS_SRC)/hsv.h +pyro.o: $(UTILS_SRC)/colors.h +pyro.o: $(UTILS_SRC)/grabscreen.h +pyro.o: $(UTILS_SRC)/visual.h +qix.o: $(srcdir)/screenhack.h +qix.o: $(srcdir)/../config.h +qix.o: $(UTILS_SRC)/yarandom.h +qix.o: $(UTILS_SRC)/usleep.h +qix.o: $(UTILS_SRC)/resources.h +qix.o: $(UTILS_SRC)/hsv.h +qix.o: $(UTILS_SRC)/colors.h +qix.o: $(UTILS_SRC)/grabscreen.h +qix.o: $(UTILS_SRC)/visual.h +qix.o: $(UTILS_SRC)/alpha.h +rocks.o: $(srcdir)/screenhack.h +rocks.o: $(srcdir)/../config.h +rocks.o: $(UTILS_SRC)/yarandom.h +rocks.o: $(UTILS_SRC)/usleep.h +rocks.o: $(UTILS_SRC)/resources.h +rocks.o: $(UTILS_SRC)/hsv.h +rocks.o: $(UTILS_SRC)/colors.h +rocks.o: $(UTILS_SRC)/grabscreen.h +rocks.o: $(UTILS_SRC)/visual.h +rorschach.o: $(srcdir)/screenhack.h +rorschach.o: $(srcdir)/../config.h +rorschach.o: $(UTILS_SRC)/yarandom.h +rorschach.o: $(UTILS_SRC)/usleep.h +rorschach.o: $(UTILS_SRC)/resources.h +rorschach.o: $(UTILS_SRC)/hsv.h +rorschach.o: $(UTILS_SRC)/colors.h +rorschach.o: $(UTILS_SRC)/grabscreen.h +rorschach.o: $(UTILS_SRC)/visual.h +screenhack.o: $(UTILS_SRC)/xmu.h +screenhack.o: $(srcdir)/screenhack.h +screenhack.o: $(srcdir)/../config.h +screenhack.o: $(UTILS_SRC)/yarandom.h +screenhack.o: $(UTILS_SRC)/usleep.h +screenhack.o: $(UTILS_SRC)/resources.h +screenhack.o: $(UTILS_SRC)/hsv.h +screenhack.o: $(UTILS_SRC)/colors.h +screenhack.o: $(UTILS_SRC)/grabscreen.h +screenhack.o: $(UTILS_SRC)/visual.h +screenhack.o: $(UTILS_SRC)/version.h +screenhack.o: $(UTILS_SRC)/vroot.h +sierpinski.o: $(srcdir)/xlockmore.h +sierpinski.o: $(srcdir)/../config.h +sierpinski.o: $(srcdir)/xlockmoreI.h +sierpinski.o: $(srcdir)/screenhack.h +sierpinski.o: $(UTILS_SRC)/yarandom.h +sierpinski.o: $(UTILS_SRC)/usleep.h +sierpinski.o: $(UTILS_SRC)/resources.h +sierpinski.o: $(UTILS_SRC)/hsv.h +sierpinski.o: $(UTILS_SRC)/colors.h +sierpinski.o: $(UTILS_SRC)/grabscreen.h +sierpinski.o: $(UTILS_SRC)/visual.h +slidescreen.o: $(srcdir)/screenhack.h +slidescreen.o: $(srcdir)/../config.h +slidescreen.o: $(UTILS_SRC)/yarandom.h +slidescreen.o: $(UTILS_SRC)/usleep.h +slidescreen.o: $(UTILS_SRC)/resources.h +slidescreen.o: $(UTILS_SRC)/hsv.h +slidescreen.o: $(UTILS_SRC)/colors.h +slidescreen.o: $(UTILS_SRC)/grabscreen.h +slidescreen.o: $(UTILS_SRC)/visual.h +slip.o: $(srcdir)/xlockmore.h +slip.o: $(srcdir)/../config.h +slip.o: $(srcdir)/xlockmoreI.h +slip.o: $(srcdir)/screenhack.h +slip.o: $(UTILS_SRC)/yarandom.h +slip.o: $(UTILS_SRC)/usleep.h +slip.o: $(UTILS_SRC)/resources.h +slip.o: $(UTILS_SRC)/hsv.h +slip.o: $(UTILS_SRC)/colors.h +slip.o: $(UTILS_SRC)/grabscreen.h +slip.o: $(UTILS_SRC)/visual.h +sphere.o: $(srcdir)/xlockmore.h +sphere.o: $(srcdir)/../config.h +sphere.o: $(srcdir)/xlockmoreI.h +sphere.o: $(srcdir)/screenhack.h +sphere.o: $(UTILS_SRC)/yarandom.h +sphere.o: $(UTILS_SRC)/usleep.h +sphere.o: $(UTILS_SRC)/resources.h +sphere.o: $(UTILS_SRC)/hsv.h +sphere.o: $(UTILS_SRC)/colors.h +sphere.o: $(UTILS_SRC)/grabscreen.h +sphere.o: $(UTILS_SRC)/visual.h +spiral.o: $(srcdir)/xlockmore.h +spiral.o: $(srcdir)/../config.h +spiral.o: $(srcdir)/xlockmoreI.h +spiral.o: $(srcdir)/screenhack.h +spiral.o: $(UTILS_SRC)/yarandom.h +spiral.o: $(UTILS_SRC)/usleep.h +spiral.o: $(UTILS_SRC)/resources.h +spiral.o: $(UTILS_SRC)/hsv.h +spiral.o: $(UTILS_SRC)/colors.h +spiral.o: $(UTILS_SRC)/grabscreen.h +spiral.o: $(UTILS_SRC)/visual.h +strange.o: $(srcdir)/xlockmore.h +strange.o: $(srcdir)/../config.h +strange.o: $(srcdir)/xlockmoreI.h +strange.o: $(srcdir)/screenhack.h +strange.o: $(UTILS_SRC)/yarandom.h +strange.o: $(UTILS_SRC)/usleep.h +strange.o: $(UTILS_SRC)/resources.h +strange.o: $(UTILS_SRC)/hsv.h +strange.o: $(UTILS_SRC)/colors.h +strange.o: $(UTILS_SRC)/grabscreen.h +strange.o: $(UTILS_SRC)/visual.h +swirl.o: $(srcdir)/xlockmore.h +swirl.o: $(srcdir)/../config.h +swirl.o: $(srcdir)/xlockmoreI.h +swirl.o: $(srcdir)/screenhack.h +swirl.o: $(UTILS_SRC)/yarandom.h +swirl.o: $(UTILS_SRC)/usleep.h +swirl.o: $(UTILS_SRC)/resources.h +swirl.o: $(UTILS_SRC)/hsv.h +swirl.o: $(UTILS_SRC)/colors.h +swirl.o: $(UTILS_SRC)/grabscreen.h +swirl.o: $(UTILS_SRC)/visual.h +xlockmore.o: $(srcdir)/screenhack.h +xlockmore.o: $(srcdir)/../config.h +xlockmore.o: $(UTILS_SRC)/yarandom.h +xlockmore.o: $(UTILS_SRC)/usleep.h +xlockmore.o: $(UTILS_SRC)/resources.h +xlockmore.o: $(UTILS_SRC)/hsv.h +xlockmore.o: $(UTILS_SRC)/colors.h +xlockmore.o: $(UTILS_SRC)/grabscreen.h +xlockmore.o: $(UTILS_SRC)/visual.h +xlockmore.o: $(srcdir)/xlockmoreI.h +xroger-hack.o: $(srcdir)/screenhack.h +xroger-hack.o: $(srcdir)/../config.h +xroger-hack.o: $(UTILS_SRC)/yarandom.h +xroger-hack.o: $(UTILS_SRC)/usleep.h +xroger-hack.o: $(UTILS_SRC)/resources.h +xroger-hack.o: $(UTILS_SRC)/hsv.h +xroger-hack.o: $(UTILS_SRC)/colors.h +xroger-hack.o: $(UTILS_SRC)/grabscreen.h +xroger-hack.o: $(UTILS_SRC)/visual.h +goop.o: $(srcdir)/screenhack.h +goop.o: $(srcdir)/../config.h +goop.o: $(UTILS_SRC)/yarandom.h +goop.o: $(UTILS_SRC)/usleep.h +goop.o: $(UTILS_SRC)/resources.h +goop.o: $(UTILS_SRC)/hsv.h +goop.o: $(UTILS_SRC)/colors.h +goop.o: $(UTILS_SRC)/grabscreen.h +goop.o: $(UTILS_SRC)/visual.h +goop.o: $(UTILS_SRC)/spline.h +goop.o: $(UTILS_SRC)/alpha.h +starfish.o: $(srcdir)/screenhack.h +starfish.o: $(srcdir)/../config.h +starfish.o: $(UTILS_SRC)/yarandom.h +starfish.o: $(UTILS_SRC)/usleep.h +starfish.o: $(UTILS_SRC)/resources.h +starfish.o: $(UTILS_SRC)/hsv.h +starfish.o: $(UTILS_SRC)/colors.h +starfish.o: $(UTILS_SRC)/grabscreen.h +starfish.o: $(UTILS_SRC)/visual.h +starfish.o: $(UTILS_SRC)/spline.h +munch.o: $(srcdir)/screenhack.h +munch.o: $(srcdir)/../config.h +munch.o: $(UTILS_SRC)/yarandom.h +munch.o: $(UTILS_SRC)/usleep.h +munch.o: $(UTILS_SRC)/resources.h +munch.o: $(UTILS_SRC)/hsv.h +munch.o: $(UTILS_SRC)/colors.h +munch.o: $(UTILS_SRC)/grabscreen.h +munch.o: $(UTILS_SRC)/visual.h +fadeplot.o: $(srcdir)/xlockmore.h +fadeplot.o: $(srcdir)/../config.h +fadeplot.o: $(srcdir)/xlockmoreI.h +fadeplot.o: $(srcdir)/screenhack.h +fadeplot.o: $(UTILS_SRC)/yarandom.h +fadeplot.o: $(UTILS_SRC)/usleep.h +fadeplot.o: $(UTILS_SRC)/resources.h +fadeplot.o: $(UTILS_SRC)/hsv.h +fadeplot.o: $(UTILS_SRC)/colors.h +fadeplot.o: $(UTILS_SRC)/grabscreen.h +fadeplot.o: $(UTILS_SRC)/visual.h + diff --git a/hacks/README b/hacks/README new file mode 100644 index 00000000..34e687ea --- /dev/null +++ b/hacks/README @@ -0,0 +1,6 @@ + +This directory contains various graphics hacks. These are independent from +the xscreensaver program (in the ../driver/ directory) but some of them use +the utility functions found in the ../utils/ directory. + +If you have compilation problems, check the parameters in ../config.h. diff --git a/hacks/attraction.c b/hacks/attraction.c new file mode 100644 index 00000000..42930046 --- /dev/null +++ b/hacks/attraction.c @@ -0,0 +1,666 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997 + * 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. + */ + +/* Simulation of a pair of quasi-gravitational fields, maybe sorta kinda + a little like the strong and weak electromagnetic forces. Derived from + a Lispm screensaver by John Pezaris . Mouse control and + viscosity added by "Philip Edward Cutone, III" . + + John sez: + + The simulation started out as a purely accurate gravitational simulation, + but, with constant simulation step size, I quickly realized the field being + simulated while grossly gravitational was, in fact, non-conservative. It + also had the rather annoying behavior of dealing very badly with colliding + orbs. Therefore, I implemented a negative-gravity region (with two + thresholds; as I read your code, you only implemented one) to prevent orbs + from every coming too close together, and added a viscosity factor if the + speed of any orb got too fast. This provides a nice stable system with + interesting behavior. + + I had experimented with a number of fields including the van der Waals + force (very interesting orbiting behavior) and 1/r^3 gravity (not as + interesting as 1/r^2). An even normal viscosity (rather than the + thresholded version to bleed excess energy) is also not interesting. + The 1/r^2, -1/r^2, -10/r^2 thresholds proved not only robust but also + interesting -- the orbs never collided and the threshold viscosity fixed + the non-conservational problem. + + Philip sez: + > An even normal viscosity (rather than the thresholded version to + > bleed excess energy) is also not interesting. + + unless you make about 200 points.... set the viscosity to about .8 + and drag the mouse through it. it makes a nice wave which travels + through the field. + + And (always the troublemaker) Joe Keane sez: + + Despite what John sez, the field being simulated is always conservative. + The real problem is that it uses a simple hack, computing acceleration + *based only on the starting position*, instead of a real differential + equation solver. Thus you'll always have energy coming out of nowhere, + although it's most blatant when balls get close together. If it were + done right, you wouldn't need viscosity or artificial limits on how + close the balls can get. + */ + +#include +#include +#include "screenhack.h" +#include "spline.h" + +struct ball { + double x, y; + double vx, vy; + double dx, dy; + double mass; + int size; + int pixel_index; + int hue; +}; + +static struct ball *balls; +static int npoints; +static int threshold; +static int delay; +static int global_size; +static int segments; +static Bool glow_p; +static Bool orbit_p; +static XPoint *point_stack; +static int point_stack_size, point_stack_fp; +static XColor *colors; +static int ncolors; +static int fg_index; +static int color_shift; + +/*flip mods for mouse interaction*/ +static Bool mouse_p; +int mouse_x, mouse_y, mouse_mass, root_x, root_y; +static double viscosity; + +static enum object_mode { + ball_mode, line_mode, polygon_mode, spline_mode, spline_filled_mode, + tail_mode +} mode; + +static GC draw_gc, erase_gc; + +#define MAX_SIZE 16 + +#define min(a,b) ((a)<(b)?(a):(b)) +#define max(a,b) ((a)>(b)?(a):(b)) + +static void +init_balls (Display *dpy, Window window) +{ + int i; + XWindowAttributes xgwa; + XGCValues gcv; + int xlim, ylim, midx, midy, r, vx, vy; + double th; + Colormap cmap; + char *mode_str; + XGetWindowAttributes (dpy, window, &xgwa); + xlim = xgwa.width; + ylim = xgwa.height; + cmap = xgwa.colormap; + midx = xlim/2; + midy = ylim/2; + r = get_integer_resource ("radius", "Integer"); + if (r <= 0 || r > min (xlim/2, ylim/2)) + r = min (xlim/2, ylim/2) - 50; + vx = get_integer_resource ("vx", "Integer"); + vy = get_integer_resource ("vy", "Integer"); + npoints = get_integer_resource ("points", "Integer"); + if (npoints < 1) + npoints = 3 + (random () % 5); + balls = (struct ball *) malloc (npoints * sizeof (struct ball)); + segments = get_integer_resource ("segments", "Integer"); + if (segments < 0) segments = 1; + threshold = get_integer_resource ("threshold", "Integer"); + if (threshold < 0) threshold = 0; + delay = get_integer_resource ("delay", "Integer"); + if (delay < 0) delay = 0; + global_size = get_integer_resource ("size", "Integer"); + if (global_size < 0) global_size = 0; + glow_p = get_boolean_resource ("glow", "Boolean"); + orbit_p = get_boolean_resource ("orbit", "Boolean"); + color_shift = get_integer_resource ("colorShift", "Integer"); + if (color_shift <= 0) color_shift = 5; + + /*flip mods for mouse interaction*/ + mouse_p = get_boolean_resource ("mouse", "Boolean"); + mouse_mass = get_integer_resource ("mouseSize", "Integer"); + mouse_mass = mouse_mass * mouse_mass *10; + + viscosity = get_float_resource ("viscosity", "Float"); + + mode_str = get_string_resource ("mode", "Mode"); + if (! mode_str) mode = ball_mode; + else if (!strcmp (mode_str, "balls")) mode = ball_mode; + else if (!strcmp (mode_str, "lines")) mode = line_mode; + else if (!strcmp (mode_str, "polygons")) mode = polygon_mode; + else if (!strcmp (mode_str, "tails")) mode = tail_mode; + else if (!strcmp (mode_str, "splines")) mode = spline_mode; + else if (!strcmp (mode_str, "filled-splines")) mode = spline_filled_mode; + else { + fprintf (stderr, + "%s: mode must be balls, lines, tails, polygons, splines, or\n\ + filled-splines, not \"%s\"\n", + progname, mode_str); + exit (1); + } + + if (mode != ball_mode && mode != tail_mode) glow_p = False; + + if (mode == polygon_mode && npoints < 3) + mode = line_mode; + + ncolors = get_integer_resource ("colors", "Colors"); + if (ncolors < 2) ncolors = 2; + if (ncolors <= 2) mono_p = True; + colors = 0; + + if (!mono_p) + { + fg_index = 0; + switch (mode) + { + case ball_mode: + if (glow_p) + { + int H = random() % 360; + double S1 = 0.25; + double S2 = 1.00; + double V = frand(0.25) + 0.75; + colors = (XColor *) malloc(sizeof(*colors) * (ncolors+1)); + make_color_ramp (dpy, cmap, H, S1, V, H, S2, V, colors, &ncolors, + False, True, False); + } + else + { + ncolors = npoints; + colors = (XColor *) malloc(sizeof(*colors) * (ncolors+1)); + make_random_colormap (dpy, xgwa.visual, cmap, colors, &ncolors, + True, True, False, True); + } + break; + case line_mode: + case polygon_mode: + case spline_mode: + case spline_filled_mode: + case tail_mode: + colors = (XColor *) malloc(sizeof(*colors) * (ncolors+1)); + make_smooth_colormap (dpy, xgwa.visual, cmap, colors, &ncolors, + True, False, True); + break; + default: + abort (); + } + } + + if (!mono_p && ncolors <= 2) + { + if (colors) free (colors); + colors = 0; + mono_p = True; + } + + if (mode != ball_mode) + { + int size = (segments ? segments : 1); + point_stack_size = size * (npoints + 1); + point_stack = (XPoint *) calloc (point_stack_size, sizeof (XPoint)); + point_stack_fp = 0; + } + + gcv.line_width = (mode == tail_mode + ? (global_size ? global_size : (MAX_SIZE * 2 / 3)) + : 1); + gcv.cap_style = (mode == tail_mode ? CapRound : CapButt); + + if (mono_p) + gcv.foreground = get_pixel_resource("foreground", "Foreground", dpy, cmap); + else + gcv.foreground = colors[fg_index].pixel; + draw_gc = XCreateGC (dpy, window, GCForeground|GCLineWidth|GCCapStyle, &gcv); + + gcv.foreground = get_pixel_resource("background", "Background", dpy, cmap); + erase_gc = XCreateGC (dpy, window, GCForeground|GCLineWidth|GCCapStyle,&gcv); + + +#define rand_size() min (MAX_SIZE, 8 + (random () % (MAX_SIZE - 9))) + + if (orbit_p && !global_size) + /* To orbit, all objects must be the same mass, or the math gets + really hairy... */ + global_size = rand_size (); + + th = frand (M_PI+M_PI); + for (i = 0; i < npoints; i++) + { + int new_size = (global_size ? global_size : rand_size ()); + balls [i].dx = 0; + balls [i].dy = 0; + balls [i].size = new_size; + balls [i].mass = (new_size * new_size * 10); + balls [i].x = midx + r * cos (i * ((M_PI+M_PI) / npoints) + th); + balls [i].y = midy + r * sin (i * ((M_PI+M_PI) / npoints) + th); + if (! orbit_p) + { + balls [i].vx = vx ? vx : ((6.0 - (random () % 11)) / 8.0); + balls [i].vy = vy ? vy : ((6.0 - (random () % 11)) / 8.0); + } + if (mono_p || mode != ball_mode) + balls [i].pixel_index = -1; + else if (glow_p) + balls [i].pixel_index = 0; + else + balls [i].pixel_index = random() % ncolors; + } + + if (orbit_p) + { + double a = 0; + double v; + double v_mult = get_float_resource ("vMult", "Float"); + if (v_mult == 0.0) v_mult = 1.0; + + for (i = 1; i < npoints; i++) + { + double _2ipi_n = (2 * i * M_PI / npoints); + double x = r * cos (_2ipi_n); + double y = r * sin (_2ipi_n); + double distx = r - x; + double dist2 = (distx * distx) + (y * y); + double dist = sqrt (dist2); + double a1 = ((balls[i].mass / dist2) * + ((dist < threshold) ? -1.0 : 1.0) * + (distx / dist)); + a += a1; + } + if (a < 0.0) + { + fprintf (stderr, "%s: domain error: forces on balls too great\n", + progname); + exit (-1); + } + v = sqrt (a * r) * v_mult; + for (i = 0; i < npoints; i++) + { + double k = ((2 * i * M_PI / npoints) + th); + balls [i].vx = -v * sin (k); + balls [i].vy = v * cos (k); + } + } + + if (mono_p) glow_p = False; + XClearWindow (dpy, window); +} + +static void +compute_force (int i, double *dx_ret, double *dy_ret) +{ + int j; + double x_dist, y_dist, dist, dist2; + *dx_ret = 0; + *dy_ret = 0; + for (j = 0; j < npoints; j++) + { + if (i == j) continue; + x_dist = balls [j].x - balls [i].x; + y_dist = balls [j].y - balls [i].y; + dist2 = (x_dist * x_dist) + (y_dist * y_dist); + dist = sqrt (dist2); + + if (dist > 0.1) /* the balls are not overlapping */ + { + double new_acc = ((balls[j].mass / dist2) * + ((dist < threshold) ? -1.0 : 1.0)); + double new_acc_dist = new_acc / dist; + *dx_ret += new_acc_dist * x_dist; + *dy_ret += new_acc_dist * y_dist; + } + else + { /* the balls are overlapping; move randomly */ + *dx_ret += (frand (10.0) - 5.0); + *dy_ret += (frand (10.0) - 5.0); + } + } + + if (mouse_p) + { + x_dist = mouse_x - balls [i].x; + y_dist = mouse_y - balls [i].y; + dist2 = (x_dist * x_dist) + (y_dist * y_dist); + dist = sqrt (dist2); + + if (dist > 0.1) /* the balls are not overlapping */ + { + double new_acc = ((mouse_mass / dist2) * + ((dist < threshold) ? -1.0 : 1.0)); + double new_acc_dist = new_acc / dist; + *dx_ret += new_acc_dist * x_dist; + *dy_ret += new_acc_dist * y_dist; + } + else + { /* the balls are overlapping; move randomly */ + *dx_ret += (frand (10.0) - 5.0); + *dy_ret += (frand (10.0) - 5.0); + } + } +} + +static void +run_balls (Display *dpy, Window window) +{ + int last_point_stack_fp = point_stack_fp; + static int tick = 500, xlim, ylim; + static Colormap cmap; + int i; + + /*flip mods for mouse interaction*/ + Window root1, child1; + unsigned int mask; + if (mouse_p) + { + XQueryPointer(dpy, window, &root1, &child1, + &root_x, &root_y, &mouse_x, &mouse_y, &mask); + } + + if (tick++ == 500) + { + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + tick = 0; + xlim = xgwa.width; + ylim = xgwa.height; + cmap = xgwa.colormap; + } + + /* compute the force of attraction/repulsion among all balls */ + for (i = 0; i < npoints; i++) + compute_force (i, &balls[i].dx, &balls[i].dy); + + /* move the balls according to the forces now in effect */ + for (i = 0; i < npoints; i++) + { + double old_x = balls[i].x; + double old_y = balls[i].y; + double new_x, new_y; + int size = balls[i].size; + balls[i].vx += balls[i].dx; + balls[i].vy += balls[i].dy; + + /* don't let them get too fast: impose a terminal velocity + (actually, make the medium have friction) */ + if (balls[i].vx > 10) + { + balls[i].vx *= 0.9; + balls[i].dx = 0; + } + else if (viscosity != 1) + { + balls[i].vx *= viscosity; + } + + if (balls[i].vy > 10) + { + balls[i].vy *= 0.9; + balls[i].dy = 0; + } + else if (viscosity != 1) + { + balls[i].vy *= viscosity; + } + + balls[i].x += balls[i].vx; + balls[i].y += balls[i].vy; + + /* bounce off the walls */ + if (balls[i].x >= (xlim - balls[i].size)) + { + balls[i].x = (xlim - balls[i].size - 1); + if (balls[i].vx > 0) + balls[i].vx = -balls[i].vx; + } + if (balls[i].y >= (ylim - balls[i].size)) + { + balls[i].y = (ylim - balls[i].size - 1); + if (balls[i].vy > 0) + balls[i].vy = -balls[i].vy; + } + if (balls[i].x <= 0) + { + balls[i].x = 0; + if (balls[i].vx < 0) + balls[i].vx = -balls[i].vx; + } + if (balls[i].y <= 0) + { + balls[i].y = 0; + if (balls[i].vy < 0) + balls[i].vy = -balls[i].vy; + } + + new_x = balls[i].x; + new_y = balls[i].y; + + if (!mono_p) + { + if (mode == ball_mode) + { + if (glow_p) + { + /* make color saturation be related to particle + acceleration. */ + double limit = 0.5; + double s, fraction; + double vx = balls [i].dx; + double vy = balls [i].dy; + if (vx < 0) vx = -vx; + if (vy < 0) vy = -vy; + fraction = vx + vy; + if (fraction > limit) fraction = limit; + + s = 1 - (fraction / limit); + balls[i].pixel_index = (ncolors * s); + } + XSetForeground (dpy, draw_gc, + colors[balls[i].pixel_index].pixel); + } + } + + if (mode == ball_mode) + { + XFillArc (dpy, window, erase_gc, (int) old_x, (int) old_y, + size, size, 0, 360*64); + XFillArc (dpy, window, draw_gc, (int) new_x, (int) new_y, + size, size, 0, 360*64); + } + else + { + point_stack [point_stack_fp].x = new_x; + point_stack [point_stack_fp].y = new_y; + point_stack_fp++; + } + } + + /* draw the lines or polygons after computing all points */ + if (mode != ball_mode) + { + point_stack [point_stack_fp].x = balls [0].x; /* close the polygon */ + point_stack [point_stack_fp].y = balls [0].y; + point_stack_fp++; + if (point_stack_fp == point_stack_size) + point_stack_fp = 0; + else if (point_stack_fp > point_stack_size) /* better be aligned */ + abort (); + if (!mono_p) + { + static int tick = 0; + if (tick++ == color_shift) + { + tick = 0; + fg_index = (fg_index + 1) % ncolors; + XSetForeground (dpy, draw_gc, colors[fg_index].pixel); + } + } + } + + switch (mode) + { + case ball_mode: + break; + case line_mode: + if (segments > 0) + XDrawLines (dpy, window, erase_gc, point_stack + point_stack_fp, + npoints + 1, CoordModeOrigin); + XDrawLines (dpy, window, draw_gc, point_stack + last_point_stack_fp, + npoints + 1, CoordModeOrigin); + break; + case polygon_mode: + if (segments > 0) + XFillPolygon (dpy, window, erase_gc, point_stack + point_stack_fp, + npoints + 1, (npoints == 3 ? Convex : Complex), + CoordModeOrigin); + XFillPolygon (dpy, window, draw_gc, point_stack + last_point_stack_fp, + npoints + 1, (npoints == 3 ? Convex : Complex), + CoordModeOrigin); + break; + case tail_mode: + { + for (i = 0; i < npoints; i++) + { + int index = point_stack_fp + i; + int next_index = (index + (npoints + 1)) % point_stack_size; + XDrawLine (dpy, window, erase_gc, + point_stack [index].x, + point_stack [index].y, + point_stack [next_index].x, + point_stack [next_index].y); + + index = last_point_stack_fp + i; + next_index = (index - (npoints + 1)) % point_stack_size; + if (next_index < 0) next_index += point_stack_size; + if (point_stack [next_index].x == 0 && + point_stack [next_index].y == 0) + continue; + XDrawLine (dpy, window, draw_gc, + point_stack [index].x, + point_stack [index].y, + point_stack [next_index].x, + point_stack [next_index].y); + } + } + break; + case spline_mode: + case spline_filled_mode: + { + static spline *s = 0; + if (! s) s = make_spline (npoints); + if (segments > 0) + { + for (i = 0; i < npoints; i++) + { + s->control_x [i] = point_stack [point_stack_fp + i].x; + s->control_y [i] = point_stack [point_stack_fp + i].y; + } + compute_closed_spline (s); + if (mode == spline_filled_mode) + XFillPolygon (dpy, window, erase_gc, s->points, s->n_points, + (s->n_points == 3 ? Convex : Complex), + CoordModeOrigin); + else + XDrawLines (dpy, window, erase_gc, s->points, s->n_points, + CoordModeOrigin); + } + for (i = 0; i < npoints; i++) + { + s->control_x [i] = point_stack [last_point_stack_fp + i].x; + s->control_y [i] = point_stack [last_point_stack_fp + i].y; + } + compute_closed_spline (s); + if (mode == spline_filled_mode) + XFillPolygon (dpy, window, draw_gc, s->points, s->n_points, + (s->n_points == 3 ? Convex : Complex), + CoordModeOrigin); + else + XDrawLines (dpy, window, draw_gc, s->points, s->n_points, + CoordModeOrigin); + } + break; + default: + abort (); + } + + XSync (dpy, True); +} + + +char *progclass = "Attraction"; + +char *defaults [] = { + "Attraction.background: black", /* to placate SGI */ + "Attraction.foreground: white", + "*mode: balls", + "*points: 0", + "*size: 0", + "*colors: 200", + "*threshold: 100", + "*delay: 10000", + "*glow: false", + "*mouseSize: 10", + "*mouse: false", + "*viscosity: 1", + "*orbit: false", + "*colorShift: 3", + "*segments: 500", + "*vMult: 0.9", + 0 +}; + +XrmOptionDescRec options [] = { + { "-mode", ".mode", XrmoptionSepArg, 0 }, + { "-colors", ".colors", XrmoptionSepArg, 0 }, + { "-points", ".points", XrmoptionSepArg, 0 }, + { "-color-shift", ".colorShift", XrmoptionSepArg, 0 }, + { "-threshold", ".threshold", XrmoptionSepArg, 0 }, + { "-segments", ".segments", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-size", ".size", XrmoptionSepArg, 0 }, + { "-radius", ".radius", XrmoptionSepArg, 0 }, + { "-vx", ".vx", XrmoptionSepArg, 0 }, + { "-vy", ".vy", XrmoptionSepArg, 0 }, + { "-vmult", ".vMult", XrmoptionSepArg, 0 }, + { "-mouse-size", ".mouseSize", XrmoptionSepArg, 0 }, + { "-mouse", ".mouse", XrmoptionNoArg, "true" }, + { "-nomouse", ".mouse", XrmoptionNoArg, "false" }, + { "-viscosity", ".viscosity", XrmoptionSepArg, 0 }, + { "-glow", ".glow", XrmoptionNoArg, "true" }, + { "-noglow", ".glow", XrmoptionNoArg, "false" }, + { "-orbit", ".orbit", XrmoptionNoArg, "true" }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_balls (dpy, window); + while (1) + { + run_balls (dpy, window); + if (delay) usleep (delay); + } +} diff --git a/hacks/attraction.man b/hacks/attraction.man new file mode 100644 index 00000000..9f5e98f7 --- /dev/null +++ b/hacks/attraction.man @@ -0,0 +1,178 @@ +.de EX \"Begin example +.ne 5 +.if n .sp 1 +.if t .sp .5 +.nf +.in +.5i +.. +.de EE +.fi +.in -.5i +.if n .sp 1 +.if t .sp .5 +.. +.TH XScreenSaver 1 "14-Jun-97" "X Version 11" +.SH NAME +attraction - interactions of opposing forces +.SH SYNOPSIS +.B attraction +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-threshold \fIint\fP] [\-mode balls | lines | polygons | splines | filled-splines | tails ] [\-size \fIint\fP] [\-segments \fIint\fP] [\-delay \fIusecs\fP] [\-color-shift \fIint\fP] [\-radius \fIint\fP] [\-vx \fIint\fP] [\-vy \fIint\fP] [\-glow] [\-noglow] [\-orbit] [\-viscosity \fIfloat\fP] [\-mouse] [\-no-mouse] [\-mouse-size] +.SH DESCRIPTION +The \fIattraction\fP program has several visually different modes of +operation, all of which are based on the interactions of a set of control +points which attract each other up to a certain distance, and then begin +to repel each other. The attraction/repulsion is proportional to the +distance between any two particles. +.SH OPTIONS +.I attraction +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 \-points integer +How many control points should be used, or 0 to select the number randomly. +Default 0. Between 3 and 15 works best. +.TP 8 +.B \-threshold integer +The distance (in pixels) from each particle at which the attractive force +becomes repulsive. Default 100. +.TP 8 +.B \-mode "balls | lines | polygons | tails | splines | filled-splines" +In \fIballs\fP mode (the default) the control points are drawn as filled +circles. The larger the circle, the more massive the particle. + +In \fIlines\fP mode, the control points are connected by straight lines; +the effect is something like \fIqix\fP. + +In \fIpolygons\fP mode, the control points are connected by straight +lines, and filled in. This is most interesting in color. + +In \fIsplines\fP mode, a closed spline is interpolated from the control +points. + +In \fIfilled-splines\fP mode, the splines are filled in instead of being +outlines. This is most interesting in color. + +In \fItails\fP mode, the path which each particle follows is indicated +by a worm-like trail, whose length is controlled by the \fIsegments\fP +parameter. +.TP 8 +.B \-size integer +The size of the balls in pixels, or 0, meaning to select the sizes +randomly (the default.) If this is specified, then all balls will be +the same size. This option has an effect in all modes, since the ``size'' +of the balls controls their mass. +.TP 8 +.B \-segments integer +If in \fIlines\fP or \fIpolygons\fP mode, how many sets of line segments +or polygons should be drawn. Default 100. This has no effect in \fIballs\fP +mode. If \fIsegments\fP is 0, then no segments will ever be erased (this +is only useful in color.) +.TP 8 +.B \-delay microseconds +How much of a delay should be introduced between steps of the animation. +Default 10000, or about 0.01 seconds. +.TP 8 +.B \-color-shift int +If on a color display, the color of the line segments or polygons will +cycle through the color map. This specifies how many lines will be drawn +before a new color is chosen. (When a small number of colors are available, +increasing this value will yield smoother transitions.) Default 3. +This has no effect in \fIballs\fP mode. +.TP 8 +.B \-radius +The size in pixels of the circle on which the points are initially positioned. +The default is slightly smaller than the size of the window. +.TP 8 +.B \-glow +This is consulted only in \fIballs\fP mode. If this is specified, then +the saturation of the colors of the points will vary according to their +current acceleration. This has the effect that the balls flare brighter +when they are reacting to each other most strongly. + +In \fIglow\fP mode, all of the balls will be drawn the same (random) +color, modulo the saturation shifts. In non-glow mode, the balls will +each be drawn in a random color that doesn't change. +.TP 8 +.B \-noglow +Don't do ``glowing.'' This is the default. +.TP 8 +.B \-vx pixels +.TP 8 +.B \-vy pixels +Initial velocity of the balls. This has no effect in \fB\-orbit\fP mode. +.TP 8 +.B \-orbit +Make the initial force on each ball be tangential to the circle on which +they are initially placed, with the right velocity to hold them in orbit +about each other. After a while, roundoff errors will cause the orbit +to decay. +.TP 8 +.B \-vmult float +In orbit mode, the initial velocity of the balls is multiplied by this; +a number less than 1 will make the balls pull closer together, and a larger +number will make them move apart. The default is 0.9, meaning a slight +inward pull. +.TP 8 +.B \-viscosity float +This sets the viscosity of the hypothetical fluid through which the control +points move; the default is 1, meaning no resistance. Values higher than 1 +aren't interesting; lower values cause less motion. + +One interesting thing to try is +.EX +attraction -viscosity 0.8 -points 75 \\ + -mouse -geometry =500x500 +.EE +Give it a few seconds to settle down into a stable clump, and then move +the mouse through it to make "waves". +.TP 8 +.B \-mouse +This will cause the mouse to be considered a control point; it will not be +drawn, but it will influence the other points, so you can wave the mouse +and influence the images being created. +.TP 8 +.B \-no-mouse +Turns off \fB\-mouse\fP. +.TP 8 +.B \-mouse-size integer +In \fB\-mouse\fP mode, this sets the mass of the mouse (analagously to the +\fB\-size\fP parameter.) +.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 1992, 1993, 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 , 13-aug-92. + +Viscosity and mouse support by Philip Edward Cutone, III. diff --git a/hacks/blitspin.c b/hacks/blitspin.c new file mode 100644 index 00000000..0f2256cc --- /dev/null +++ b/hacks/blitspin.c @@ -0,0 +1,341 @@ +/* xscreensaver, Copyright (c) 1992-1997 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. + */ + +/* Rotate a bitmap using using bitblts. + The bitmap must be square, and must be a power of 2 in size. + This was translated from SmallTalk code which appeared in the + August 1981 issue of Byte magazine. + + The input bitmap may be non-square, it is padded and centered + with the background color. Another way would be to subdivide + the bitmap into square components and rotate them independently + (and preferably in parallel), but I don't think that would be as + interesting looking. + + It's too bad almost nothing uses blitter hardware these days, + or this might actually win. + */ + +#include "screenhack.h" +#include + +#ifdef HAVE_XPM +# include +# ifndef PIXEL_ALREADY_TYPEDEFED +# define PIXEL_ALREADY_TYPEDEFED /* Sigh, Xmu/Drawing.h needs this... */ +# endif +#endif + +#ifdef HAVE_XMU +# ifndef VMS +# include +#else /* VMS */ +# include +# endif /* VMS */ +#endif + +#include "default.xbm" + +static Display *dpy; +static Window window; +static unsigned int size; +static Pixmap self, temp, mask; +static GC SET, CLR, CPY, IOR, AND, XOR; +static GC gc; +static int delay, delay2; +static Pixmap bitmap; +static int depth; +static unsigned int fg, bg; + +static void display (Pixmap); + +#define copy_all_to(from, xoff, yoff, to, gc) \ + XCopyArea (dpy, (from), (to), (gc), 0, 0, \ + size-(xoff), size-(yoff), (xoff), (yoff)) + +#define copy_all_from(to, xoff, yoff, from, gc) \ + XCopyArea (dpy, (from), (to), (gc), (xoff), (yoff), \ + size-(xoff), size-(yoff), 0, 0) + +static void +rotate (void) +{ + int qwad; /* fuckin' C, man... who needs namespaces? */ + XFillRectangle (dpy, mask, CLR, 0, 0, size, size); + XFillRectangle (dpy, mask, SET, 0, 0, size>>1, size>>1); + for (qwad = size>>1; qwad > 0; qwad>>=1) + { + if (delay) usleep (delay); + copy_all_to (mask, 0, 0, temp, CPY); /* 1 */ + copy_all_to (mask, 0, qwad, temp, IOR); /* 2 */ + copy_all_to (self, 0, 0, temp, AND); /* 3 */ + copy_all_to (temp, 0, 0, self, XOR); /* 4 */ + copy_all_from (temp, qwad, 0, self, XOR); /* 5 */ + copy_all_from (self, qwad, 0, self, IOR); /* 6 */ + copy_all_to (temp, qwad, 0, self, XOR); /* 7 */ + copy_all_to (self, 0, 0, temp, CPY); /* 8 */ + copy_all_from (temp, qwad, qwad, self, XOR); /* 9 */ + copy_all_to (mask, 0, 0, temp, AND); /* A */ + copy_all_to (temp, 0, 0, self, XOR); /* B */ + copy_all_to (temp, qwad, qwad, self, XOR); /* C */ + copy_all_from (mask, qwad>>1, qwad>>1, mask, AND); /* D */ + copy_all_to (mask, qwad, 0, mask, IOR); /* E */ + copy_all_to (mask, 0, qwad, mask, IOR); /* F */ + display (self); + } +} + +static void +read_bitmap (char *bitmap_name, int *widthP, int *heightP) +{ +#ifdef HAVE_XPM + XWindowAttributes xgwa; + XpmAttributes xpmattrs; + int result; + xpmattrs.valuemask = 0; + bitmap = 0; + + XGetWindowAttributes (dpy, window, &xgwa); + +# ifdef XpmCloseness + xpmattrs.valuemask |= XpmCloseness; + xpmattrs.closeness = 40000; +# endif +# ifdef XpmVisual + xpmattrs.valuemask |= XpmVisual; + xpmattrs.visual = xgwa.visual; +# endif +# ifdef XpmDepth + xpmattrs.valuemask |= XpmDepth; + xpmattrs.depth = xgwa.depth; +# endif +# ifdef XpmColormap + xpmattrs.valuemask |= XpmColormap; + xpmattrs.colormap = xgwa.colormap; +# endif + + result = XpmReadFileToPixmap (dpy, window, bitmap_name, &bitmap, 0, + &xpmattrs); + switch (result) + { + case XpmColorError: + fprintf (stderr, "%s: warning: xpm color substitution performed\n", + progname); + /* fall through */ + case XpmSuccess: + *widthP = xpmattrs.width; + *heightP = xpmattrs.height; + break; + case XpmFileInvalid: + case XpmOpenFailed: + bitmap = 0; + break; + case XpmColorFailed: + fprintf (stderr, "%s: xpm: color allocation failed\n", progname); + exit (-1); + case XpmNoMemory: + fprintf (stderr, "%s: xpm: out of memory\n", progname); + exit (-1); + default: + fprintf (stderr, "%s: xpm: unknown error code %d\n", progname, result); + exit (-1); + } + if (! bitmap) +#endif + +#ifdef HAVE_XMU + { + int xh, yh; + Pixmap b2; + bitmap = XmuLocateBitmapFile (DefaultScreenOfDisplay (dpy), bitmap_name, + 0, 0, widthP, heightP, &xh, &yh); + if (! bitmap) + { + fprintf (stderr, "%s: couldn't find bitmap %s\n", progname, + bitmap_name); + exit (1); + } + b2 = XmuCreatePixmapFromBitmap (dpy, window, bitmap, *widthP, *heightP, + depth, fg, bg); + XFreePixmap (dpy, bitmap); + bitmap = b2; + } +#else /* !XMU */ + { + fprintf (stderr, + "%s: your vendor doesn't ship the standard Xmu library.\n", + progname); + fprintf (stderr, "\tWe can't load XBM files without it.\n"); + exit (1); + } +#endif /* !XMU */ +} + + +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; + + grab_screen_image(xgwa.screen, window); + p = XCreatePixmap(dpy, window, xgwa.width, xgwa.height, 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); + + + /* Reset this... */ + XSetWindowBackground (dpy, window, + get_pixel_resource ("background", "Background", + dpy, xgwa.colormap)); + XClearWindow (dpy, window); + + return p; +} + + +static void +init (void) +{ + XWindowAttributes xgwa; + Colormap cmap; + XGCValues gcv; + int width, height; + unsigned int real_size; + char *bitmap_name; + int i; + + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + depth = xgwa.depth; + + fg = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + bg = get_pixel_resource ("background", "Background", dpy, cmap); + delay = get_integer_resource ("delay", "Integer"); + delay2 = get_integer_resource ("delay2", "Integer"); + if (delay < 0) delay = 0; + if (delay2 < 0) delay2 = 0; + bitmap_name = get_string_resource ("bitmap", "Bitmap"); + if (! bitmap_name || !*bitmap_name) + bitmap_name = "(default)"; + + if (!strcmp (bitmap_name, "(default)")) + { + width = logo_width; + height = logo_height; + bitmap = XCreatePixmapFromBitmapData (dpy, window, (char *) logo_bits, + width, height, fg, bg, depth); + } + else if (!strcmp (bitmap_name, "(screen)")) + { + bitmap = read_screen (dpy, window, &width, &height); + } + else + { + read_bitmap (bitmap_name, &width, &height); + } + + real_size = (width > height) ? width : height; + + 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)<<(i+1); + self = XCreatePixmap (dpy, window, size, size, depth); + temp = XCreatePixmap (dpy, window, size, size, depth); + mask = XCreatePixmap (dpy, window, size, size, depth); + gcv.foreground = (depth == 1 ? 1 : (~0)); + gcv.function=GXset; SET = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); + gcv.function=GXclear;CLR = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); + gcv.function=GXcopy; CPY = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); + gcv.function=GXor; IOR = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); + gcv.function=GXand; AND = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); + gcv.function=GXxor; XOR = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); + + gcv.foreground = gcv.background = bg; + gc = XCreateGC (dpy, window, GCForeground|GCBackground, &gcv); + /* Clear self to the background color (not to 0, which CLR does.) */ + XFillRectangle (dpy, self, gc, 0, 0, size, size); + XSetForeground (dpy, gc, fg); + + XCopyArea (dpy, bitmap, self, CPY, 0, 0, width, height, + (size - width)>>1, (size - height)>>1); +} + +static void +display (Pixmap pixmap) +{ + XWindowAttributes xgwa; + static int last_w = 0, last_h = 0; + XGetWindowAttributes (dpy, window, &xgwa); + if (xgwa.width != last_w || xgwa.height != last_h) + { + XClearWindow (dpy, window); + last_w = xgwa.width; + last_h = xgwa.height; + } +#ifdef HAVE_XPM + if (depth != 1) + XCopyArea (dpy, pixmap, window, gc, 0, 0, size, size, + (xgwa.width-size)>>1, (xgwa.height-size)>>1); + else +#endif + XCopyPlane (dpy, pixmap, window, gc, 0, 0, size, size, + (xgwa.width-size)>>1, (xgwa.height-size)>>1, 1); +/* + XDrawRectangle (dpy, window, gc, + ((xgwa.width-size)>>1)-1, ((xgwa.height-size)>>1)-1, + size+2, size+2); +*/ + XSync (dpy, True); +} + + +char *progclass = "BlitSpin"; + +char *defaults [] = { + "BlitSpin.background: black", /* to placate SGI */ + "BlitSpin.foreground: white", + "*delay: 500000", + "*delay2: 500000", + "*bitmap: (default)", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-delay2", ".delay2", XrmoptionSepArg, 0 }, + { "-bitmap", ".bitmap", XrmoptionSepArg, 0 }, + { "-grab-screen", ".bitmap", XrmoptionNoArg, "(screen)" }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *d, Window w) +{ + dpy = d; + window = w; + init (); + while (1) + { + rotate (); + if (delay2) usleep (delay2); + } +} diff --git a/hacks/blitspin.man b/hacks/blitspin.man new file mode 100644 index 00000000..d7e87d30 --- /dev/null +++ b/hacks/blitspin.man @@ -0,0 +1,81 @@ +.TH XScreenSaver 1 "16-May-97" "X Version 11" +.SH NAME +blitspin - rotate a bitmap in an interesting way +.SH SYNOPSIS +.B blitspin +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-bitmap \fIfilename\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP] +.SH DESCRIPTION +The \fIblitspin\fP program repeatedly rotates a bitmap by 90 degrees by +using logical operations: the bitmap is divided into quadrants, and the +quadrants are shifted clockwise. Then the same thing is done again with +progressively smaller quadrants, except that all sub-quadrants of a +given size are rotated in parallel. So this takes \fBO(16*log2(N))\fP +blits of size NxN, with the limitation that the image must be square, +and the size must be a power of 2. +.SH OPTIONS +.I blitspin +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 \-bitmap \fIfilename\fP +The file name of a bitmap to rotate. It need not be square: it +will be padded with the background color. If unspecified or the +string \fI(default)\fP, a builtin bitmap is used. + +If support for the \fIXPM\fP library was enabled at compile-time, +the specified file may be in \fIXPM\fP format as well as \fIXBM\fP, and +thus may be a color image. + +The \fB*bitmapFilePath\fP resource will be searched if the bitmap +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. +.PP +.TP 8 +.B \-delay microseconds +How long to delay between steps of the rotation process, in microseconds. +Default is 500000, one-half second. +.PP +.TP 8 +.B \-delay2 microseconds +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 ENVIRONMENT +.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 1992, 1993, 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 , 17-aug-92. + +Based on SmallTalk code which appeared in the August 1981 issue of Byte +magazine. diff --git a/hacks/bob.xbm b/hacks/bob.xbm new file mode 100644 index 00000000..f44adda4 --- /dev/null +++ b/hacks/bob.xbm @@ -0,0 +1,43 @@ +#define bob_width 61 +#define bob_height 75 +static unsigned char bob_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x07,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0x1f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xfb, + 0x00,0x00,0x00,0xc0,0xff,0xcf,0x9f,0xd1,0x03,0x00,0x00,0xf0,0x7f,0x8c,0x33, + 0x91,0x07,0x00,0x00,0xf8,0xa7,0x18,0x27,0xb1,0x06,0x00,0x00,0xfc,0x47,0x31, + 0x4e,0xa6,0x0e,0x00,0x00,0xfe,0x4f,0x21,0x4c,0xae,0x3d,0x00,0x00,0xff,0xdf, + 0x23,0x8d,0xbe,0x7d,0x00,0x80,0xff,0xff,0x67,0xbd,0xfe,0xff,0x01,0x80,0xff, + 0xff,0x7f,0xbf,0xff,0xff,0x03,0xc0,0xff,0xff,0xff,0xbf,0xff,0xf8,0x07,0xc0, + 0xff,0xff,0xff,0xbf,0x3f,0xf8,0x07,0xc0,0xff,0xff,0xff,0xff,0x07,0xf8,0x0f, + 0xc0,0xff,0xff,0xff,0x3f,0x00,0xf8,0x0f,0xe0,0x7f,0x00,0xf8,0x07,0x00,0xf0, + 0x0f,0xe0,0x3f,0x00,0x00,0x00,0x00,0xf0,0x07,0xe0,0x3f,0x00,0x00,0x00,0x00, + 0xf0,0x07,0xe0,0x3f,0x00,0x00,0x00,0x00,0xf4,0x07,0xe0,0x3f,0x00,0x00,0x00, + 0x00,0xe4,0x07,0xe0,0x3f,0x00,0x00,0x00,0x00,0xe4,0x07,0xe0,0x3f,0x00,0x00, + 0x00,0x00,0xe6,0x07,0xe0,0x3f,0x00,0x00,0x00,0x00,0xe7,0x07,0xe0,0x3f,0x00, + 0x00,0x00,0x00,0xe6,0x07,0xe0,0x3f,0x00,0x00,0x00,0x00,0xe6,0x07,0xe0,0x3f, + 0x00,0x00,0x00,0x00,0xe6,0x07,0xc0,0x3f,0x00,0x00,0x00,0x78,0xf6,0x07,0xa0, + 0xbf,0xff,0x00,0x00,0xff,0xf7,0x07,0x70,0x9f,0xff,0x01,0x80,0xff,0xef,0x07, + 0xf0,0x1c,0x80,0x03,0xe0,0x01,0xef,0x07,0xf0,0x1f,0xbe,0x07,0xf0,0x3f,0xee, + 0x07,0xe0,0x9d,0x83,0x1f,0xf8,0xe1,0xdc,0x07,0xe0,0xc1,0x7f,0x1f,0xfc,0xff, + 0xc8,0x07,0xe0,0xc1,0x69,0x1e,0x7e,0xca,0xc0,0x03,0xe0,0x81,0xb8,0x1f,0xc0, + 0x0e,0xc0,0x03,0xe0,0x01,0xc0,0x1b,0xc0,0xcf,0xc1,0x03,0xc0,0x03,0xf7,0x11, + 0x00,0x7f,0xc0,0x03,0xc0,0x03,0x7c,0x18,0x00,0x1c,0xc0,0x02,0xc0,0x02,0x30, + 0x08,0x00,0x00,0x40,0x03,0x40,0x03,0x00,0x08,0x00,0x00,0x40,0x02,0x40,0x13, + 0x00,0x0c,0x00,0x00,0x60,0x02,0x40,0x12,0x00,0x0e,0x00,0x00,0xc0,0x03,0x80, + 0x33,0x80,0x0e,0x00,0x00,0xa8,0x01,0x00,0x33,0x40,0x0f,0xa0,0x03,0x2c,0x00, + 0x00,0x74,0x30,0x0f,0x38,0x07,0x2e,0x00,0x00,0x74,0x98,0x1f,0x1e,0x1e,0x2f, + 0x00,0x00,0xfc,0x8f,0xff,0x0f,0xfc,0x2f,0x00,0x00,0xf8,0xe3,0xff,0x03,0xf8, + 0x2f,0x00,0x00,0xf8,0xfd,0xff,0x81,0xff,0x3f,0x00,0x00,0xb8,0xf9,0x1f,0xf8, + 0x0f,0x1e,0x00,0x00,0x30,0xf1,0xf0,0x0f,0x03,0x0e,0x00,0x00,0x30,0xf1,0x01, + 0x80,0x01,0x0f,0x00,0x00,0x20,0xf1,0xf7,0xff,0x00,0x07,0x00,0x00,0x60,0xe3, + 0x01,0x60,0x80,0x07,0x00,0x00,0x60,0xc3,0xef,0x3f,0x80,0x03,0x00,0x00,0x40, + 0xc2,0xff,0x0f,0xc0,0x03,0x00,0x00,0xc0,0xe6,0x1f,0x00,0xc0,0x01,0x00,0x00, + 0x80,0xf4,0xfe,0x3f,0xe0,0x00,0x00,0x00,0x80,0x79,0xfe,0x1f,0xe0,0x00,0x00, + 0xc0,0x01,0x3d,0x3e,0x00,0x70,0x00,0x00,0x30,0x06,0x3e,0x0f,0x00,0x38,0x00, + 0x00,0xc8,0x8c,0x1f,0x07,0x00,0x38,0x00,0x00,0xf4,0xcc,0x8f,0x07,0x00,0x1c, + 0x00,0x00,0x72,0xee,0xf7,0x07,0x00,0x0e,0x00,0x00,0x02,0xff,0xe3,0x07,0x00, + 0x07,0x00,0x00,0x32,0xfe,0xc1,0xff,0x8f,0x03,0x00,0x00,0x3e,0xfe,0x80,0xff, + 0xff,0x01,0x00,0x00,0x7e,0x7c,0x00,0x00,0x7e,0x00,0x00,0x00,0x7c,0x3c,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x1c, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/hacks/bouboule.c b/hacks/bouboule.c new file mode 100644 index 00000000..4f6e8ecb --- /dev/null +++ b/hacks/bouboule.c @@ -0,0 +1,841 @@ +/* -*- Mode: C; tab-width: 4 -*- + Ported from xlockmore 4.03a12 to be a standalone program and thus usable + with xscreensaver by Jamie Zawinski on 15-May-97. + + Original copyright notice from xlock.c: + + * Copyright (c) 1988-91 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. + */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bouboule.c 4.00 97/01/01 xlockmore"; + +#endif + +/*- + * bouboule.c (bouboule mode for xlockmore) + * + * Sort of starfield for xlockmore. I found that making a starfield for + * a 3D engine and thought it could be a nice lock mode. For a real starfield, + * I only scale the sort of sphere you see to the whole sky and clip the stars + * to the camera screen. + * + * Code Copyright 1996 by Jeremie PETIT (petit@eurecom.fr, jpetit@essi.fr) + * + * Use: batchcount is the number of stars. + * cycles is the maximum size for a star + * + * 15-May-97: jwz@netscape.com: turned into a standalone program. + * 04-Sep-96: Added 3d support (Henrik Theiling, theiling@coli-uni-sb.de) + * 20-Feb-96: Added tests so that already malloced objects are not + * malloced twice, thanks to the report from + * 01-Feb-96: Patched by Jouk Jansen for VMS + * Patched by for TrueColor displays + * 30-Jan-96: Wrote all that I wanted to. + * + * DONE: Build up a XArc list and Draw everything once with XFillArcs + * That idea came from looking at swarm code. + * DONE: Add an old arcs list for erasing. + * DONE: Make center of starfield SinVariable. + * DONE: Add some random in the sinvary() function. + * DONE: check time for erasing the stars with the two methods and use the + * better one. Note that sometimes the time difference between + * beginning of erasing and its end is negative! I check this, and + * do not use this result when it occurs. If all values are negative, + * the erasing will continue being done in the currently tested mode. + * DONE: Allow stars size customization. + * DONE: Make sizey be no less than half sizex or no bigger than twice sizex. + * + * IDEA: A simple check can be performed to know which stars are "behind" + * and which are "in front". So is possible to very simply change + * the drawing mode for these two sorts of stars. BUT: this would lead + * to a rewrite of the XArc list code because drawing should be done + * in two steps: "behind" stars then "in front" stars. Also, what could + * be the difference between the rendering of these two types of stars? + * IDEA: Calculate the distance of each star to the "viewer" and render the + * star accordingly to this distance. Same remarks as for previous + * ideas can be pointed out. This would even lead to reget the old stars + * drawing code, that has been replaced by the XFillArcs. On another + * hand, this would allow particular stars (own color, shape...), as + * far as they would be individually drawn. One should be careful to + * draw them according to their distance, that is not drawing a far + * star after a close one. + */ + +#ifdef STANDALONE +# define PROGCLASS "Bouboule" +# define HACK_INIT init_bouboule +# define HACK_DRAW draw_bouboule +# define bouboule_opts xlockmore_opts +# define DEFAULTS "*count: 100 \n" \ + "*size: 15 \n" \ + "*delay: 5000 \n" \ + "*ncolors: 64 \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" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt bouboule_opts = { + 0, NULL, 0, NULL, NULL }; + +#define USEOLDXARCS 1 /* If 1, we use old xarcs list for erasing. + * else we just roughly erase the window. + * This mainly depends on the number of stars, + * because when they are many, it is faster to + * erase the whole window than to erase each star + */ + +#if HAVE_GETTIMEOFDAY +#define ADAPT_ERASE 1 /* If 1, then we try ADAPT_CHECKS black XFillArcs, + * and after, ADAPT_CHECKS XFillRectangle. + * We check which method seems better, knowing that + * XFillArcs is generally visually better. So we + * consider that XFillArcs is still better if its time + * is about XFillRectangle * ADAPT_ARC_PREFERED + * We need gettimeofday + * for this... Does it exist on other systems ? Do we + * have to use another function for others ? + * This value overrides USEOLDXARCS. + */ + +#ifdef USE_XVMSUTILS +# if 0 +# include "../xvmsutils/unix_time.h" +# else +# include +# endif +#endif + +#include + +#define ADAPT_CHECKS 50 +#define ADAPT_ARC_PREFERED 150 /* Maybe the value that is the most important + * for adapting to a system */ +#endif + +#define dtor(x) (((x) * M_PI) / 180.0) /* Degrees to radians */ + +#define MINSTARS 1 +#define MINSIZE 1 +/* jwz: I think slower color changes look better */ +#define COLOR_CHANGES 50 /* How often we change colors (1 = always) + * This value should be tuned accordingly to + * the number of stars */ +#define MAX_SIZEX_SIZEY 2. /* This controls whether the sphere can be very + * very large and have a small height (or the + * opposite) or no. */ + +#define THETACANRAND 80 /* percentage of changes for the speed of + * change of the 3 theta values */ +#define SIZECANRAND 80 /* percentage of changes for the speed of + * change of the sizex and sizey values */ +#define POSCANRAND 80 /* percentage of changes for the speed of + * change of the x and y values */ +/* Note that these XXXCANRAND values can be 0, that is no rand acceleration * + variation. */ + +#define VARRANDALPHA (NRAND((int) (M_PI * 1000.0))/1000.0) +#define VARRANDSTEP (M_PI/(NRAND(100)+100.0)) +#define VARRANDMIN (-70.0) +#define VARRANDMAX 70.0 + +#define MINZVAL 100 /* stars can come this close */ +#define SCREENZ 2000 /* this is where the screen is */ +#define MAXZVAL 10000 /* stars can go this far away */ + +#define GETZDIFF(z) ((MI_DELTA3D(mi))*20.0*(1.0-(SCREENZ)/(z+1000))) +#define MAXDIFF MAX(-GETZDIFF(MINZVAL),GETZDIFF(MAXZVAL)) + +/* These values are the variation parameters of the acceleration variation * + of the SinVariables that are randomized. */ + +/******************************/ +typedef struct SinVariableStruct +/******************************/ +{ + double alpha; /* + * Alpha is the current state of the sinvariable + * alpha should be initialized to a value between + * 0.0 and 2 * M_PI + */ + double step; /* + * Speed of evolution of alpha. It should be a reasonable + * fraction of 2 * M_PI. This value directly influence + * the variable speed of variation. + */ + double minimum; /* Minimum value for the variable */ + double maximum; /* Maximum value for the variable */ + double value; /* Current value */ + int mayrand; /* Flag for knowing whether some randomization can be + * applied to the variable */ + struct SinVariableStruct *varrand; /* Evolving Variable: the variation of + * alpha */ +} SinVariable; + +/***********************/ +typedef struct StarStruct +/***********************/ +{ + double x, y, z; /* Position of the star */ + short size; /* Try to guess */ +} Star; + +/****************************/ +typedef struct StarFieldStruct +/****************************/ +{ + short width, height; /* width and height of the starfield window */ + short max_star_size; /* Maximum radius for stars. stars radius will + * vary from 1 to MAX_STAR_SIZE */ + SinVariable x; /* Evolving variables: */ + SinVariable y; /* Center of the field on the screen */ + SinVariable z; + SinVariable sizex; /* Evolving variable: half width of the field */ + SinVariable sizey; /* Evolving variable: half height of the field */ + SinVariable thetax; /* Evolving Variables: */ + SinVariable thetay; /* rotation angles of the starfield */ + SinVariable thetaz; /* around x, y and z local axis */ + Star *star; /* List of stars */ + XArc *xarc; /* Current List of arcs */ + XArc *xarcleft; /* additional list for the left arcs */ +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + XArc *oldxarc; /* Old list of arcs */ + XArc *oldxarcleft; +#endif + unsigned long color; /* Current color of the starfield */ + int colorp; /* Pointer to color of the starfield */ + int NbStars; /* Number of stars */ + short colorchange; /* Counter for the color change */ +#if (ADAPT_ERASE == 1) + short hasbeenchecked; + long rect_time; + long xarc_time; +#endif +} StarField; + +static StarField *starfield = NULL; + +/*********/ +static void +sinvary(SinVariable * v) +/*********/ + +{ + v->value = v->minimum + + (v->maximum - v->minimum) * (sin(v->alpha) + 1.0) / 2.0; + + if (v->mayrand == 0) + v->alpha += v->step; + else { + int vaval = NRAND(100); + + if (vaval <= v->mayrand) + sinvary(v->varrand); + v->alpha += (100.0 + (v->varrand->value)) * v->step / 100.0; + } + + if (v->alpha > 2 * M_PI) + v->alpha -= 2 * M_PI; +} + +/*************************************************/ +static void +sininit(SinVariable * v, + double alpha, double step, double minimum, double maximum, + short int mayrand) +{ + v->alpha = alpha; + v->step = step; + v->minimum = minimum; + v->maximum = maximum; + v->mayrand = mayrand; + if (mayrand != 0) { + if (v->varrand == NULL) + v->varrand = (SinVariable *) calloc(1, sizeof (SinVariable)); + sininit(v->varrand, + VARRANDALPHA, + VARRANDSTEP, + VARRANDMIN, + VARRANDMAX, + 0); + sinvary(v->varrand); + } + /* We calculate the values at least once for initialization */ + sinvary(v); +} + +static void +sinfree(SinVariable * point) +{ + SinVariable *temp, *next; + + next = point->varrand; + while (next) { + temp = next; + next = temp->varrand; + (void) free((void *) temp); + } +} + +/***************/ +void +init_bouboule(ModeInfo * mi) +/***************/ + +/*- + * The stars init part was first inspirated from the net3d game starfield + * code. But net3d starfield is not really 3d starfield, and I needed real 3d, + * so only remains the net3d starfield initialization main idea, that is + * the stars distribution on a sphere (theta and omega computing) + */ +{ + StarField *sp; + int size = MI_SIZE(mi); + int i; + double theta, omega; + + if (starfield == NULL) { + if ((starfield = (StarField *) calloc(MI_NUM_SCREENS(mi), + sizeof (StarField))) == NULL) + return; + } + sp = &starfield[MI_SCREEN(mi)]; + + sp->width = MI_WIN_WIDTH(mi); + sp->height = MI_WIN_HEIGHT(mi); + + /* use the right `black' pixel values: */ + 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, sp->width, sp->height); + } else + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + + if (size < -MINSIZE) + sp->max_star_size = NRAND(-size - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + sp->max_star_size = MINSIZE; + else + sp->max_star_size = size; + + sp->NbStars = MI_BATCHCOUNT(mi); + if (sp->NbStars < -MINSTARS) { + if (sp->star) { + (void) free((void *) sp->star); + sp->star = NULL; + } + if (sp->xarc) { + (void) free((void *) sp->xarc); + sp->xarc = NULL; + } + if (sp->xarcleft) { + (void) free((void *) sp->xarcleft); + sp->xarcleft = NULL; + } +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + if (sp->oldxarc) { + (void) free((void *) sp->oldxarc); + sp->oldxarc = NULL; + } + if (sp->oldxarcleft) { + (void) free((void *) sp->oldxarcleft); + sp->oldxarcleft = NULL; + } +#endif + sp->NbStars = NRAND(-sp->NbStars - MINSTARS + 1) + MINSTARS; + } else if (sp->NbStars < MINSTARS) + sp->NbStars = MINSTARS; + + /* We get memory for lists of objects */ + if (sp->star == NULL) + sp->star = (Star *) malloc(sp->NbStars * sizeof (Star)); + if (sp->xarc == NULL) + sp->xarc = (XArc *) malloc(sp->NbStars * sizeof (XArc)); + if (MI_WIN_IS_USE3D(mi) && sp->xarcleft == NULL) + sp->xarcleft = (XArc *) malloc(sp->NbStars * sizeof (XArc)); +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + if (sp->oldxarc == NULL) + sp->oldxarc = (XArc *) malloc(sp->NbStars * sizeof (XArc)); + if (MI_WIN_IS_USE3D(mi) && sp->oldxarcleft == NULL) + sp->oldxarcleft = (XArc *) malloc(sp->NbStars * sizeof (XArc)); +#endif + + { + /* We initialize evolving variables */ + sininit(&sp->x, + NRAND(3142) / 1000.0, M_PI / (NRAND(100) + 100.0), + ((double) sp->width) / 4.0, + 3.0 * ((double) sp->width) / 4.0, + POSCANRAND); + sininit(&sp->y, + NRAND(3142) / 1000.0, M_PI / (NRAND(100) + 100.0), + ((double) sp->height) / 4.0, + 3.0 * ((double) sp->height) / 4.0, + POSCANRAND); + + /* for z, we have to ensure that the bouboule does not get behind */ + /* the eyes of the viewer. His/Her eyes are at 0. Because the */ + /* bouboule uses the x-radius for the z-radius, too, we have to */ + /* use the x-values. */ + sininit(&sp->z, + NRAND(3142) / 1000.0, M_PI / (NRAND(100) + 100.0), + ((double) sp->width / 2.0 + MINZVAL), + ((double) sp->width / 2.0 + MAXZVAL), + POSCANRAND); + + + sininit(&sp->sizex, + NRAND(3142) / 1000.0, M_PI / (NRAND(100) + 100.0), + MIN(((double) sp->width) - sp->x.value, + sp->x.value) / 5.0, + MIN(((double) sp->width) - sp->x.value, + sp->x.value), + SIZECANRAND); + + sininit(&sp->sizey, + NRAND(3142) / 1000.0, M_PI / (NRAND(100) + 100.0), + MAX(sp->sizex.value / MAX_SIZEX_SIZEY, + sp->sizey.maximum / 5.0), + MIN(sp->sizex.value * MAX_SIZEX_SIZEY, + MIN(((double) sp->height) - + sp->y.value, + sp->y.value)), + SIZECANRAND); + + sininit(&sp->thetax, + NRAND(3142) / 1000.0, M_PI / (NRAND(200) + 200.0), + -M_PI, M_PI, + THETACANRAND); + sininit(&sp->thetay, + NRAND(3142) / 1000.0, M_PI / (NRAND(200) + 200.0), + -M_PI, M_PI, + THETACANRAND); + sininit(&sp->thetaz, + NRAND(3142) / 1000.0, M_PI / (NRAND(400) + 400.0), + -M_PI, M_PI, + THETACANRAND); + } + for (i = 0; i < sp->NbStars; i++) { + Star *star; + XArc *arc = NULL, *arcleft = NULL; +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + XArc *oarc = NULL, *oarcleft = NULL; +#endif + + star = &(sp->star[i]); + arc = &(sp->xarc[i]); + if (MI_WIN_IS_USE3D(mi)) + arcleft = &(sp->xarcleft[i]); +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + oarc = &(sp->oldxarc[i]); + if (MI_WIN_IS_USE3D(mi)) + oarcleft = &(sp->oldxarcleft[i]); +#endif + /* Elevation and bearing of the star */ + theta = dtor((NRAND(1800)) / 10.0 - 90.0); + omega = dtor((NRAND(3600)) / 10.0 - 180.0); + + /* Stars coordinates in a 3D space */ + star->x = cos(theta) * sin(omega); + star->y = sin(omega) * sin(theta); + star->z = cos(omega); + + /* We set the stars size */ + star->size = NRAND(2 * sp->max_star_size); + if (star->size < sp->max_star_size) + star->size = 0; + else + star->size -= sp->max_star_size; + + /* We set default values for the XArc lists elements */ + arc->x = arc->y = 0; + if (MI_WIN_IS_USE3D(mi)) { + arcleft->x = arcleft->y = 0; + } +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + oarc->x = oarc->y = 0; + if (MI_WIN_IS_USE3D(mi)) { + oarcleft->x = oarcleft->y = 0; + } +#endif + arc->width = 2 + star->size; + arc->height = 2 + star->size; + if (MI_WIN_IS_USE3D(mi)) { + arcleft->width = 2 + star->size; + arcleft->height = 2 + star->size; + } +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + oarc->width = 2 + star->size; + oarc->height = 2 + star->size; + if (MI_WIN_IS_USE3D(mi)) { + oarcleft->width = 2 + star->size; + oarcleft->height = 2 + star->size; + } +#endif + + arc->angle1 = 0; + arc->angle2 = 360 * 64; + if (MI_WIN_IS_USE3D(mi)) { + arcleft->angle1 = 0; + arcleft->angle2 = 360 * 64; + } +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + oarc->angle1 = 0; + oarc->angle2 = 360 * 64; /* ie. we draw whole disks: + * from 0 to 360 degrees */ + if (MI_WIN_IS_USE3D(mi)) { + oarcleft->angle1 = 0; + oarcleft->angle2 = 360 * 64; + } +#endif + } + + if (MI_NPIXELS(mi) > 2) + sp->colorp = NRAND(MI_NPIXELS(mi)); + /* We set up the starfield color */ + if (!MI_WIN_IS_USE3D(mi) && MI_NPIXELS(mi) > 2) + sp->color = MI_PIXEL(mi, sp->colorp); + else + sp->color = MI_WIN_WHITE_PIXEL(mi); + +#if (ADAPT_ERASE == 1) + /* We initialize the adaptation code for screen erasing */ + sp->hasbeenchecked = ADAPT_CHECKS * 2; + sp->rect_time = 0; + sp->xarc_time = 0; +#endif +} + +/****************/ +void +draw_bouboule(ModeInfo * mi) +/****************/ + +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + StarField *sp = &starfield[MI_SCREEN(mi)]; + int i, diff = 0; + double CX, CY, CZ, SX, SY, SZ; + Star *star; + XArc *arc = NULL, *arcleft = NULL; + +#if (ADAPT_ERASE == 1) + struct timeval tv1; + struct timeval tv2; + +#endif + +#if ((USEOLDXARCS == 0) || (ADAPT_ERASE == 1)) + short x_1, y_1, x_2, y_2; + + /* bounding rectangle around the old starfield, + * for erasing with the smallest rectangle + * instead of filling the whole screen */ + int maxdiff = 0; /* maximal distance between left and right */ + + /* star in 3d mode, otherwise 0 */ +#endif + +#if ((USEOLDXARCS == 0) || (ADAPT_ERASE == 1)) + if (MI_WIN_IS_USE3D(mi)) { + maxdiff = (int) MAXDIFF; + } + x_1 = (int) sp->x.value - (int) sp->sizex.value - + sp->max_star_size - maxdiff; + y_1 = (int) sp->y.value - (int) sp->sizey.value - + sp->max_star_size; + x_2 = 2 * ((int) sp->sizex.value + sp->max_star_size + maxdiff); + y_2 = 2 * ((int) sp->sizey.value + sp->max_star_size); +#endif + /* We make variables vary. */ + sinvary(&sp->thetax); + sinvary(&sp->thetay); + sinvary(&sp->thetaz); + + sinvary(&sp->x); + sinvary(&sp->y); + if (MI_WIN_IS_USE3D(mi)) + sinvary(&sp->z); + + /* A little trick to prevent the bouboule from being + * bigger than the screen */ + sp->sizex.maximum = + MIN(((double) sp->width) - sp->x.value, + sp->x.value); + sp->sizex.minimum = sp->sizex.maximum / 3.0; + + /* Another trick to make the ball not too flat */ + sp->sizey.minimum = + MAX(sp->sizex.value / MAX_SIZEX_SIZEY, + sp->sizey.maximum / 3.0); + sp->sizey.maximum = + MIN(sp->sizex.value * MAX_SIZEX_SIZEY, + MIN(((double) sp->height) - sp->y.value, + sp->y.value)); + + sinvary(&sp->sizex); + sinvary(&sp->sizey); + + /* + * We calculate the rotation matrix values. We just make the + * rotation on the fly, without using a matrix. + * Star positions are recorded as unit vectors pointing in various + * directions. We just make them all rotate. + */ + CX = cos(sp->thetax.value); + SX = sin(sp->thetax.value); + CY = cos(sp->thetay.value); + SY = sin(sp->thetay.value); + CZ = cos(sp->thetaz.value); + SZ = sin(sp->thetaz.value); + + for (i = 0; i < sp->NbStars; i++) { + star = &(sp->star[i]); + arc = &(sp->xarc[i]); + if (MI_WIN_IS_USE3D(mi)) { + arcleft = &(sp->xarcleft[i]); + /* to help the eyes, the starfield is always as wide as */ + /* deep, so .sizex.value can be used. */ + diff = (int) GETZDIFF(sp->sizex.value * + ((SY * CX) * star->x + (SX) * star->y + + (CX * CY) * star->z) + sp->z.value); + } + arc->x = (short) ((sp->sizex.value * + ((CY * CZ - SX * SY * SZ) * star->x + + (-CX * SZ) * star->y + + (SY * CZ + SZ * SX * CY) * star->z) + + sp->x.value)); + arc->y = (short) ((sp->sizey.value * + ((CY * SZ + SX * SY * CZ) * star->x + + (CX * CZ) * star->y + + (SY * SZ - SX * CY * CZ) * star->z) + + sp->y.value)); + + if (MI_WIN_IS_USE3D(mi)) { + arcleft->x = (short) ((sp->sizex.value * + ((CY * CZ - SX * SY * SZ) * star->x + + (-CX * SZ) * star->y + + (SY * CZ + SZ * SX * CY) * star->z) + + sp->x.value)); + arcleft->y = (short) ((sp->sizey.value * + ((CY * SZ + SX * SY * CZ) * star->x + + (CX * CZ) * star->y + + (SY * SZ - SX * CY * CZ) * star->z) + + sp->y.value)); + arc->x += diff; + arcleft->x -= diff; + } + if (star->size != 0) { + arc->x -= star->size; + arc->y -= star->size; + if (MI_WIN_IS_USE3D(mi)) { + arcleft->x -= star->size; + arcleft->y -= star->size; + } + } + } + + /* First, we erase the previous starfield */ + if (MI_WIN_IS_INSTALL(mi) && MI_WIN_IS_USE3D(mi)) + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + +#if (ADAPT_ERASE == 1) + if (sp->hasbeenchecked == 0) { + /* We just calculate which method is the faster and eventually free + * the oldxarc list */ + if (sp->xarc_time > + ADAPT_ARC_PREFERED * sp->rect_time) { + sp->hasbeenchecked = -2; /* XFillRectangle mode */ + (void) free((void *) sp->oldxarc); + sp->oldxarc = NULL; + if (MI_WIN_IS_USE3D(mi)) { + (void) free((void *) sp->oldxarcleft); + sp->oldxarcleft = NULL; + } + } else { + sp->hasbeenchecked = -1; /* XFillArcs mode */ + } + } + if (sp->hasbeenchecked == -2) { + /* Erasing is done with XFillRectangle */ + XFillRectangle(display, window, gc, + x_1, y_1, x_2, y_2); + } else if (sp->hasbeenchecked == -1) { + /* Erasing is done with XFillArcs */ + XFillArcs(display, window, gc, + sp->oldxarc, sp->NbStars); + if (MI_WIN_IS_USE3D(mi)) + XFillArcs(display, window, gc, + sp->oldxarcleft, sp->NbStars); + } else { + long usec; + + if (sp->hasbeenchecked > ADAPT_CHECKS) { +#ifdef GETTIMEOFDAY_TWO_ARGS + (void) gettimeofday(&tv1, NULL); +#else + (void) gettimeofday(&tv1); +#endif + XFillRectangle(display, window, gc, + x_1, y_1, x_2, y_2); +#ifdef GETTIMEOFDAY_TWO_ARGS + (void) gettimeofday(&tv2, NULL); +#else + (void) gettimeofday(&tv2); +#endif + usec = (tv2.tv_sec - tv1.tv_sec) * 1000000; + if (usec + tv2.tv_usec - tv1.tv_usec > 0) { + sp->rect_time += usec + tv2.tv_usec - tv1.tv_usec; + sp->hasbeenchecked--; + } + } else { +#ifdef GETTIMEOFDAY_TWO_ARGS + (void) gettimeofday(&tv1, NULL); +#else + (void) gettimeofday(&tv1); +#endif + XFillArcs(display, window, gc, + sp->oldxarc, sp->NbStars); + if (MI_WIN_IS_USE3D(mi)) + XFillArcs(display, window, gc, + sp->oldxarcleft, sp->NbStars); +#ifdef GETTIMEOFDAY_TWO_ARGS + (void) gettimeofday(&tv2, NULL); +#else + (void) gettimeofday(&tv2); +#endif + usec = (tv2.tv_sec - tv1.tv_sec) * 1000000; + if (usec + tv2.tv_usec - tv1.tv_usec > 0) { + sp->xarc_time += usec + tv2.tv_usec - tv1.tv_usec; + sp->hasbeenchecked--; + } + } + } +#else +#if (USEOLDXARCS == 1) + XFillArcs(display, window, gc, + sp->oldxarc, sp->NbStars); + if (MI_WIN_IS_USE3D(mi)) + XFillArcs(display, window, gc, + sp->oldxarcleft, sp->NbStars); +#else + XFillRectangle(display, window, gc, + x_1, y_1, x_2, y_2); +#endif +#endif + + /* Then we draw the new one */ + if (MI_WIN_IS_USE3D(mi)) { + if (MI_WIN_IS_INSTALL(mi)) + XSetFunction(display, gc, GXor); + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XFillArcs(display, window, gc, sp->xarc, sp->NbStars); + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + XFillArcs(display, window, gc, sp->xarcleft, sp->NbStars); + if (MI_WIN_IS_INSTALL(mi)) + XSetFunction(display, gc, GXcopy); + } else { + XSetForeground(display, gc, sp->color); + XFillArcs(display, window, gc, sp->xarc, sp->NbStars); + } + +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) +#if (ADAPT_ERASE == 1) + if (sp->hasbeenchecked >= -1) { + arc = sp->xarc; + sp->xarc = sp->oldxarc; + sp->oldxarc = arc; + if (MI_WIN_IS_USE3D(mi)) { + arcleft = sp->xarcleft; + sp->xarcleft = sp->oldxarcleft; + sp->oldxarcleft = arcleft; + } + } +#else + arc = sp->xarc; + sp->xarc = sp->oldxarc; + sp->oldxarc = arc; + if (MI_WIN_IS_USE3D(mi)) { + arcleft = sp->xarcleft; + sp->xarcleft = sp->oldxarcleft; + sp->oldxarcleft = arcleft; + } +#endif +#endif + + /* We set up the color for the next drawing */ + if (!MI_WIN_IS_USE3D(mi) && MI_NPIXELS(mi) > 2 && + (++sp->colorchange >= COLOR_CHANGES)) { + sp->colorchange = 0; + if (++sp->colorp >= MI_NPIXELS(mi)) + sp->colorp = 0; + sp->color = MI_PIXEL(mi, sp->colorp); + } +} + +void +release_bouboule(ModeInfo * mi) +{ + if (starfield != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + StarField *sp = &starfield[screen]; + + if (sp->star) + (void) free((void *) sp->star); + if (sp->xarc) + (void) free((void *) sp->xarc); + if (sp->xarcleft) + (void) free((void *) sp->xarcleft); +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + if (sp->oldxarc) + (void) free((void *) sp->oldxarc); + if (sp->oldxarcleft) + (void) free((void *) sp->oldxarcleft); +#endif + sinfree(&(sp->x)); + sinfree(&(sp->y)); + sinfree(&(sp->z)); + sinfree(&(sp->sizex)); + sinfree(&(sp->sizey)); + sinfree(&(sp->thetax)); + sinfree(&(sp->thetay)); + sinfree(&(sp->thetaz)); + } + (void) free((void *) starfield); + starfield = NULL; + } +} + +void +refresh_bouboule(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/bouboule.man b/hacks/bouboule.man new file mode 100644 index 00000000..cdffed43 --- /dev/null +++ b/hacks/bouboule.man @@ -0,0 +1,76 @@ +.TH XScreenSaver 1 "15-May-97" "X Version 11" +.SH NAME +bouboule - draws spinning 3D blobs +.SH SYNOPSIS +.B bouboule +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-3d] + +.SH DESCRIPTION +The \fIbouboule\fP program draws spinning 3D blobs. +.SH OPTIONS +.I bouboule +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 64. +The colors used cycle through the hue, making N stops around +the color wheel. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.TP 8 +.B \-3d +Do red/blue 3d separations (for 3d glasses.) + +.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 1996 by Jeremie Petit. + +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 +Jeremie Petit , 1996. + +3D support by Henrik Theiling , 04-Sep-96. + +VMS support by Jouk Jansen , 01-Feb-96. + +TrueColor support by David Bagley , 01-Feb-96. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 15-May-97. diff --git a/hacks/braid.c b/hacks/braid.c new file mode 100644 index 00000000..e6d0cf30 --- /dev/null +++ b/hacks/braid.c @@ -0,0 +1,414 @@ +/* -*- Mode: C; tab-width: 4 -*- + * braid --- draws random color-cyling rotating braids around a circle. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)braid.c 4.00 97/01/01 xlockmore"; +#endif + +/* + * Copyright (c) 1995 by John Neil. + * + * 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: jwz@netscape.com: turned into a standalone program. + * 01-Sep-95: color knotted components differently, J. Neil. + * 29-Aug-95: Written. John Neil + */ + +#ifdef STANDALONE +# define PROGCLASS "Braid" +# define HACK_INIT init_braid +# define HACK_DRAW draw_braid +# define braid_opts xlockmore_opts +# define DEFAULTS "*count: 15 \n" \ + "*cycles: 100 \n" \ + "*delay: 1000 \n" \ + "*ncolors: 64 \n" +# define UNIFORM_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt braid_opts = { + 0, NULL, 0, NULL, NULL }; + + +#if defined( COLORROUND ) && defined( COLORCOMP ) +#undef COLORROUND +#undef COLORCOMP +#endif + +#if !defined( COLORROUND ) && !defined( COLORCOMP ) +#if 0 +/* to color in a circular pattern use COLORROUND */ +#define COLORROUND +#else +/* to color by component use COLORCOMP */ +#define COLORCOMP +#endif +#endif + +#define MAXLENGTH 50 /* the maximum length of a braid word */ +#define MINLENGTH 8 /* the minimum length of a braid word */ +#define MAXSTRANDS 15 /* the maximum number of strands in the braid */ +#define MINSTRANDS 3 /* the minimum number of strands in the braid */ +#define SPINRATE 12.0 /* the rate at which the colors spin */ + +#define INTRAND(min,max) (NRAND((max+1)-(min))+(min)) +#define FLOATRAND(min,max) ((min)+((double) LRAND()/((double) MAXRAND))*((max)-(min))) + +typedef struct { + int braidword[MAXLENGTH]; + int components[MAXSTRANDS]; + int startcomp[MAXLENGTH][MAXSTRANDS]; + int nstrands; + int braidlength; + float startcolor; + int center_x; + int center_y; + float min_radius; + float max_radius; + float top, bottom, left, right; + int age; + int color_direction; +} braidtype; + +static braidtype *braids = NULL; + +static int +applyword(braidtype * braid, int string, int position) +{ + int i, c; + + c = string; + for (i = position; i < braid->braidlength; i++) { + if (c == ABS(braid->braidword[i])) + c--; + else if (c == ABS(braid->braidword[i]) - 1) + c++; + } + for (i = 0; i < position; i++) { + if (c == ABS(braid->braidword[i])) + c--; + else if (c == ABS(braid->braidword[i]) - 1) + c++; + } + return c; +} + +#if 0 +static int +applywordto(braidtype * braid, int string, int position) +{ + int i, c; + + c = string; + for (i = 0; i < position; i++) { + if (c == ABS(braid->braidword[i])) { + c--; + } else if (c == ABS(braid->braidword[i]) - 1) { + c++; + } + } + return c; +} +#endif + +static int +applywordbackto(braidtype * braid, int string, int position) +{ + int i, c; + + c = string; + for (i = position - 1; i >= 0; i--) { + if (c == ABS(braid->braidword[i])) { + c--; + } else if (c == ABS(braid->braidword[i]) - 1) { + c++; + } + } + return c; +} + +void +init_braid(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + braidtype *braid; + int used[MAXSTRANDS]; + int i, count, comp, c; + float min_length; + + if (braids == NULL) { + if ((braids = (braidtype *) calloc(MI_NUM_SCREENS(mi), + sizeof (braidtype))) == NULL) + return; + } + braid = &braids[MI_SCREEN(mi)]; + + braid->center_x = MI_WIN_WIDTH(mi) / 2; + braid->center_y = MI_WIN_HEIGHT(mi) / 2; + braid->age = 0; + + /* 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) ? + braid->center_y : braid->center_x; + braid->min_radius = min_length * 0.30; + braid->max_radius = min_length * 0.90; + + if (MI_BATCHCOUNT(mi) < MINSTRANDS) + braid->nstrands = MINSTRANDS; + else + braid->nstrands = INTRAND(MINSTRANDS, + MAX(MIN(MIN(MAXSTRANDS, MI_BATCHCOUNT(mi)), + (int) ((braid->max_radius - braid->min_radius) / 5.0)), MINSTRANDS)); + braid->braidlength = INTRAND(MINLENGTH, MIN(MAXLENGTH, braid->nstrands * 6)); + + for (i = 0; i < braid->braidlength; i++) { + braid->braidword[i] = + INTRAND(1, braid->nstrands - 1) * (INTRAND(1, 2) * 2 - 3); + if (i > 0) + while (braid->braidword[i] == -braid->braidword[i - 1]) + braid->braidword[i] = INTRAND(1, braid->nstrands - 1) * (INTRAND(1, 2) * 2 - 3); + } + + while (braid->braidword[0] == -braid->braidword[braid->braidlength - 1]) + braid->braidword[braid->braidlength - 1] = + INTRAND(1, braid->nstrands - 1) * (INTRAND(1, 2) * 2 - 3); + + do { + (void) memset((char *) used, 0, sizeof (used)); + count = 0; + for (i = 0; i < braid->braidlength; i++) + used[ABS(braid->braidword[i])]++; + for (i = 0; i < braid->nstrands; i++) + count += (used[i] > 0) ? 1 : 0; + if (count < braid->nstrands - 1) { + braid->braidword[braid->braidlength] = + INTRAND(1, braid->nstrands - 1) * (INTRAND(1, 2) * 2 - 3); + while (braid->braidword[braid->braidlength] == + -braid->braidword[braid->braidlength - 1] && + braid->braidword[0] == -braid->braidword[braid->braidlength]) + braid->braidword[braid->braidlength] = + INTRAND(1, braid->nstrands - 1) * (INTRAND(1, 2) * 2 - 3); + braid->braidlength++; + } + } while (count < braid->nstrands - 1 && braid->braidlength < MAXLENGTH); + + braid->startcolor = (MI_NPIXELS(mi) > 2) ? + (float) NRAND(MI_NPIXELS(mi)) : 0.0; + /* XSetLineAttributes (display, MI_GC(mi), 2, LineSolid, CapRound, + JoinRound); */ + + (void) memset((char *) braid->components, 0, sizeof (braid->components)); + c = 1; + comp = 0; + braid->components[0] = 1; + do { + i = comp; + do { + i = applyword(braid, i, 0); + braid->components[i] = braid->components[comp]; + } while (i != comp); + count = 0; + for (i = 0; i < braid->nstrands; i++) + if (braid->components[i] == 0) + count++; + if (count > 0) { + for (comp = 0; braid->components[comp] != 0; comp++); + braid->components[comp] = ++c; + } + } while (count > 0); + + for (i = 0; i < braid->nstrands; i++) + if (!(braid->components[i] & 1)) + braid->components[i] *= -1; +} + +void +draw_braid(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + braidtype *braid = &braids[MI_SCREEN(mi)]; + float num_points, t_inc; + float theta, psi; + float t, r_diff; + int i, s; + float x_1, y_1, x_2, y_2, r1, r2; + float color, color_use = 0.0, color_inc; + + num_points = 500.0; + theta = (2.0 * M_PI) / (float) (braid->braidlength); + t_inc = (2.0 * M_PI) / num_points; + color_inc = (float) MI_NPIXELS(mi) / num_points; + color_inc *= braid->color_direction; + + braid->startcolor += SPINRATE * color_inc; + if (braid->startcolor >= MI_NPIXELS(mi)) + braid->startcolor = 0.0; + + r_diff = (braid->max_radius - braid->min_radius) / (float) (braid->nstrands); + + color = braid->startcolor; + psi = 0.0; + for (i = 0; i < braid->braidlength; i++) { + psi += theta; + for (t = 0.0; t < theta; t += t_inc) { +#ifdef COLORROUND + color += color_inc; + if (color >= (float) (MI_NPIXELS(mi))) + color = 0.0; + color_use = color; +#endif + for (s = 0; s < braid->nstrands; s++) { + if (ABS(braid->braidword[i]) == s) + continue; + if (ABS(braid->braidword[i]) - 1 == s) { + /* crosSINFg */ +#ifdef COLORCOMP + if (MI_NPIXELS(mi) > 2) { + color_use = color + SPINRATE * + braid->components[applywordbackto(braid, s, i)] + + (psi + t) / 2.0 / M_PI * (float) MI_NPIXELS(mi); + while (color_use >= (float) MI_NPIXELS(mi)) + color_use -= (float) MI_NPIXELS(mi); + while (color_use < 0.0) + color_use += (float) MI_NPIXELS(mi); + } +#endif +#ifdef COLORROUND + if (MI_NPIXELS(mi) > 2) { + color_use += SPINRATE * color_inc; + while (color_use >= (float) (MI_NPIXELS(mi))) + color_use -= (float) MI_NPIXELS(mi); + } +#endif + r1 = braid->min_radius + r_diff * (float) (s); + r2 = braid->min_radius + r_diff * (float) (s + 1); + if (braid->braidword[i] > 0 || + (FABSF(t - theta / 2.0) > theta / 7.0)) { + x_1 = ((0.5 * (1.0 + SINF(t / theta * M_PI - M_PI_2)) * r2 + + 0.5 * (1.0 + SINF((theta - t) / theta * M_PI - M_PI_2)) * r1)) * + COSF(t + psi) + braid->center_x; + y_1 = ((0.5 * (1.0 + SINF(t / theta * M_PI - M_PI_2)) * r2 + + 0.5 * (1.0 + SINF((theta - t) / theta * M_PI - M_PI_2)) * r1)) * + SINF(t + psi) + braid->center_y; + x_2 = ((0.5 * (1.0 + SINF((t + t_inc) / theta * M_PI - M_PI_2)) * r2 + + 0.5 * (1.0 + SINF((theta - t - t_inc) / theta * M_PI - M_PI_2)) * r1)) * + COSF(t + t_inc + psi) + braid->center_x; + y_2 = ((0.5 * (1.0 + SINF((t + t_inc) / theta * M_PI - M_PI_2)) * r2 + + 0.5 * (1.0 + SINF((theta - t - t_inc) / theta * M_PI - M_PI_2)) * r1)) * + SINF(t + t_inc + psi) + braid->center_y; + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, MI_GC(mi), MI_PIXEL(mi, (int) color_use)); + else + XSetForeground(display, MI_GC(mi), MI_WIN_WHITE_PIXEL(mi)); + + XDrawLine(display, window, MI_GC(mi), + (int) (x_1), (int) (y_1), (int) (x_2), (int) (y_2)); + } +#ifdef COLORCOMP + if (MI_NPIXELS(mi) > 2) { + color_use = color + SPINRATE * + braid->components[applywordbackto(braid, s + 1, i)] + + (psi + t) / 2.0 / M_PI * (float) MI_NPIXELS(mi); + while (color_use >= (float) MI_NPIXELS(mi)) + color_use -= (float) MI_NPIXELS(mi); + while (color_use < 0.0) + color_use += (float) MI_NPIXELS(mi); + } +#endif + if (braid->braidword[i] < 0 || + (FABSF(t - theta / 2.0) > theta / 7.0)) { + x_1 = ((0.5 * (1.0 + SINF(t / theta * M_PI - M_PI_2)) * r1 + + 0.5 * (1.0 + SINF((theta - t) / theta * M_PI - M_PI_2)) * r2)) * + COSF(t + psi) + braid->center_x; + y_1 = ((0.5 * (1.0 + SINF(t / theta * M_PI - M_PI_2)) * r1 + + 0.5 * (1.0 + SINF((theta - t) / theta * M_PI - M_PI_2)) * r2)) * + SINF(t + psi) + braid->center_y; + x_2 = ((0.5 * (1.0 + SINF((t + t_inc) / theta * M_PI - M_PI_2)) * r1 + + 0.5 * (1.0 + SINF((theta - t - t_inc) / theta * M_PI - M_PI_2)) * r2)) * + COSF(t + t_inc + psi) + braid->center_x; + y_2 = ((0.5 * (1.0 + SINF((t + t_inc) / theta * M_PI - M_PI_2)) * r1 + + 0.5 * (1.0 + SINF((theta - t - t_inc) / theta * M_PI - M_PI_2)) * r2)) * + SINF(t + t_inc + psi) + braid->center_y; + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, MI_GC(mi), MI_PIXEL(mi, (int) color_use)); + else + XSetForeground(display, MI_GC(mi), MI_WIN_WHITE_PIXEL(mi)); + + XDrawLine(display, window, MI_GC(mi), + (int) (x_1), (int) (y_1), (int) (x_2), (int) (y_2)); + } + } else { + /* no crosSINFg */ +#ifdef COLORCOMP + if (MI_NPIXELS(mi) > 2) { + color_use = color + SPINRATE * + braid->components[applywordbackto(braid, s, i)] + + (psi + t) / 2.0 / M_PI * (float) MI_NPIXELS(mi); + while (color_use >= (float) MI_NPIXELS(mi)) + color_use -= (float) MI_NPIXELS(mi); + while (color_use < 0.0) + color_use += (float) MI_NPIXELS(mi); + } +#endif +#ifdef COLORROUND + if (MI_NPIXELS(mi) > 2) { + color_use += SPINRATE * color_inc; + while (color_use >= (float) MI_NPIXELS(mi)) + color_use -= (float) MI_NPIXELS(mi); + } +#endif + r1 = braid->min_radius + r_diff * (float) (s); + x_1 = r1 * COSF(t + psi) + braid->center_x; + y_1 = r1 * SINF(t + psi) + braid->center_y; + x_2 = r1 * COSF(t + t_inc + psi) + braid->center_x; + y_2 = r1 * SINF(t + t_inc + psi) + braid->center_y; + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, MI_GC(mi), MI_PIXEL(mi, (int) color_use)); + else + XSetForeground(display, MI_GC(mi), MI_WIN_WHITE_PIXEL(mi)); + + XDrawLine(display, window, MI_GC(mi), + (int) (x_1), (int) (y_1), (int) (x_2), (int) (y_2)); + } + } + } + } + + if (++braid->age > MI_CYCLES(mi)) + init_braid(mi); +} + +void +release_braid(ModeInfo * mi) +{ + if (braids != NULL) { + (void) free((void *) braids); + braids = NULL; + } +} + +void +refresh_braid(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/braid.man b/hacks/braid.man new file mode 100644 index 00000000..3310616d --- /dev/null +++ b/hacks/braid.man @@ -0,0 +1,65 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +braid - draws random color-cycling braids around a circle +.SH SYNOPSIS +.B braid +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] + +.SH DESCRIPTION +The \fIbraid\fP program draws random color-cycling braids around a circle. +.SH OPTIONS +.I braid +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 64. +The colors used cycle through the hue, making N stops around +the color wheel. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.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 1995 by John Neil. + +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 +John Neil , 29-Aug-95. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/bubbles-samples/blood.bub.gz b/hacks/bubbles-samples/blood.bub.gz new file mode 100644 index 00000000..b98e8558 Binary files /dev/null and b/hacks/bubbles-samples/blood.bub.gz differ diff --git a/hacks/bubbles-samples/blue.bub.gz b/hacks/bubbles-samples/blue.bub.gz new file mode 100644 index 00000000..f656079c Binary files /dev/null and b/hacks/bubbles-samples/blue.bub.gz differ diff --git a/hacks/bubbles-samples/jade.bub.gz b/hacks/bubbles-samples/jade.bub.gz new file mode 100644 index 00000000..48424f08 Binary files /dev/null and b/hacks/bubbles-samples/jade.bub.gz differ diff --git a/hacks/bubbles-sources/blood.pov b/hacks/bubbles-sources/blood.pov new file mode 100644 index 00000000..8166f4ea --- /dev/null +++ b/hacks/bubbles-sources/blood.pov @@ -0,0 +1,24 @@ +#include "colors.inc" +#include "shapes.inc" +#include "textures.inc" + +/* The following make the field of view as wide as it is high + * Thus, you should have the -W and -H command line options + * equal to each other. */ +camera { + location <5.8, 0, 0> + up <0, 1, 0> + right <1, 0, 0> + look_at <0, 0, 0> +} + +sphere { + <0,0,0>, 2.5 + texture { Blood_Marble + scale <2, 2, 2> + rotate <0, 20, 0> } + finish { Dull } +} + +light_source {<6, 1, 0> color White} +/* light_source {<6.1, 1, 0> color White} */ diff --git a/hacks/bubbles-sources/blue.pov b/hacks/bubbles-sources/blue.pov new file mode 100644 index 00000000..86d1ff8d --- /dev/null +++ b/hacks/bubbles-sources/blue.pov @@ -0,0 +1,22 @@ +#include "colors.inc" +#include "shapes.inc" +#include "textures.inc" + +/* The following make the field of view as wide as it is high + * Thus, you should have the -W and -H command line options + * equal to each other. */ +camera { + location <5.8, 0, 0> + up <0, 1, 0> + right <1, 0, 0> + look_at <0, 0, 0> +} + +sphere { + <0,0,0>, 2.5 + texture { Blue_Agate + scale <0.7, 0.7, 0.7> } + finish { phong 1 } +} + +light_source {<6, 1, 0> color White} diff --git a/hacks/bubbles-sources/glass.pov b/hacks/bubbles-sources/glass.pov new file mode 100644 index 00000000..c1897714 --- /dev/null +++ b/hacks/bubbles-sources/glass.pov @@ -0,0 +1,27 @@ +#include "colors.inc" +#include "shapes.inc" +#include "textures.inc" + +/* The following make the field of view as wide as it is high + * Thus, you should have the -W and -H command line options + * equal to each other. */ +camera { + location <5.8, 0, 0> + up <0, 1, 0> + right <1, 0, 0> + look_at <0, 0, 0> +} + +sphere { + <0,0,0>, 2.5 + texture { Glass + scale <0.7, 0.7, 0.7> + rotate y*clock + normal {bumps 0.4 scale 0.1} + finish { Shiny } +# finish { phong 0.4 } + } +} + +light_source {<6, 7, 0> color White} +light_source {<6.1, 1, 0> color Blue} diff --git a/hacks/bubbles-sources/jade.pov b/hacks/bubbles-sources/jade.pov new file mode 100644 index 00000000..7c1cb023 --- /dev/null +++ b/hacks/bubbles-sources/jade.pov @@ -0,0 +1,24 @@ +#include "colors.inc" +#include "shapes.inc" +#include "textures.inc" + +/* The following make the field of view as wide as it is high + * Thus, you should have the -W and -H command line options + * equal to each other. */ +camera { + location <5.8, 0, 0> + up <0, 1, 0> + right <1, 0, 0> + look_at <0, 0, 0> +} + +sphere { + <0,0,0>, 2.5 + texture { Jade + scale <0.7, 0.7, 0.7> + rotate y*clock } + finish { phong 0.4 } +} + +light_source {<6, 1, 0> color White} +light_source {<6.1, 1, 0> color White} diff --git a/hacks/bubbles-tools/bubblestodefault b/hacks/bubbles-tools/bubblestodefault new file mode 100755 index 00000000..3ad718b8 --- /dev/null +++ b/hacks/bubbles-tools/bubblestodefault @@ -0,0 +1,115 @@ +#!/usr/bin/perl +# +# $Id: bubblestodefault,v 1.1 1996/09/08 01:35:51 jwz Exp $ +# +#---------------------------------------------------------------------------- +# Copyright (C) 1995-1996 James Macnicol +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +#----------------------------------------------------------------------------- +# +# Contact me (J.Macnicol@student.anu.edu.au) if you have problems. +# +# [ The moral of this story is use a version of rm which safely backs up +# files when you delete them in case you do something stupid like +# "rm * xpm" which trashed all the scripts in this directory so I had +# to write them again. Grrrrrr..... ] +# +#----------------------------------------------------------------------------- +# +# This script takes a set of XPM files (from povbubbles, for example) +# whose names are listed in file with extension .names (of same format +# as output by povbubbles) and puts them together into a file which can +# be used in place of the source file bubbles_default.c which comes with +# bubbles/xscreensaver. +# +# To use it, provide as an argument the base-name of the .names file, +# i.e. if you ran povbubbles on the file foo.pov by typing "povbubbles foo" +# then this created a file "foo.names" so you can now make a new +# bubbles_default.c by typing "bubblestodefault foo". +# + +sub die_help { + print STDERR "Usage: $0 [-help] base-name\n"; + print STDERR " -help gives this message.\n"; + print STDERR " base-name is the name of the file used to generate\n"; + print STDERR " the XPM files, e.g. if you invoked povbubbles with\n"; + print STDERR " \"povbubbles foo\"\n"; + print STDERR " then you should invoke $0 with\n"; + die(" \"$0 foo\"\n"); +} + +sub die_usage { + die "Usage: $0 [-help] base-name\n"; +} + +$infile = undef; + +# Process command line arguments +while ($op = shift) { + if ($op eq "-help") { + &die_help; + } else { + $infile = $op; + # Ignore further arguments + break; + } +} +if ($infile eq undef) { + &die_usage; +} + +$namesfile = $infile . ".names"; + +if (! -f $namesfile) { + die("File list $namesfile doesn't exist\n"); +} + +if (-f "bubbles_default.c") { + print "Backing up bubbles_default.c...\n"; + system("mv -f bubbles_default.c bubbles_default.c.bak"); +} + +open(OUT, ">bubbles_default.c") || die("Couldn't open bubbles_default.c\n"); +print OUT "#include \n"; +print OUT "#include \"bubbles.h\"\n"; +print OUT "\n"; +print OUT "#ifndef NO_DEFAULT_BUBBLE\n"; +print OUT "\n"; + +open(NAMES, $namesfile) || die ("Couldn't open $namesfile\n"); +$numbubbles = 0; +while () { + if (/\s*(\S+)\:(\S+)\s*/) { + $filename = $1; + $xpmname = $2; + $xpmlist = $xpmlist . $xpmname . ", "; + open(CAT, $filename) || die("Couldn't open file $filename listed in\ +$namesfile\n"); + while () { + print OUT; + } + close(CAT); + $numbubbles++; + } else { + print STDERR "Can't understand the line \"$_\"\n"; + print STDERR " in $namesfile. Ignoring...\n"; + } +} +print OUT "char **default_bubbles[] = {$xpmlist"; +print OUT "(char **)0};\n"; +print OUT "\n"; +print OUT "int num_default_bubbles = $numbubbles;\n"; +print OUT "\n"; +print OUT "#endif /* NO_DEFAULT_BUBBLE */\n"; + +close(NAMES); +close(OUT); diff --git a/hacks/bubbles-tools/bubblestofile b/hacks/bubbles-tools/bubblestofile new file mode 100755 index 00000000..4eaf5c9b --- /dev/null +++ b/hacks/bubbles-tools/bubblestofile @@ -0,0 +1,107 @@ +#!/usr/bin/perl +# +# $Id: bubblestofile,v 1.1 1996/09/08 01:35:52 jwz Exp $ +# +#---------------------------------------------------------------------------- +# Copyright (C) 1995-1996 James Macnicol +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +#----------------------------------------------------------------------------- +# +# Contact me (J.Macnicol@student.anu.edu.au) if you have problems. +# +# [ The moral of this story is use a version of rm which safely backs up +# files when you delete them in case you do something stupid like +# "rm * xpm" which trashed all the scripts in this directory so I had +# to write them again. Grrrrrr..... ] +# +#----------------------------------------------------------------------------- +# +# This script takes a set of XPM files (from povbubbles, for example) +# whose names are listed in file with extension .names (of same format +# as output by povbubbles) and puts them together into a file which can +# loaded with the -file option or place in a directory suitable for +# use with the -directory option to bubbles. Note that neither of these +# options are available if you have just compiled bubbles as provided. +# You must edit bubbles.h to enable these. Files generated by this script +# have by default the extension ".bub". +# +# To use it, provide as an argument the base-name of the .names file, +# i.e. if you ran povbubbles on the file foo.pov by typing "povbubbles foo" +# then this created a file "foo.names" so you can now make the loadable file +# "foo.bub" by typing "bubblestofile foo". +# + +sub die_help { + print STDERR "Usage: $0 [-help] base-name\n"; + print STDERR " -help\n"; + print STDERR " gives this message.\n"; + print STDERR " base-name is the name of the file used to generate\n"; + print STDERR " the XPM files, e.g. if you invoked povbubbles with\n"; + print STDERR " \"povbubbles foo\"\n"; + print STDERR " then you should invoke $0 with\n"; + die(" \"$0 foo\"\n"); +} + +sub die_usage { + die "Usage: $0 [-help] base-name\n"; +} + +$infile = undef; + +# Process command line arguments +while ($op = shift) { + if ($op eq "-help") { + &die_help; + } else { + $infile = $op; + # Ignore further arguments + break; + } +} +if ($infile eq undef) { + &die_usage; +} + +$namesfile = $infile . ".names"; +$outfile = $infile . ".bub"; + +if (! -f $namesfile) { + die("File list $namesfile doesn't exist\n"); +} + +if (-f $outfile) { + print "Backing up $outfile\n"; + system("mv -f $outfile $outfile.bak"); +} + +open(OUT, ">$outfile") || die("Couldn't open $outfile\n"); +open(NAMES, $namesfile) || die ("Couldn't open $namesfile\n"); +$numbubbles = 0; +while () { + if (/\s*(\S+)\:(\S+)\s*/) { + $filename = $1; + $xpmname = $2; + open(CAT, $filename) || die("Couldn't open file $filename listed in\ +$namesfile\n"); + while () { + print OUT; + } + close(CAT); + } else { + print STDERR "Can't understand the line \"$_\"\n"; + print STDERR " in $namesfile. Ignoring...\n"; + } +} +close(NAMES); +close(OUT); + + diff --git a/hacks/bubbles-tools/xpm2default b/hacks/bubbles-tools/xpm2default new file mode 100755 index 00000000..b4236089 --- /dev/null +++ b/hacks/bubbles-tools/xpm2default @@ -0,0 +1,51 @@ +#!/usr/bin/perl +#---------------------------------------------------------------------------- +# Copyright (C) 1995-1996 James Macnicol +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 1, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +#----------------------------------------------------------------------------- +# +# Prints to the stdout a file suitable for use as bubbles_default.c for the +# bubbles screensaver (i.e. the default bubble which is compiled into the +# executable). A list of XPMs is expected as input, e.g. output from the +# pov2xpm script in this directory. +# +# Remember to change the path to your perl executable at the top of the +# script if it is wrong. +# +# Examples of usage: +# +# pov2xpm sample.pov | xpm2default > bubbles_default.c +# +# A new set of bubbles is first created with pov2xpm then passed to this +# script which places the C wrapper around the data and finally dumps the +# output into bubbles_default.c. +# +# xpm2default < sample.xpm > bubbles_default.c +# +# Same as the previous example except the XPM data came from a file rather +# than a pipe. +# +$numargs = @ARGV; +print "#include \"bubbles.h\"\n"; +print "\n"; +print "#ifndef NO_DEFAULT_BUBBLE\n"; +print "\n"; +print "char *default_ball_data[] = {\n"; +while () { + chop; + s/"/\\"/g; + print "\"$_\",\n"; +} +print "(char *)0\n"; +print "};\n"; +print "\n"; +print "#endif\n"; diff --git a/hacks/bubbles.c b/hacks/bubbles.c new file mode 100644 index 00000000..5dffd2a2 --- /dev/null +++ b/hacks/bubbles.c @@ -0,0 +1,1869 @@ +/* bubbles.c - frying pan / soft drink in a glass simulation */ + +/*$Id: bubbles.c,v 1.8 1997/07/26 19:16:33 jwz Exp $*/ + +/* + * Copyright (C) 1995-1996 James Macnicol + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +/* + * I got my original inspiration for this by looking at the bottom of a + * frying pan while something was cooking and watching the little bubbles + * coming off the bottom of the pan as the oil was boiling joining together + * to form bigger bubbles and finally to *pop* and disappear. I had some + * time on my hands so I wrote this little xscreensaver module to imitate + * it. Now that it's done it reminds me more of the bubbles you get in + * a glass of fizzy soft drink..... + * + * The problem seemed to be that the position/size etc. of all the bubbles + * on the screen had to be remembered and searched through to find when + * bubbles hit each other and combined. To do this more efficiently, the + * window/screen is divided up into a square mesh of side length mesh_length + * and separate lists of bubbles contained in each cell of the mesh are + * kept. Only the cells in the immediate vicinity of the bubble in question + * are searched. This should make things more efficient although the whole + * thing seems to use up too much CPU, but then I'm using an ancient PC so + * perhaps it's not surprising . + * (Six months after I wrote the above I now have a Pentium with PCI graphics + * and things are _much_ nicer.) + * + * Author: James Macnicol + * Internet E-mail : J.Macnicol@student.anu.edu.au + */ + +#include +#include "screenhack.h" +#include "bubbles.h" + +#ifdef BUBBLES_IO +# include +# include +# include +#endif /* BUBBLES_IO */ + +#include +#include +#include +#include +#include + +#ifndef VMS +# include +#else /* VMS */ +# if __DECC_VER >= 50200000 +# include +# endif +#endif /* VMS */ + +#ifdef HAVE_UNISTD_H +# include +#endif +#include "yarandom.h" + +#ifdef HAVE_XPM +#include +#endif + +/* + * Public variables + */ + +#ifndef NO_DEFAULT_BUBBLE +extern int num_default_bubbles; +extern char **default_bubbles[]; +#endif /* NO_DEFAULT_BUBBLE */ + +char *progclass = "Bubbles"; + +char *defaults [] = { + "*background: black", + "*foreground: white", + "*simple: false", + "*broken: false", + "*delay: 2000", +#ifdef BUBBLES_IO + "*file: (default)", + "*directory: (default)", +#endif /* BUBBLES_IO */ + "*quiet: false", + "*nodelay: false", + "*3D: false", + "*geometry: 400x300", + 0 +}; + +XrmOptionDescRec options [] = { + { "-simple", ".simple", XrmoptionNoArg, "true" }, +#ifdef HAVE_XPM + { "-broken", ".broken", XrmoptionNoArg, "true" }, +#endif /* HAVE_XPM */ + { "-quiet", ".quiet", XrmoptionNoArg, "true" }, + { "-nodelay", ".nodelay", XrmoptionNoArg, "true" }, + { "-3D", ".3D", XrmoptionNoArg, "true" }, +#ifdef BUBBLES_IO + { "-file", ".file", XrmoptionSepArg, 0 }, + { "-directory", ".directory", XrmoptionSepArg, 0 }, +#endif /* BUBBLES_IO */ + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +/* + * Private variables + */ + +static Bubble **mesh; +static int mesh_length; +static int mesh_width; +static int mesh_height; +static int mesh_cells; + +static int **adjacent_list; + +static int screen_width; +static int screen_height; +static int screen_depth; +static unsigned int default_fg_pixel, default_bg_pixel; +/* + * I know it's not elegant to save this stuff in global variables + * but we need it for the signal handler. + */ +static Display *defdsp; +static Window defwin; +static Colormap defcmap; +static Visual *defvisual; + +/* For simple mode only */ +static int bubble_min_radius; +static int bubble_max_radius; +static long *bubble_areas; +static GC draw_gc, erase_gc; + +#ifdef HAVE_XPM +static int num_bubble_pixmaps; +static Bubble_Step **step_pixmaps; +#ifdef BUBBLES_IO +static char *pixmap_file; +#endif /* BUBBLES_IO */ +static int use_default_bubble; +#endif /* HAVE_XPM */ + +/* Options stuff */ +#ifdef HAVE_XPM +static Bool simple = False; +#else +static Bool simple = True; +#endif +static Bool broken = False; +static Bool quiet = False; +static Bool threed = False; +static int delay; + +/* + * To prevent forward references, some stuff is up here + */ + +static long +calc_bubble_area(int r) +/* Calculate the area of a bubble of radius r */ +{ +#ifdef DEBUG + printf("%d %g\n", r, + 10.0 * PI * (double)r * (double)r * (double)r); +#endif /* DEBUG */ + if (threed) + return (long)(10.0 * PI * (double)r * (double)r * (double)r); + else + return (long)(10.0 * PI * (double)r * (double)r); +} + +static void * +xmalloc(size_t size) +/* Safe malloc */ +{ + void *ret; + + if ((ret = malloc(size)) == NULL) { + fprintf(stderr, "%s: out of memory\n", progname); + exit(1); + } + return ret; +} + +#ifdef DEBUG +static void +die_bad_bubble(Bubble *bb) +/* This is for use with GDB */ +{ + fprintf(stderr, "Bad bubble detected at 0x%x!\n", (int)bb); + exit(1); +} +#endif + +static int +null_bubble(Bubble *bb) +/* Returns true if the pointer passed is NULL. If not then this checks to +see if the bubble is valid (i.e. the (x,y) position is valid and the magic +number is set correctly. This only a sanity check for debugging and is +turned off if DEBUG isn't set. */ +{ + if (bb == (Bubble *)NULL) + return 1; +#ifdef DEBUG + if ((bb->cell_index < 0) || (bb->cell_index > mesh_cells)) { + fprintf(stderr, "cell_index = %d\n", bb->cell_index); + die_bad_bubble(bb); + } + if (bb->magic != BUBBLE_MAGIC) { + fprintf(stderr, "Magic = %d\n", bb->magic); + die_bad_bubble(bb); + } + if (simple) { + if ((bb->x < 0) || (bb->x > screen_width) || + (bb->y < 0) || (bb->y > screen_height) || + (bb->radius < bubble_min_radius) || (bb->radius > + bubble_max_radius)) { + fprintf(stderr, + "radius = %d, x = %d, y = %d, magic = %d, cell index = %d\n", + bb->radius, bb->x, bb->y, bb->magic, bb->cell_index); + die_bad_bubble(bb); + } +#ifdef HAVE_XPM + } else { + if ((bb->x < 0) || (bb->x > screen_width) || + (bb->y < 0) || (bb->y > screen_height) || + (bb->radius < step_pixmaps[0]->radius) || + (bb->radius > step_pixmaps[num_bubble_pixmaps-1]->radius)) { + fprintf(stderr, + "radius = %d, x = %d, y = %d, magic = %d, cell index = %d\n", + bb->radius, bb->x, bb->y, bb->magic, bb->cell_index); + die_bad_bubble(bb); + } +#endif /* HAVE_XPM */ + } +#endif /* DEBUG */ + return 0; +} + +#ifdef DEBUG +static void +print_bubble_list(Bubble *bb) +/* Print list of where all the bubbles are. For debugging purposes only. */ +{ + if (! null_bubble(bb)) { + printf(" (%d, %d) %d\n", bb->x, bb->y, bb->radius); + print_bubble_list(bb->next); + } +} +#endif /* DEBUG */ + +static void +add_bubble_to_list(Bubble **list, Bubble *bb) +/* Take a pointer to a list of bubbles and stick bb at the head of the + list. */ +{ + Bubble *head = *list; + + if (null_bubble(head)) { + bb->prev = (Bubble *)NULL; + bb->next = (Bubble *)NULL; + } else { + bb->next = head; + bb->prev = (Bubble *)NULL; + head->prev = bb; + } + *list = bb; +} + + +/* + * Mesh stuff + */ + + +static void +init_mesh (void) +/* Setup the mesh of bubbles */ +{ + int i; + + mesh = (Bubble **)xmalloc(mesh_cells * sizeof(Bubble *)); + for (i = 0; i < mesh_cells; i++) + mesh[i] = (Bubble *)NULL; +} + +static int +cell_to_mesh(int x, int y) +/* convert cell coordinates to mesh index */ +{ +#ifdef DEBUG + if ((x < 0) || (y < 0)) { + fprintf(stderr, "cell_to_mesh: x = %d, y = %d\n", x, y); + exit(1); + } +#endif + return ((mesh_width * y) + x); +} + +static void +mesh_to_cell(int mi, int *cx, int *cy) +/* convert mesh index into cell coordinates */ +{ + *cx = mi % mesh_width; + *cy = mi / mesh_width; +} + +static int +pixel_to_mesh(int x, int y) +/* convert screen coordinates into mesh index */ +{ + return cell_to_mesh((x / mesh_length), (y / mesh_length)); +} + +static int +verify_mesh_index(int x, int y) +/* check to see if (x,y) is in the mesh */ +{ + if ((x < 0) || (y < 0) || (x >= mesh_width) || (y >= mesh_height)) + return (-1); + return (cell_to_mesh(x, y)); +} + +#ifdef DEBUG +static void +print_adjacents(int *adj) +/* Print a list of the cells calculated above. For debugging only. */ +{ + int i; + + printf("("); + for (i = 0; i < 8; i++) + printf("%d ", adj[i]); + printf(")\n"); +} +#endif /* DEBUG */ + +static void +add_to_mesh(Bubble *bb) +/* Add the given bubble to the mesh by sticking it on the front of the +list. bb is already allocated so no need to malloc() anything, just +adjust pointers. */ +{ +#ifdef DEBUG + if (null_bubble(bb)) { + fprintf(stderr, "Bad bubble passed to add_to_mesh()!\n"); + exit(1); + } +#endif /* DEBUG */ + + add_bubble_to_list(&mesh[bb->cell_index], bb); +} + +#ifdef DEBUG +static void +print_mesh (void) +/* Print the contents of the mesh */ +{ + int i; + + for (i = 0; i < mesh_cells; i++) { + if (! null_bubble(mesh[i])) { + printf("Mesh cell %d\n", i); + print_bubble_list(mesh[i]); + } + } +} + +static void +valid_mesh (void) +/* Check to see if the mesh is Okay. For debugging only. */ +{ + int i; + Bubble *b; + + for (i = 0; i < mesh_cells; i++) { + b = mesh[i]; + while (! null_bubble(b)) + b = b->next; + } +} + +static int +total_bubbles (void) +/* Count how many bubbles there are in total. For debugging only. */ +{ + int rv = 0; + int i; + Bubble *b; + + for (i = 0; i < mesh_cells; i++) { + b = mesh[i]; + while (! null_bubble(b)) { + rv++; + b = b->next; + } + } + + return rv; +} +#endif /* DEBUG */ + +static void +calculate_adjacent_list (void) +/* Calculate the list of cells adjacent to a particular cell for use + later. */ +{ + int i; + int ix, iy; + + adjacent_list = (int **)xmalloc(mesh_cells * sizeof(int *)); + for (i = 0; i < mesh_cells; i++) { + adjacent_list[i] = (int *)xmalloc(9 * sizeof(int)); + mesh_to_cell(i, &ix, &iy); + adjacent_list[i][0] = verify_mesh_index(--ix, --iy); + adjacent_list[i][1] = verify_mesh_index(++ix, iy); + adjacent_list[i][2] = verify_mesh_index(++ix, iy); + adjacent_list[i][3] = verify_mesh_index(ix, ++iy); + adjacent_list[i][4] = verify_mesh_index(ix, ++iy); + adjacent_list[i][5] = verify_mesh_index(--ix, iy); + adjacent_list[i][6] = verify_mesh_index(--ix, iy); + adjacent_list[i][7] = verify_mesh_index(ix, --iy); + adjacent_list[i][8] = i; + } +} + +static void +adjust_areas (void) +/* Adjust areas of bubbles so we don't get overflow in weighted_mean() */ +{ + double maxvalue; + long maxarea; + long factor; + int i; + +#ifdef HAVE_XPM + if (simple) + maxarea = bubble_areas[bubble_max_radius+1]; + else + maxarea = step_pixmaps[num_bubble_pixmaps]->area; +#else + maxarea = bubble_areas[bubble_max_radius+1]; +#endif /* HAVE_XPM */ + maxvalue = (double)screen_width * 2.0 * (double)maxarea; + factor = (long)ceil(maxvalue / (double)LONG_MAX); + if (factor > 1) { + /* Overflow will occur in weighted_mean(). We must divide areas + each by factor so it will never do so. */ +#ifdef HAVE_XPM + if (simple) { + for (i = bubble_min_radius; i <= bubble_max_radius+1; i++) { + bubble_areas[i] /= factor; + if (bubble_areas[i] == 0) + bubble_areas[i] = 1; + } + } else { + for (i = 0; i <= num_bubble_pixmaps; i++) { +#ifdef DEBUG + printf("area = %ld", step_pixmaps[i]->area); +#endif /* DEBUG */ + step_pixmaps[i]->area /= factor; + if (step_pixmaps[i]->area == 0) + step_pixmaps[i]->area = 1; +#ifdef DEBUG + printf("-> %ld\n", step_pixmaps[i]->area); +#endif /* DEBUG */ + } + } +#else + for (i = bubble_min_radius; i <= bubble_max_radius+1; i++) { + bubble_areas[i] /= factor; + if (bubble_areas[i] == 0) + bubble_areas[i] = 1; + } +#endif /* HAVE_XPM */ + } +#ifdef DEBUG + printf("maxarea = %ld\n", maxarea); + printf("maxvalue = %g\n", maxvalue); + printf("LONG_MAX = %ld\n", LONG_MAX); + printf("factor = %ld\n", factor); +#endif /* DEBUG */ +} + +/* + * Bubbles stuff + */ + +static Bubble * +new_bubble (void) +/* Add a new bubble at some random position on the screen of the smallest +size. */ +{ + Bubble *rv = (Bubble *)xmalloc(sizeof(Bubble)); + + /* Can't use null_bubble() here since magic number hasn't been set */ + if (rv == (Bubble *)NULL) { + fprintf(stderr, "Ran out of memory!\n"); + exit(1); + } + + if (simple) { + rv->radius = bubble_min_radius; + rv->area = bubble_areas[bubble_min_radius]; +#ifdef HAVE_XPM + } else { + rv->step = 0; + rv->radius = step_pixmaps[0]->radius; + rv->area = step_pixmaps[0]->area; +#endif /* HAVE_XPM */ + } + rv->visible = 0; + rv->magic = BUBBLE_MAGIC; + rv->x = ya_random() % screen_width; + rv->y = ya_random() % screen_height; + rv->cell_index = pixel_to_mesh(rv->x, rv->y); + + return rv; +} + +static void +show_bubble(Bubble *bb) +/* paint the bubble on the screen */ +{ + if (null_bubble(bb)) { + fprintf(stderr, "NULL bubble passed to show_bubble\n"); + exit(1); + } + + if (! bb->visible) { + bb->visible = 1; + + if (simple) { + XDrawArc(defdsp, defwin, draw_gc, (bb->x - bb->radius), + (bb->y - bb->radius), bb->radius*2, bb->radius*2, 0, + 360*64); + } else { +#ifdef HAVE_XPM + XSetClipOrigin(defdsp, step_pixmaps[bb->step]->draw_gc, + (bb->x - bb->radius), + (bb->y - bb->radius)); + + XCopyArea(defdsp, step_pixmaps[bb->step]->ball, defwin, + step_pixmaps[bb->step]->draw_gc, + 0, 0, (bb->radius * 2), + (bb->radius * 2), + (bb->x - bb->radius), + (bb->y - bb->radius)); +#endif /* HAVE_XPM */ + } + } +} + +static void +hide_bubble(Bubble *bb) +/* erase the bubble */ +{ + if (null_bubble(bb)) { + fprintf(stderr, "NULL bubble passed to hide_bubble\n"); + exit(1); + } + + if (bb->visible) { + bb->visible = 0; + + if (simple) { + XDrawArc(defdsp, defwin, erase_gc, (bb->x - bb->radius), + (bb->y - bb->radius), bb->radius*2, bb->radius*2, 0, + 360*64); + } else { +#ifdef HAVE_XPM + if (! broken) { + XSetClipOrigin(defdsp, step_pixmaps[bb->step]->erase_gc, + (bb->x - bb->radius), (bb->y - bb->radius)); + + XFillRectangle(defdsp, defwin, step_pixmaps[bb->step]->erase_gc, + (bb->x - bb->radius), + (bb->y - bb->radius), + (bb->radius * 2), + (bb->radius * 2)); + } +#endif /* HAVE_XPM */ + } + } +} + +static void +delete_bubble_in_mesh(Bubble *bb, int keep_bubble) +/* Delete an individual bubble, adjusting list of bubbles around it. + If keep_bubble is true then the bubble isn't actually deleted. We + use this to allow bubbles to change mesh cells without reallocating, + (it needs this when two bubbles collide and the centre position is + recalculated, and this may stray over a mesh boundary). */ +{ + if ((!null_bubble(bb->prev)) && (!null_bubble(bb->next))) { + bb->prev->next = bb->next; + bb->next->prev = bb->prev; + } else if ((!null_bubble(bb->prev)) && + (null_bubble(bb->next))) { + bb->prev->next = (Bubble *)NULL; + bb->next = mesh[bb->cell_index]; + } else if ((null_bubble(bb->prev)) && + (!null_bubble(bb->next))) { + bb->next->prev = (Bubble *)NULL; + mesh[bb->cell_index] = bb->next; + bb->next = mesh[bb->cell_index]; + } else { + /* Only item on list */ + mesh[bb->cell_index] = (Bubble *)NULL; + } + if (! keep_bubble) + free(bb); +} + +static unsigned long +ulongsqrint(int x) +/* Saves ugly inline code */ +{ + return ((unsigned long)x * (unsigned long)x); +} + +static Bubble * +get_closest_bubble(Bubble *bb) +/* Find the closest bubble touching the this bubble, NULL if none are + touching. */ +{ + Bubble *rv = (Bubble *)NULL; + Bubble *tmp; + unsigned long separation2, touchdist2; + int dx, dy; + unsigned long closest2 = ULONG_MAX; + int i; + +#ifdef DEBUG + if (null_bubble(bb)) { + fprintf(stderr, "NULL pointer 0x%x passed to get_closest_bubble()!", + (int)bb); + exit(1); + } +#endif /* DEBUG */ + + for (i = 0; i < 9; i++) { + /* There is a bug here where bb->cell_index is negaitve.. */ +#ifdef DEBUG + if ((bb->cell_index < 0) || (bb->cell_index >= mesh_cells)) { + fprintf(stderr, "bb->cell_index = %d\n", bb->cell_index); + exit(1); + } +#endif /* DEBUG */ +/* printf("%d,", bb->cell_index); */ + if (adjacent_list[bb->cell_index][i] != -1) { + tmp = mesh[adjacent_list[bb->cell_index][i]]; + while (! null_bubble(tmp)) { + if (tmp != bb) { + dx = tmp->x - bb->x; + dy = tmp->y - bb->y; + separation2 = ulongsqrint(dx) + ulongsqrint(dy); + /* Add extra leeway so circles _never_ overlap */ + touchdist2 = ulongsqrint(tmp->radius + bb->radius + 2); + if ((separation2 <= touchdist2) && (separation2 < + closest2)) { + rv = tmp; + closest2 = separation2; + } + } + tmp = tmp->next; + } + } + } + + return rv; +} + +#ifdef DEBUG +static void +ldr_barf (void) +{ +} +#endif /* DEBUG */ + +static long +long_div_round(long num, long dem) +{ + long divvie, moddo; + +#ifdef DEBUG + if ((num < 0) || (dem < 0)) { + fprintf(stderr, "long_div_round: %ld, %ld\n", num, dem); + ldr_barf(); + exit(1); + } +#endif /* DEBUG */ + + divvie = num / dem; + moddo = num % dem; + if (moddo > (dem / 2)) + ++divvie; + +#ifdef DEBUG + if ((divvie < 0) || (moddo < 0)) { + fprintf(stderr, "long_div_round: %ld, %ld\n", divvie, moddo); + ldr_barf(); + exit(1); + } +#endif /* DEBUG */ + + return divvie; +} + +static int +weighted_mean(int n1, int n2, long w1, long w2) +/* Mean of n1 and n2 respectively weighted by weights w1 and w2. */ +{ +#ifdef DEBUG + if ((w1 <= 0) || (w2 <= 0)) { + fprintf(stderr, + "Bad weights passed to weighted_mean() - (%d, %d, %ld, %ld)!\n", + n1, n2, w1, w2); + exit(1); + } +#endif /* DEBUG */ + return ((int)long_div_round((long)n1 * w1 + (long)n2 * w2, + w1 + w2)); +} + +static int +bubble_eat(Bubble *diner, Bubble *food) +/* The diner eats the food. Returns true (1) if the diner still exists */ +{ + int i; + int newmi; + +#ifdef DEBUG + if ((null_bubble(diner)) || (null_bubble(food))) { + fprintf(stderr, "Bad bubbles passed to bubble_eat()!\n"); + exit(1); + } +#endif /* DEBUG */ + + /* We hide the diner even in the case that it doesn't grow so that + if the food overlaps its boundary it is replaced. This could + probably be solved by letting bubbles eat others which are close + but not quite touching. It's probably worth it, too, since we + would then not have to redraw bubbles which don't change in + size. */ + + hide_bubble(diner); + hide_bubble(food); + diner->x = weighted_mean(diner->x, food->x, diner->area, food->area); + diner->y = weighted_mean(diner->y, food->y, diner->area, food->area); + newmi = pixel_to_mesh(diner->x, diner->y); + diner->area += food->area; + delete_bubble_in_mesh(food, DELETE_BUBBLE); + + if ((simple) && (diner->area > bubble_areas[bubble_max_radius])) { + delete_bubble_in_mesh(diner, DELETE_BUBBLE); + return 0; + } +#ifdef HAVE_XPM + if ((! simple) && (diner->area > + step_pixmaps[num_bubble_pixmaps]->area)) { + delete_bubble_in_mesh(diner, DELETE_BUBBLE); + return 0; + } +#endif /* HAVE_XPM */ + + if (simple) { + if (diner->area > bubble_areas[diner->radius + 1]) { + /* Move the bubble to a new radius */ + i = diner->radius; + while (diner->area > bubble_areas[i+1]) + ++i; + diner->radius = i; + } + show_bubble(diner); +#ifdef HAVE_XPM + } else { + if (diner->area > step_pixmaps[diner->step+1]->area) { + i = diner->step; + while (diner->area > step_pixmaps[i+1]->area) + ++i; + diner->step = i; + diner->radius = step_pixmaps[diner->step]->radius; + } + show_bubble(diner); +#endif /* HAVE_XPM */ + } + + /* Now adjust locations and cells if need be */ + if (newmi != diner->cell_index) { + delete_bubble_in_mesh(diner, KEEP_BUBBLE); + diner->cell_index = newmi; + add_to_mesh(diner); + } + + return 1; +} + +static int +merge_bubbles(Bubble *b1, Bubble *b2) +/* These two bubbles merge into one. If the first one wins out return +1 else return 2. If there is no winner (it explodes) then return 0 */ +{ + int b1size, b2size; + + b1size = b1->area; + b2size = b2->area; + +#ifdef DEBUG + if ((null_bubble(b1) || null_bubble(b2))) { + fprintf(stderr, "NULL bubble passed to merge_bubbles()!\n"); + exit(1); + } +#endif /* DEBUG */ + + if (b1 == b2) { + hide_bubble(b1); + delete_bubble_in_mesh(b1, DELETE_BUBBLE); + return 0; + } + + if (b1size > b2size) { + switch (bubble_eat(b1, b2)) { + case 0: + return 0; + break; + case 1: + return 1; + break; + default: + break; + } + } else if (b1size < b2size) { + switch (bubble_eat(b2, b1)) { + case 0: + return 0; + break; + case 1: + return 2; + break; + default: + break; + } + } else { + if ((ya_random() % 2) == 0) { + switch (bubble_eat(b1, b2)) { + case 0: + return 0; + break; + case 1: + return 1; + break; + default: + break; + } + } else { + switch (bubble_eat(b2, b1)) { + case 0: + return 0; + break; + case 1: + return 2; + break; + default: + break; + } + } + } + fprintf(stderr, "An error occurred in merge_bubbles()\n"); + exit(1); +} + +static void +insert_new_bubble(Bubble *tmp) +/* Calculates which bubbles are eaten when a new bubble tmp is + inserted. This is called recursively in case when a bubble grows + it eats others. Careful to pick out disappearing bubbles. */ +{ + Bubble *nextbub; + Bubble *touch; + +#ifdef DEBUG + if (null_bubble(tmp)) { + fprintf(stderr, "Bad bubble passed to insert_new_bubble()!\n"); + exit(1); + } +#endif /* DEBUG */ + + nextbub = tmp; + touch = get_closest_bubble(nextbub); + while (! null_bubble(touch)) { + switch (merge_bubbles(nextbub, touch)) { + case 2: + /* touch ate nextbub and survived */ + nextbub = touch; + break; + case 1: + /* nextbub ate touch and survived */ + break; + case 0: + /* somebody ate someone else but they exploded */ + nextbub = (Bubble *)NULL; + break; + default: + /* something went wrong */ + fprintf(stderr, "Error occurred in insert_new_bubble()\n"); + exit(1); + } + /* Check to see if there are any other bubbles still in the area + and if we need to do this all over again for them. */ + if (! null_bubble(nextbub)) + touch = get_closest_bubble(nextbub); + else + touch = (Bubble *)NULL; + } +} + +#ifdef DEBUG +static int +get_length_of_bubble_list(Bubble *bb) +{ + Bubble *tmp = bb; + int rv = 0; + + while (! null_bubble(tmp)) { + rv++; + tmp = tmp->next; + } + + return rv; +} +#endif /* DEBUG */ + +/* + * Pixmap stuff used regardless of whether file I/O is available. Must + * still check for XPM, though! + */ + +#ifdef HAVE_XPM + +static void +free_pixmaps (void) +/* Free resources associated with XPM */ +{ + int i; + +#ifdef DEBUG + if (simple) { + fprintf(stderr, "free_pixmaps() called in simple mode\n"); + exit(1); + } + printf("free_pixmaps()\n"); +#endif /* DEBUG */ + + for(i = 0; i < (num_bubble_pixmaps - 1); i++) { + XFreePixmap(defdsp, step_pixmaps[i]->ball); + XFreePixmap(defdsp, step_pixmaps[i]->shape_mask); + XFreeGC(defdsp, step_pixmaps[i]->draw_gc); + XFreeGC(defdsp, step_pixmaps[i]->erase_gc); + XFreeColors(defdsp, defcmap, step_pixmaps[i]->xpmattrs.pixels, + step_pixmaps[i]->xpmattrs.npixels, 0); + XpmFreeAttributes(&step_pixmaps[i]->xpmattrs); + } +} + +static void +onintr(int a) +/* This gets called when SIGINT or SIGTERM is received */ +{ + free_pixmaps(); + exit(0); +} + +#ifdef DEBUG +static void +onsegv(int a) +/* Called when SEGV detected. Hmmmmm.... */ +{ + fflush(stdout); + fprintf(stderr, "SEGV detected! : %d\n", a); + exit(1); +} +#endif /* DEBUG */ + + +/* + * Pixmaps without file I/O (but do have XPM) + */ + +static void +pixmap_sort(Bubble_Step **head, int numelems) +/* Couldn't get qsort to work right with this so I wrote my own. This puts +the numelems length array with first element at head into order of radius. +*/ +{ + Bubble_Step tmp; + Bubble_Step *least = 0; + int minradius = INT_MAX; + int i; + + for (i = 0; i < numelems; i++) { + if (head[i]->radius < minradius) { + least = head[i]; + minradius = head[i]->radius; + } + } + if (*head != least) { + memcpy(&tmp, least, sizeof(Bubble_Step)); + memcpy(least, *head, sizeof(Bubble_Step)); + memcpy(*head, &tmp, sizeof(Bubble_Step)); + } + + if (numelems > 2) + pixmap_sort(&head[1], numelems-1); +} + +static int +extrapolate(int i1, int i2) +{ + return (i2 + (i2 - i1)); +} + +static void +make_pixmap_array(Bubble_Step *list) +/* From a linked list of bubbles construct the array step_pixmaps */ +{ + Bubble_Step *tmp = list; + int ind; +#ifdef DEBUG + int prevrad = -1; +#endif + + if (list == (Bubble_Step *)NULL) { + fprintf(stderr, "NULL list passed to make_pixmap_array\n"); + exit(1); + } + + num_bubble_pixmaps = 1; + while(tmp->next != (Bubble_Step *)NULL) { + tmp = tmp->next; + ++num_bubble_pixmaps; + } + + if (num_bubble_pixmaps < 2) { + fprintf(stderr, "Must be at least two bubbles in file\n"); + exit(1); + } + + step_pixmaps = (Bubble_Step **)xmalloc((num_bubble_pixmaps + 1) * + sizeof(Bubble_Step *)); + + /* Copy them blindly into the array for sorting. */ + ind = 0; + tmp = list; + do { + step_pixmaps[ind++] = tmp; + tmp = tmp->next; + } while(tmp != (Bubble_Step *)NULL); + + /* We make another bubble beyond the ones with pixmaps so that the final + bubble hangs around and doesn't pop immediately. It's radius and area + are found by extrapolating from the largest two bubbles with pixmaps. */ + + step_pixmaps[num_bubble_pixmaps] = + (Bubble_Step *)xmalloc(sizeof(Bubble_Step)); + step_pixmaps[num_bubble_pixmaps]->radius = INT_MAX; + + pixmap_sort(step_pixmaps, (num_bubble_pixmaps + 1)); + +#ifdef DEBUG + if (step_pixmaps[num_bubble_pixmaps]->radius != INT_MAX) { + fprintf(stderr, "pixmap_sort() screwed up make_pixmap_array\n"); + } +#endif /* DEBUG */ + + step_pixmaps[num_bubble_pixmaps]->radius = + extrapolate(step_pixmaps[num_bubble_pixmaps-2]->radius, + step_pixmaps[num_bubble_pixmaps-1]->radius); + step_pixmaps[num_bubble_pixmaps]->area = + calc_bubble_area(step_pixmaps[num_bubble_pixmaps]->radius); + + +#ifdef DEBUG + /* Now check for correct order */ + for (ind = 0; ind < num_bubble_pixmaps; ind++) { + if (prevrad > 0) { + if (step_pixmaps[ind]->radius < prevrad) { + fprintf(stderr, "Pixmaps not in ascending order of radius\n"); + exit(1); + } + } + prevrad = step_pixmaps[ind]->radius; + } +#endif /* DEBUG */ +} + +#ifndef NO_DEFAULT_BUBBLE +static void +make_pixmap_from_default(char **pixmap_data, Bubble_Step *bl) +/* Read pixmap data which has been compiled into the program and a pointer + to which has been passed. + + This is virtually copied verbatim from make_pixmap_from_file() above and +changes made to either should be propagated onwards! */ +{ + int result; + XGCValues gcv; + +#ifdef DEBUG + if (pixmap_data == (char **)0) { + fprintf(stderr, "make_pixmap_from_default(): NULL passed\n"); + exit(1); + } +#endif + + if (bl == (Bubble_Step *)NULL) { + fprintf(stderr, "NULL pointer passed to make_pixmap()\n"); + exit(1); + } + + bl->xpmattrs.valuemask = 0; + +#ifdef XpmCloseness + bl->xpmattrs.valuemask |= XpmCloseness; + bl->xpmattrs.closeness = 40000; +#endif +#ifdef XpmVisual + bl->xpmattrs.valuemask |= XpmVisual; + bl->xpmattrs.visual = defvisual; +#endif +#ifdef XpmDepth + bl->xpmattrs.valuemask |= XpmDepth; + bl->xpmattrs.depth = screen_depth; +#endif +#ifdef XpmColormap + bl->xpmattrs.valuemask |= XpmColormap; + bl->xpmattrs.colormap = defcmap; +#endif + + + /* This is the only line which is different from make_pixmap_from_file() */ + result = XpmCreatePixmapFromData(defdsp, defwin, pixmap_data, &bl->ball, + &bl->shape_mask, &bl->xpmattrs); + + switch(result) { + case XpmColorError: + fprintf(stderr, "xpm: color substitution performed\n"); + /* fall through */ + case XpmSuccess: + bl->radius = MAX(bl->xpmattrs.width, bl->xpmattrs.height) / 2; + bl->area = calc_bubble_area(bl->radius); + break; + case XpmColorFailed: + fprintf(stderr, "xpm: color allocation failed\n"); + exit(1); + case XpmNoMemory: + fprintf(stderr, "xpm: out of memory\n"); + exit(1); + default: + fprintf(stderr, "xpm: unknown error code %d\n", result); + exit(1); + } + + gcv.plane_mask = AllPlanes; + gcv.foreground = default_fg_pixel; + gcv.function = GXcopy; + bl->draw_gc = XCreateGC (defdsp, defwin, GCForeground, &gcv); + XSetClipMask(defdsp, bl->draw_gc, bl->shape_mask); + + gcv.foreground = default_bg_pixel; + gcv.function = GXcopy; + bl->erase_gc = XCreateGC (defdsp, defwin, GCForeground, &gcv); + XSetClipMask(defdsp, bl->erase_gc, bl->shape_mask); +} + +static void +default_to_pixmaps (void) +/* Make pixmaps out of default ball data stored in bubbles_default.c */ +{ + int i; + Bubble_Step *pixmap_list = (Bubble_Step *)NULL; + Bubble_Step *newpix, *tmppix; + char **pixpt; + + /* Make sure pixmaps are freed when program is terminated */ + /* This is when I hit ^C */ + if (signal(SIGINT, SIG_IGN) != SIG_IGN) + signal(SIGINT, onintr); + /* xscreensaver sends SIGTERM */ + if (signal(SIGTERM, SIG_IGN) != SIG_IGN) + signal(SIGTERM, onintr); +#ifdef DEBUG + if (signal(SIGSEGV, SIG_IGN) != SIG_IGN) { + printf("Setting signal handler for SIGSEGV\n"); + signal(SIGSEGV, onsegv); + } else { + printf("Didn't set signal hanlder for SIGSEGV\n"); + } +#endif /* DEBUG */ + + for (i = 0; i < num_default_bubbles; i++) { + pixpt = default_bubbles[i]; + newpix = (Bubble_Step *)xmalloc(sizeof(Bubble_Step)); + make_pixmap_from_default(pixpt, newpix); + /* Now add to list */ + if (pixmap_list == (Bubble_Step *)NULL) { + pixmap_list = newpix; + } else { + tmppix = pixmap_list; + while (tmppix->next != (Bubble_Step *)NULL) + tmppix = tmppix->next; + tmppix->next = newpix; + } + newpix->next = (Bubble_Step *)NULL; + } + + /* Finally construct step_pixmaps[] */ + make_pixmap_array(pixmap_list); +} + +#endif /* NO_DEFAULT_BUBBLE */ + +#endif /* HAVE_XPM */ + +/* + * File I/O stuff + */ + +#ifdef BUBBLES_IO + +static DIR * +my_opendir(char *name) +/* Like opendir() but checks for things so we don't have to do it multiple +times in the code. */ +{ + DIR *rv; + + if (name == (char *)NULL) { + fprintf(stderr, "NULL directory name\n"); + return (DIR *)NULL; + } + + if ((rv = opendir(name)) == NULL) { + perror(name); + return (DIR *)NULL; + } + + return rv; +} + +static int +regular_file(char *name) +/* Check to see if we can use the named file. This was broken under Linux +1.3.45 but seems to be okay under 1.3.54. The parameter "name" was being +trashed if the file didn't exist. Yeah, I know 1.3.x are development +kernels.... +*/ +{ + int fd; + + if ((fd = open(name, O_RDONLY)) == -1) { + perror(name); + return 0; + } else { + close(fd); + return 1; + } +} + +static char * +get_random_name(char *dir) +/* Pick an appropriate file at random out of the files in the directory dir */ +{ + STRUCT_DIRENT *dp; + DIR *dfd; + int numentries = 0; + int entnum; + int x; + char buf[PATH_BUF_SIZE]; + char *rv; + + if ((dfd = my_opendir(dir)) == (DIR *)NULL) + return (char *)NULL; + + while ((dp = readdir(dfd)) != NULL) { + if ((strcmp(DIRENT_NAME, ".") == 0) || (strcmp(DIRENT_NAME, "..") == 0)) + continue; + if ((strlen(dir)+strlen(DIRENT_NAME)+2) > 1024) { + fprintf(stderr, "name %s/%s too long\n", dir, DIRENT_NAME); + continue; + } + if (sprintf(buf, "%s/%s", dir, DIRENT_NAME) > (PATH_BUF_SIZE-1)) { + fprintf(stderr, "path buffer overflowed in get_random_name()\n"); + continue; + } + if (regular_file(buf)) + ++numentries; + } + closedir(dfd); + if (numentries == 0) { + fprintf(stderr, "No suitable files found in %s\n", dir); + return (char *)NULL; + } + entnum = ya_random() % numentries; + x = 0; + + if ((dfd = my_opendir(dir)) == (DIR *)NULL) + return (char *)NULL; + while ((dp = readdir(dfd)) != NULL) { + if ((strcmp(DIRENT_NAME, ".") == 0) || (strcmp(DIRENT_NAME, "..") == 0)) + continue; + if ((strlen(dir)+strlen(DIRENT_NAME)+2) > 1024) { + /* We warned about this previously */ + continue; + } + if (sprintf(buf, "%s/%s", dir, DIRENT_NAME) > (PATH_BUF_SIZE-1)) { + fprintf(stderr, "path buffer overflowed in get_random_name()\n"); + continue; + } + if (regular_file(buf)) { + if (x == entnum) { + rv = (char *)xmalloc(1024 * sizeof(char)); + strcpy(rv, buf); + closedir(dfd); + return rv; + } + ++x; + } + } + /* We've screwed up if we reach here - someone must have deleted all the + files while we were counting them... */ + fprintf(stderr, "get_random_name(): Oops!\n"); + exit(1); +} + +static int +read_line(int fd, char **buf, int bufsize) +/* A line is read from fd until a '\n' is found or EOF is reached. (*buf) +is initially of length bufsize and is extended by bufsize chars if need +be (for as many times as it takes). */ +{ + char x; + int pos = 0; + int size = bufsize; + int rv; + char *newbuf; + + while (1) { + rv = read(fd, &x, 1); + if (rv == -1) { + perror("read_line(): "); + return IO_ERROR; + } else if (rv == 0) { + (*buf)[pos] = '\0'; + return EOF_REACHED; + } else if (x == '\n') { + (*buf)[pos] = '\0'; + return LINE_READ; + } else { + (*buf)[pos++] = x; + if (pos == (size - 1)) { + /* We've come to the end of the space */ + newbuf = (char *)xmalloc((size+bufsize) * sizeof(char)); + strncpy(newbuf, *buf, (size - 1)); + free(*buf); + *buf = newbuf; + size += bufsize; + } + } + } +} + +static int +create_temp_file(char **name) +/* Create a temporary file in /tmp and return a filedescriptor to it */ +{ + int rv; + + if (*name != (char *)NULL) + free(*name); + + if ((*name = tempnam("/tmp", "abxdfes")) == (char *)NULL) { + fprintf(stderr, "Couldn't make new temporary file\n"); + exit(1); + } +/* printf("Temp file created : %s\n", *name); */ + if ((rv = creat(*name, 0644)) == -1) { + fprintf(stderr, "Couldn't open temporary file\n"); + exit(1); + } + + return rv; +} + + +#ifdef BUBBLES_IO +static void +make_pixmap_from_file(char *fname, Bubble_Step *bl) +/* Read the pixmap in file fname into structure bl which must already + be allocated. */ +{ + int result; + XGCValues gcv; + + if (bl == (Bubble_Step *)NULL) { + fprintf(stderr, "NULL pointer passed to make_pixmap()\n"); + exit(1); + } + + bl->xpmattrs.closeness = 40000; + bl->xpmattrs.valuemask = XpmColormap | XpmCloseness; + bl->xpmattrs.colormap = defcmap; + + result = XpmReadFileToPixmap(defdsp, defwin, fname, &bl->ball, + &bl->shape_mask, &bl->xpmattrs); + + switch(result) { + case XpmColorError: + fprintf(stderr, "xpm: color substitution performed\n"); + /* fall through */ + case XpmSuccess: + bl->radius = MAX(bl->xpmattrs.width, bl->xpmattrs.height) / 2; + bl->area = calc_bubble_area(bl->radius); + break; + case XpmColorFailed: + fprintf(stderr, "xpm: color allocation failed\n"); + exit(1); + case XpmNoMemory: + fprintf(stderr, "xpm: out of memory\n"); + exit(1); + default: + fprintf(stderr, "xpm: unknown error code %d\n", result); + exit(1); + } + + gcv.plane_mask = AllPlanes; + gcv.foreground = default_fg_pixel; + gcv.function = GXcopy; + bl->draw_gc = XCreateGC (defdsp, defwin, GCForeground, &gcv); + XSetClipMask(defdsp, bl->draw_gc, bl->shape_mask); + + gcv.foreground = default_bg_pixel; + gcv.function = GXcopy; + bl->erase_gc = XCreateGC (defdsp, defwin, GCForeground, &gcv); + XSetClipMask(defdsp, bl->erase_gc, bl->shape_mask); +} +#endif /* BUBBLES_IO */ + +static void +read_file_to_pixmaps(char *fname) +/* Read the pixmaps contained in the file fname into memory. THESE SHOULD +BE UNCOMPRESSED AND READY TO GO! */ +{ + int fd, tmpfd=0, rv; + int inxpm = 0; + int xpmseen = 0; + char *buf = (char *)NULL; + char *tmpname = (char *)NULL; + Bubble_Step *pixmap_list = (Bubble_Step *)NULL; + Bubble_Step *newpix, *tmppix; + + /* We first create a linked list of pixmaps before allocating + memory for the array */ + + if ((fd = open(fname, O_RDONLY)) == -1) { + fprintf(stderr, "Couldn't open %s\n", fname); + exit(1); + } + + /* Make sure pixmaps are freed when program is terminated */ + /* This is when I hit ^C */ + if (signal(SIGINT, SIG_IGN) != SIG_IGN) + signal(SIGINT, onintr); + /* xscreensaver sends SIGTERM */ + if (signal(SIGTERM, SIG_IGN) != SIG_IGN) + signal(SIGTERM, onintr); +#ifdef DEBUG + if (signal(SIGSEGV, SIGN_IGN) != SIG_IGN) + signal(SIGSEGV, onsegv); +#endif /* DEBUG */ + + while (1) { + if (inxpm == 2) + break; + + buf = (char *)malloc(READ_LINE_BUF_SIZE * sizeof(char)); + + switch ((rv = read_line(fd, &buf, READ_LINE_BUF_SIZE))) { + case IO_ERROR: + fprintf(stderr, "An I/O error occurred\n"); + exit(1); + case EOF_REACHED: + if (inxpm) { + fprintf(stderr, "EOF occurred inside an XPM block\n"); + exit(1); + } else + inxpm = 2; + break; + case LINE_READ: + if (inxpm) { + if (strncmp("};", buf, 2) == 0) { + inxpm = 0; + write(tmpfd, buf, strlen(buf)); + write(tmpfd, "\n", 1); + close(tmpfd); + /* Now process the tmpfile */ + newpix = (Bubble_Step *)xmalloc(sizeof(Bubble_Step)); + make_pixmap_from_file(tmpname, newpix); + /* Now add to list */ + if (pixmap_list == (Bubble_Step *)NULL) { + pixmap_list = newpix; + } else { + tmppix = pixmap_list; + while (tmppix->next != (Bubble_Step *)NULL) + tmppix = tmppix->next; + tmppix->next = newpix; + } + newpix->next = (Bubble_Step *)NULL; + unlink(tmpname); + } else { + write(tmpfd, buf, strlen(buf)); + write(tmpfd, "\n", 1); + } + } else { + if (strncmp("/* XPM */", buf, 9) == 0) { + tmpfd = create_temp_file(&tmpname); +/* This proves XPM's performance is kinda pathetic */ +#ifdef DEBUG + printf("New XPM detected : %s, fd=%d\n", tmpname, tmpfd); +#endif /* DEBUG */ + inxpm = 1; + xpmseen = 1; + } + write(tmpfd, buf, strlen(buf)); + write(tmpfd, "\n", 1); + } + break; + default: + fprintf(stderr, "read_line returned unknown code %d\n", rv); + exit(1); + } + + free(buf); + } + + close(fd); + if (buf != (char *)NULL) + free(buf); + if (tmpname != (char *)NULL) + free(tmpname); + + if (! xpmseen) { + fprintf(stderr, "There was no XPM data in the file %s\n", fname); + exit(1); + } + + /* Finally construct step_pixmaps[] */ + make_pixmap_array(pixmap_list); +} + +static void +shell_exec(char *command) +/* Forks a shell to execute "command" then waits for command to finish */ +{ + int pid, status, wval; + + switch(pid=fork()) { + case 0: + if (execlp(BOURNESH, BOURNESH, "-c", command, (char *)NULL) == -1) { + fprintf(stderr, "Couldn't exec shell %s\n", BOURNESH); + exit(1); + } + /* fall through if execlp() fails */ + case -1: + /* Couldn't fork */ + perror(progname); + exit(1); + default: + while ((wval = wait(&status)) != pid) + if (wval == -1) { + perror(progname); + exit(1); + } + } +} + +static void +uncompress_file(char *current, char *namebuf) +/* If the file current is compressed (i.e. its name ends in .gz or .Z, +no check is made to see if it is actually a compressed file...) then a +new temporary file is created for it and it is decompressed into there, +returning the name of the file to namebuf, else current is returned in +namebuf */ +{ + int fd; + char *tname = (char *)NULL; + char argbuf[COMMAND_BUF_SIZE]; + + if (((strlen(current) >=4) && + (strncmp(¤t[strlen(current)-3], ".gz", 3) == 0)) || + ((strlen(current) >=3) && + (strncmp(¤t[strlen(current)-2], ".Z", 2) == 0))) { + fd = create_temp_file(&tname); + /* close immediately but don't unlink so we should have a zero length + file in /tmp which we can append to */ + close(fd); + if (sprintf(argbuf, "%s -dc %s > %s", GZIP, current, tname) > + (COMMAND_BUF_SIZE-1)) { + fprintf(stderr, "command buffer overflowed in uncompress_file()\n"); + exit(1); + } + shell_exec(argbuf); + strcpy(namebuf, tname); + } else { + strcpy(namebuf, current); + } + return; +} + +#endif /* BUBBLES_IO */ + +/* + * Main stuff + */ + + +static void +get_resources(Display *dpy, Window window) +/* Get the appropriate X resources and warn about any inconsistencies. */ +{ + Bool nodelay; +#ifdef BUBBLES_IO +#ifdef HAVE_XPM + char *dirname; +#else + char *foo, *bar; +#endif /* HAVE_XPM */ +#endif /* BUBBLES_IO */ + + XWindowAttributes xgwa; + Colormap cmap; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + + threed = get_boolean_resource("3D", "Boolean"); + quiet = get_boolean_resource("quiet", "Boolean"); + simple = get_boolean_resource("simple", "Boolean"); + /* Forbid rendered bubbles on monochrome displays */ + if ((mono_p) && (! simple)) { + if (! quiet) + fprintf(stderr, + "Rendered bubbles not supported on monochrome displays\n"); + simple = True; + } + delay = get_integer_resource("delay", "Integer"); + nodelay = get_boolean_resource("nodelay", "Boolean"); + if (nodelay) + delay = 0; + if (delay < 0) + delay = 0; + + default_fg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, + cmap); + default_bg_pixel = get_pixel_resource ("background", "Background", dpy, + cmap); + + if (simple) { + /* This is easy */ + broken = get_boolean_resource("broken", "Boolean"); + if (broken) + if (! quiet) + fprintf(stderr, "-broken not available in simple mode\n"); + } else { +#ifndef HAVE_XPM + simple = 1; +#else + broken = get_boolean_resource("broken", "Boolean"); +#ifdef BUBBLES_IO + pixmap_file = get_string_resource("file", "File"); + dirname = get_string_resource("directory", "Directory"); +#ifdef NO_DEFAULT_BUBBLE + /* Must specify -file or -directory if no default bubble compiled in */ + if (strcmp(pixmap_file, "(default)") != 0) { + } else if (strcmp(dirname, "(default)") != 0) { + if ((pixmap_file = get_random_name(dirname)) == (char *)NULL) { + /* Die if we can't open directory - make it consistent with -file + when it fails, rather than falling back to default. */ + exit(1); + } + } else { + fprintf(stderr, + "No default bubble compiled in - use -file or -directory\n"); + exit(1); + } +#else + if (strcmp(pixmap_file, "(default)") != 0) { + } else if (strcmp(dirname, "(default)") != 0) { + if ((pixmap_file = get_random_name(dirname)) == (char *)NULL) { + exit(1); + } + } else { + /* Use default bubble */ + use_default_bubble = 1; + } +#endif /* NO_DEFAULT_BUBBLE */ +#else + use_default_bubble = 1; +#endif /* BUBBLES_IO */ +#endif /* HAVE_XPM */ + } +} + +static void +init_bubbles (Display *dpy, Window window) +{ + XGCValues gcv; + XWindowAttributes xgwa; + int i; +#ifdef BUBBLES_IO + char uncompressed[1024]; +#endif /* BUBBLES_IO */ + + defdsp = dpy; + defwin = window; + + ya_rand_init(0); + + get_resources(dpy, window); + + XGetWindowAttributes (dpy, window, &xgwa); + +#ifdef DEBUG + printf("sizof(int) on this platform is %d\n", sizeof(int)); + printf("sizof(long) on this platform is %d\n", sizeof(long)); +#endif /* DEBUG */ + + screen_width = xgwa.width; + screen_height = xgwa.height; + screen_depth = xgwa.depth; + defcmap = xgwa.colormap; + defvisual = xgwa.visual; + + if (simple) { + /* These are pretty much plucked out of the air */ + bubble_min_radius = (int)(0.006*(double)(MIN(screen_width, + screen_height))); + bubble_max_radius = (int)(0.045*(double)(MIN(screen_width, + screen_height))); + /* Some trivial values */ + if (bubble_min_radius < 1) + bubble_min_radius = 1; + if (bubble_max_radius <= bubble_min_radius) + bubble_max_radius = bubble_min_radius + 1; + + mesh_length = (2 * bubble_max_radius) + 3; + + /* store area of each bubble of certain radius as number of 1/10s of + a pixel area. PI is defined in */ + bubble_areas = (long *)xmalloc((bubble_max_radius + 2) * sizeof(int)); + for (i = 0; i < bubble_min_radius; i++) + bubble_areas[i] = 0; + for (i = bubble_min_radius; i <= (bubble_max_radius+1); i++) + bubble_areas[i] = calc_bubble_area(i); + + mesh_length = (2 * bubble_max_radius) + 3; + } else { +#ifndef HAVE_XPM + fprintf(stderr, + "Bug: simple mode code not set but HAVE_XPM not defined\n"); + exit(1); +#else + /* Make sure all #ifdef sort of things have been taken care of in + get_resources(). */ + if (use_default_bubble) { +#ifdef NO_DEFAULT_BUBBLE + fprintf(stderr, + "Bug: use_default_bubble and NO_DEFAULT_BUBBLE both defined\n"); + exit(1); +#else + default_to_pixmaps(); +#endif /* NO_DEFAULT_BUBBLE */ + + /* Set mesh length */ + mesh_length = (2 * step_pixmaps[num_bubble_pixmaps-1]->radius) + 3; + } else { +#ifdef BUBBLES_IO + if (! regular_file(pixmap_file)) { + /* perror() in regular_file printed error message */ + exit(1); + } + uncompress_file(pixmap_file, uncompressed); + read_file_to_pixmaps(uncompressed); + if (strcmp(pixmap_file, uncompressed)) + unlink(uncompressed); + + mesh_length = (2 * step_pixmaps[num_bubble_pixmaps-1]->radius) + 3; +#else + fprintf(stderr, + "Bug: use_default_bubble is not defined yet I/O is not compiled in\n"); + exit(1); +#endif /* BUBBLES_IO */ + } +#endif /* HAVE_XPM */ + + /* Am I missing something in here??? */ + } + + mesh_width = (screen_width / mesh_length) + 1; + mesh_height = (screen_height / mesh_length) + 1; + mesh_cells = mesh_width * mesh_height; + init_mesh(); + + calculate_adjacent_list(); + + adjust_areas(); + + /* Graphics contexts for simple mode */ + if (simple) { + gcv.foreground = default_fg_pixel; + draw_gc = XCreateGC (dpy, window, GCForeground, &gcv); + gcv.foreground = default_bg_pixel; + erase_gc = XCreateGC (dpy, window, GCForeground, &gcv); + } + + XClearWindow (dpy, window); +} + +static void +bubbles (Display *dpy, Window window) +{ + Bubble *tmp; + + tmp = new_bubble(); + add_to_mesh(tmp); + insert_new_bubble(tmp); + + XSync (dpy, True); +} + + +void +screenhack (Display *dpy, Window window) +{ + init_bubbles (dpy, window); + while (1) { + bubbles (dpy, window); + if (delay) + usleep(delay); + } +} + diff --git a/hacks/bubbles.h b/hacks/bubbles.h new file mode 100644 index 00000000..89935f45 --- /dev/null +++ b/hacks/bubbles.h @@ -0,0 +1,214 @@ +/* bubbles.h - definitions for bubbles screensaver */ + +/* $Id: bubbles.h,v 1.2 1997/05/19 03:26:05 jwz Exp $ */ + +#ifndef _BUBBLES_H_ +#define _BUBBLES_H_ + +#ifdef HAVE_XPM +#include +#endif + +/*************************************************************************** + * Options you might like to change to affect the program's behaviour * + ***************************************************************************/ + +/* + * Uncommenting the following will enable support for reading bubbles from + * files (using the -file and -directory options to bubbles). This is + * disabled by default since such operations are inherently non-portable + * and we want the program to compile on as many systems as possible. + * + * If you uncomment this and you figure out how to get it working, please + * let me (J.Macnicol@student.anu.edu.au) know. Diffs against the standard + * distribution would be appreciated. Possible sources of problems are + * dirent and possibly the use of tmpnam(). + */ + +/* #define BUBBLES_IO */ + +/* + * The following only makes sense if BUBBLES_IO above is defined. + * + * Uncomment the following if you always want to use the -file or + * -directory options on the command line and never to use a default bubble + * compiled into the program. This way you would save memory and disk space + * since if you do use -file or -directory only one bubble will be loaded + * into memory at any one time (and remember the default bubble is really + * uncompressed, unlike bubbles in files which can be compressed). This + * is disabled by default only so people running the program for the first + * time with no knowldege of the command line options don't get error + * messages ;) + * + * NOTE: You will still need to have a bubbles_default.c file, else the + * build sequence will fail. Well constructed bubbles_default.c files + * have #ifdef's which simply exclude everything else in the file at + * compile time. The bubblestodefault script does this. + */ + +/* #define NO_DEFAULT_BUBBLE */ + +/* + * This turns on any debugging messages and sanity checks. Hopefully you + * won't need this :) It slows things down a bit, too. + * + * NOTE: If you uncomment this you will get some messages about unused + * functions when you compile. You can ignore these - they refer to + * convenient checking routines which simply aren't called but are left + * in case someone wants to use them. + */ + +/* #define DEBUG */ + +/*************************************************************************** + * Things you might need to change to get things working right * + ***************************************************************************/ + +/* + * Name of the gzip binary. You shouldn't need to change this unless it's + * not in your PATH when the program is run, in which case you will need to + * substitute the full path here. Keep the double quotes else things won't + * compile! + */ + +#define GZIP "gzip" + +/* + * Likewise for the Bourne shell. + */ + +#define BOURNESH "sh" + +/* + * The name of the directory entry structure is different under Linux + * (under which this code is being developed) than other systems. The case + * alternate form here is that given in Kernighan & Ritchie's C book (which + * must be authoratitive, no?) + * + * 04/07/96 : People will have to hack this to get it working on some + * systems. I believe it doesn't work on SGI, for example. + */ + +#ifdef _POSIX_SOURCE +#define STRUCT_DIRENT struct dirent +#else +#define STRUCT_DIRENT Dirent +#endif + +/* + * The naming of fields in struct dirent also seems to differ from system to + * system. This may have to be extended to make things truly portable. + * What we want here is the name field from a dirent struct pointed to + * by "dp". + * + * 04/07/96 : See above. This may need to be changed too. + */ + +#ifdef _POSIX_SOURCE +#define DIRENT_NAME dp->d_name +#else +#define DIRENT_NAME dp->name +#endif + +/* I don't know why this isn't defined. */ +#ifdef linux +/* apparently it is defined in recent linuxes. who knows. */ +/*extern char *tempnam(char *, char *);*/ +#endif + +/**************************************************************************** + * Buffer lengths and things you probably won't need to touch * + ****************************************************************************/ + +/* Maximum length of a full path name we can deal with */ +#define PATH_BUF_SIZE 1024 + +/* Size of string passed to shell as command */ +#define COMMAND_BUF_SIZE 2500 + +/* Size increments for read_line() buffers */ +#define READ_LINE_BUF_SIZE 24 + +/**************************************************************************** + * End of options * + ****************************************************************************/ + +/* Some machines define M_PI and not PI. If they don't define either, use +own own. Really, the accuracy of this is _not_ very important. */ +#ifndef PI +# define PI M_PI +# ifndef M_PI +# define M_PI 3.1415926535 +# endif +#endif + +/* for delete_bubble_in_mesh() */ +#define DELETE_BUBBLE 0 +#define KEEP_BUBBLE 1 + +/* Status codes for read_line */ +#define LINE_READ 0 +#define EOF_REACHED 1 +#define IO_ERROR 2 + +/* + * Magic number for Bubble struct, in case it's trashed when debugging code + * (which happened to me often.... :( + */ + +#define BUBBLE_MAGIC 5674 + +/* Useful macros */ +#define MAX(A, B) ((A) > (B) ? (A) : (B)) +#define MIN(A, B) ((A) < (B) ? (A) : (B)) + +/* How we represent bubbles */ +struct bub { + int radius; + int step; /* for rendered bubbles */ + long area; + int x; + int y; + int magic; + int cell_index; + int visible; + struct bub *next; + struct bub *prev; +}; + +typedef struct bub Bubble; + +/* + * How we represent pixmaps of rendered bubbles. Because the range of radii + * available may not be continuous, we call each a step (for the lack of a + * better name...) + */ + +#ifdef HAVE_XPM +struct bub_step { + int radius; + long area; + Pixmap ball, shape_mask; + GC draw_gc, erase_gc; + XpmAttributes xpmattrs; + struct bub_step *next; +}; + +typedef struct bub_step Bubble_Step; +#endif /* HAVE_XPM */ + +/* Make sure default bubble isn't compiled when we don't have XPM +Disable file I/O code too. */ +#ifndef HAVE_XPM +# define NO_DEFAULT_BUBBLE +# undef BUBBLES_IO +#endif /* HAVE_XPM */ + +/* Make sure default bubble is compiled in when we have XPM and no file I/O */ +#ifdef HAVE_XPM +# ifndef BUBBLES_IO +# undef NO_DEFAULT_BUBBLE +# endif /* BUBBLES_IO */ +#endif /* HAVE_XPM */ + +#endif /* _BUBBLES_H_ */ diff --git a/hacks/bubbles.man b/hacks/bubbles.man new file mode 100644 index 00000000..c9016e64 --- /dev/null +++ b/hacks/bubbles.man @@ -0,0 +1,142 @@ +.de EX \"Begin example +.ne 5 +.if n .sp 1 +.if t .sp .5 +.nf +.in +.5i +.. +.de EE +.fi +.in -.5i +.if n .sp 1 +.if t .sp .5 +.. +.TH XScreenSaver 1 "14-Dec-95" "X Version 11" +.SH NAME +bubbles - frying pan / soft drink simulation +.SH SYNOPSIS +.B bubbles +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-simple] [\-broken] [\-3D] [\-file filename] [\-directory directoryname] +.SH DESCRIPTION +\fIBubbles\fP sprays lots of little random bubbles all over the window which +then grow until they reach their maximum size and go pop. The inspiration +for this was watching little globules of oil on the bottom of a frying pan +and it also looks a little like bubbles in fizzy soft drink. The default +mode uses fancy ray-traced bubbles but there is also a mode which just draws +circles in case the default mode is too taxing on your hardware. +.SH OPTIONS +Depending on how your +.I bubbles +was compiled, it accepts the following options: +.TP 8 +.B \-foreground +Colour of circles if \fI\-simple\fP mode is selected. +.TP 8 +.B \-background +Colour of window background. +.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 \-delay microseconds +How much of a delay should be introduced between steps of the animation. +Default 1, or about 1 microsecond. Actually, this is the delay between each +group of 15 new bubbles since such a delay between each step results in a +very slow animation rate. +.TP 8 +.B \-nodelay +Same as \fI\-delay 0\fP. +.TP 8 +.B \-simple +Don't use the default fancy pixmap bubbles. Just draw circles instead. +This may give more bearable performance if your hardware wasn't made for +this sort of thing. +.TP 8 +.B \-broken +Don't hide bubbles when they pop. This was a bug during development +but the results were actually quite attractive. (This option is only +available if you have the XPM library available and the imake generated +Makefile has defined HAVE_XPM). +.TP 8 +.B \-3D +Normally, the simulation is done completely in two dimensions. When a +bubble swallows up another bubble, the areas of each are added to get +the area of the resulting bubble. This option changes the algorithm +to instead add volume (imagining each to be a sphere in 3D space). The +whole thing looks more realistic but I find it attracts attention to +the flickering of each bubble as they are move and are redrawn. Your +mileage may vary. +.TP 8 +.B \-file filename +Use the pixmap definitions in the given file, instead of the default (if +one is compiled in). This is ignored if \fI\-simple\fP is specified. If +the file is compressed (either with compress or gzip), it is decompressed +before use. (This option only works if you have XPM compiled into your +binary and you have compiled with BUBBLES_IO set in bubbles.h. This is +\fBnot\fP the default). +.TP 8 +.B \-directory directoryname +Similar to \fI-file\fP except the file is taken randomly from the +contents of the specified directory. (Again, this option is only available +if you have XPM and BUBBLES_IO was set when compiling. See above). +.TP 8 +.B \-quiet +Don't print messages explaining why one or several command line options +were ignored. This is disabled by default. +.SH NOTES +If you find the pace of things too slow, remember that there is a delay +even though you specify no \fI\-delay\fP option. Try using \fI\-nodelay\fP +although beware of the effects of irritation of other users if you're on a +shared system as you bleed their CPU time away. + +Some tools to assist in creation of new bubbles are included in the source +distribution. These can either be loaded with the \fI\-file\fP or +\fI\-directory\fP options (if available) or they can be used in place +of the distributed default bubble (bubble_default.c). +You might like to copy these scripts to a permanent location and +use them. Read bubbles.README. + +Rendered bubbles are not supported on monochrome displays. I'm not +convinced that small bubbles, even dithered properly are going to look +like anything more than a jumble of random dots. +.SH BUGS +There is a delay before something appears on the screen when using +rendered bubbles. The XPM library seems to take a \fBlong\fP time to make +pixmaps out of raw data. This can be irritating on slower systems. + +The movement of the bubbles looks jerky if an incomplete set of bubbles +is used. + +The hide/display algorithm could do with some work to avoid flickering +when \fI\-nodelay\fP is set. +.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 DISTRIBUTION POLICY +This work is Copyright \(co 1995, 1996 by James Macnicol. Distribution is +allowed under the terms of the GNU General Public License. Look at the +sources for the legalese. +.SH AUTHOR +James Macnicol . diff --git a/hacks/bubbles_default.c b/hacks/bubbles_default.c new file mode 100644 index 00000000..172abd1f --- /dev/null +++ b/hacks/bubbles_default.c @@ -0,0 +1,2127 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include "bubbles.h" + +#ifndef NO_DEFAULT_BUBBLE + +/* XPM */ +static char *glass1[] = { +/* width height ncolors chars_per_pixel */ +"10 10 61 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #29293F", +"`c c #2C2C63", +"`d c #353579", +"`e c #242447", +"`f c #222245", +"`g c #25253E", +"`h c #1C1C3F", +"`i c #2B2B47", +"`j c #252544", +"`k c #222251", +"`l c #323264", +"`m c #212146", +"`n c #37374B", +"`o c #22223D", +"`p c #252536", +"`q c #232337", +"`r c #34346C", +"`s c #303068", +"`t c #26264A", +"`u c #5D5D97", +"`v c #363674", +"`w c #2C2C6A", +"`x c #2E2E5B", +"`y c #242451", +"`z c #343464", +"a` c #3C3C6F", +"aa c #353572", +"ab c #38386B", +"ac c #242454", +"ad c #181831", +"ae c #28285B", +"af c #37377A", +"ag c #20203F", +"ah c #26265C", +"ai c #4C4C60", +"aj c #383874", +"ak c #333379", +"al c #444458", +"am c #272756", +"an c #32326E", +"ao c #30306C", +"ap c #40407F", +"aq c #292944", +"ar c #212150", +"as c #323271", +"at c #2D2D76", +"au c #21213F", +"av c #25255A", +"aw c #35356D", +"ax c #313169", +"ay c #2C2C6E", +"az c #18182C", +"b` c #232344", +"ba c #292961", +"bb c #202037", +"bc c #1C1C33", +"bd c #242452", +"be c #45456F", +"bf c #242455", +/* pixels */ +"``````aibebebeal````", +"`````n`zaw`ua``l`n``", +"```i`xab`wasaj`r`x`q", +"``auaean`daf`vao`c`t", +"```haxahayatakbaaeb`", +"``adbfav`wapao`sam`m", +"``azagaracaaae`k`fbc", +"````bb`ybd`aar`e`o``", +"```````paq`j`b`g````", +"````````````````````" +}; +/* XPM */ +static char *glass2[] = { +/* width height ncolors chars_per_pixel */ +"12 12 75 2", +/* colors */ +"`` c None", +"`a c #25254C", +"`b c #23234A", +"`c c #212148", +"`d c #2E2E62", +"`e c #29293F", +"`f c #272754", +"`g c #414188", +"`h c #20202C", +"`i c #2E2E68", +"`j c #242447", +"`k c #25253E", +"`l c #B9B9ED", +"`m c #6767A3", +"`n c #2B2B47", +"`o c #29295C", +"`p c #252544", +"`q c #29295F", +"`r c #1F1F3E", +"`s c #2F2F68", +"`t c #2D2D66", +"`u c #30305F", +"`v c #4C4C6D", +"`w c #2B2B53", +"`x c #2F2F6E", +"`y c #34346C", +"`z c #3B3B55", +"a` c #303068", +"aa c #2C2C64", +"ab c #26264A", +"ac c #5D5D97", +"ad c #363674", +"ae c #3C3C66", +"af c #252556", +"ag c #30306E", +"ah c #3E3E54", +"ai c #2C2C6A", +"aj c #4C4C68", +"ak c #20204A", +"al c #2E2E5B", +"am c #343464", +"an c #16162C", +"ao c #292938", +"ap c #333384", +"aq c #3C3C6F", +"ar c #1E1E37", +"as c #38386B", +"at c #242454", +"au c #31316E", +"av c #181831", +"aw c #232349", +"ax c #272739", +"ay c #23234C", +"az c #37377A", +"b` c #1E1E3D", +"ba c #313174", +"bb c #3C3C78", +"bc c #383874", +"bd c #1B1B33", +"be c #40407F", +"bf c #292944", +"bg c #212150", +"bh c #2D2D76", +"bi c #191937", +"bj c #313169", +"bk c #22224D", +"bl c #18182C", +"bm c #2D2D65", +"bn c #232344", +"bo c #292961", +"bp c #27275F", +"bq c #242452", +"br c #484868", +"bs c #262657", +"bt c #242455", +/* pixels */ +"`````````vajajajbr``````", +"````ahaeae`yacasaq`zah``", +"`````w`f`dagacbb`y`u`u``", +"```naybm`i`mbabcaaamawar", +"``bf`ua`adbpaz`gai`ial`j", +"``bnbgbjaz`xbhapboaa`uav", +"``b`aybtbcaube`x`s`tbqbd", +"``anbiakafbb`l`i`q`o`rbl", +"`````rakbkaf`wbsay`c`k``", +"````ao`pay`aatab`bar`h``", +"````````ax`e`n`kax``````", +"````````````````````````" +}; +/* XPM */ +static char *glass3[] = { +/* width height ncolors chars_per_pixel */ +"14 14 90 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #383858", +"`c c #2E2E62", +"`d c #292967", +"`e c #3535A1", +"`f c #272751", +"`g c #23234D", +"`h c #29293F", +"`i c #353579", +"`j c #272754", +"`k c #20202C", +"`l c #2E2E3D", +"`m c #242447", +"`n c #25253E", +"`o c #3E3E67", +"`p c #1C1C3F", +"`q c #6767A3", +"`r c #2B2B47", +"`s c #29295C", +"`t c #2B2B61", +"`u c #29295F", +"`v c #1F1F3E", +"`w c #2F2F68", +"`x c #2D2D66", +"`y c #222251", +"`z c #2D2D69", +"a` c #33335B", +"aa c #37374B", +"ab c #22223D", +"ac c #28285A", +"ad c #2B2B53", +"ae c #2C2C36", +"af c #424266", +"ag c #232337", +"ah c #525265", +"ai c #32326A", +"aj c #1B1B2F", +"ak c #303068", +"al c #232351", +"am c #363674", +"an c #3C3C66", +"ao c #252556", +"ap c #27275B", +"aq c #363663", +"ar c #4C4C68", +"as c #2E2E5B", +"at c #29294C", +"au c #27274A", +"av c #252548", +"aw c #16162C", +"ax c #292938", +"ay c #353572", +"az c #38386B", +"b` c #4C4C85", +"ba c #2F2F83", +"bb c #20203F", +"bc c #313174", +"bd c #333379", +"be c #444458", +"bf c #272756", +"bg c #47477C", +"bh c #32326E", +"bi c #1B1B33", +"bj c #30306C", +"bk c #40407F", +"bl c #23233E", +"bm c #141422", +"bn c #343473", +"bo c #2D2D76", +"bp c #2E2E6D", +"bq c #40406E", +"br c #21213F", +"bs c #8080BA", +"bt c #25255A", +"bu c #1B1B39", +"bv c #35356D", +"bw c #262651", +"bx c #18182C", +"by c #373786", +"bz c #2B2B63", +"c` c #202037", +"ca c #1C1C33", +"cb c #242452", +"cc c #484868", +"cd c #1F1F43", +"ce c #2C2C5D", +"cf c #3535DD", +"cg c #262657", +"ch c #242455", +/* pixels */ +"``````````arccaharcc````````", +"``````bea``obqbqbqanafaa````", +"`````ladaqbv`qbsbgai`ca``b``", +"````a`a`asaib`bhb`bhakasau``", +"``c``j`c`d`dbd`eb`am`wce`aca", +"``bxasaobt`ibdbycf`iay`u`abx", +"``bl`a`t`ubnbdbocfbcbt`cbwbu", +"``bi`fch`sbhbkbabp`z`u`w`gaj", +"``bm`a`a`u`xbjaibgbzcgbf`paw", +"````agbralazap`t`ucbacbbaj``", +"`````kbrcdcbcbcgbw`y`vab`k``", +"``````axbrauatav`r`m`n`n````", +"``````````ax`h`r`nae````````", +"````````````````````````````" +}; +/* XPM */ +static char *glass4[] = { +/* width height ncolors chars_per_pixel */ +"20 20 151 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #292967", +"`h c #3535A1", +"`i c #29293F", +"`j c #2C2C63", +"`k c #2A2A61", +"`l c #33334C", +"`m c #353579", +"`n c #272754", +"`o c #20202C", +"`p c #2E2E3D", +"`q c #2E2E68", +"`r c #242447", +"`s c #2C2C66", +"`t c #222245", +"`u c #181824", +"`v c #25253E", +"`w c #B9B9ED", +"`x c #1C1C3F", +"`y c #6767A3", +"`z c #2B2B47", +"a` c #272743", +"aa c #222248", +"ab c #292931", +"ac c #29295C", +"ad c #1D1D39", +"ae c #252544", +"af c #2B2B61", +"ag c #29295F", +"ah c #1F1F3E", +"ai c #2F2F68", +"aj c #2D2D66", +"ak c #30305F", +"al c #2C2C5B", +"am c #11111C", +"an c #262655", +"ao c #31316D", +"ap c #4C4C6D", +"aq c #222251", +"ar c #323264", +"as c #43436E", +"at c #212146", +"au c #37374B", +"av c #22223D", +"aw c #252536", +"ax c #1D1D42", +"ay c #2A2A5C", +"az c #28285A", +"b` c #2B2B53", +"ba c #333372", +"bb c #2F2F6E", +"bc c #2B2B3F", +"bd c #2C2C36", +"be c #232337", +"bf c #34346C", +"bg c #525265", +"bh c #32326A", +"bi c #303068", +"bj c #21214C", +"bk c #2C2C64", +"bl c #292957", +"bm c #232351", +"bn c #26264A", +"bo c #2F2F60", +"bp c #5D5D97", +"bq c #363674", +"br c #3C3C66", +"bs c #252556", +"bt c #30306E", +"bu c #414178", +"bv c #2C2C6A", +"bw c #20204A", +"bx c #2E2E5B", +"by c #29294C", +"bz c #242451", +"c` c #27274A", +"ca c #343464", +"cb c #4F4F64", +"cc c #252548", +"cd c #292938", +"ce c #333384", +"cf c #3C3C6F", +"cg c #353572", +"ch c #1E1E37", +"ci c #38386B", +"cj c #414156", +"ck c #242454", +"cl c #181831", +"cm c #232349", +"cn c #272739", +"co c #4C4C85", +"cp c #2F2F83", +"cq c #28285B", +"cr c #36366C", +"cs c #48486D", +"ct c #23234C", +"cu c #37377A", +"cv c #20203F", +"cw c #26265C", +"cx c #313174", +"cy c #4C4C60", +"cz c #27273F", +"d` c #3C3C78", +"da c #48485C", +"db c #383874", +"dc c #333379", +"dd c #444458", +"de c #272756", +"df c #32326E", +"dg c #1B1B33", +"dh c #1E1E2C", +"di c #30306C", +"dj c #40407F", +"dk c #292944", +"dl c #212150", +"dm c #141422", +"dn c #323271", +"do c #2D2D76", +"dp c #2E2E6D", +"dq c #21213F", +"dr c #8080BA", +"ds c #23232D", +"dt c #25255A", +"du c #35356D", +"dv c #191937", +"dw c #262651", +"dx c #313169", +"dy c #2C2C6E", +"dz c #22224D", +"e` c #18182C", +"ea c #373786", +"eb c #232344", +"ec c #2B2B63", +"ed c #292961", +"ee c #202037", +"ef c #1C1C33", +"eg c #242452", +"eh c #45456F", +"ei c #535380", +"ej c #1F1F43", +"ek c #2C2C5D", +"el c #3535DD", +"em c #262657", +"en c #393963", +"eo c #242455", +/* pixels */ +"``````````````cycyapbgcbcybg````````````", +"``````````dacycsehcsehapehcsddcj````````", +"````````au`cenbraseicibucicibrendd``````", +"``````auau`ccacidudrbpdrcfcrarakau`p````", +"`````p`lbx`nbhbfdxcobpcodjdu`sakalb`bd``", +"`````zbybxbocicgbvbbdn`ydbdfbfekbxbybe``", +"``dh`r`rbl`faidydndn`hd`dnbtecafakdwah`o", +"``dhdqejcqajdfcg`meacu`hbqdfdibi`jblbndh", +"``ch`rbxemaidudnbq`geldcbqdbdn`jafbxbnav", +"``dm`x`bdxdxcwbqdycpdocxdcbvedbkcqalebdg", +"```uccctdzbsag`qbqdpeacxbtaidiagekdwcvdm", +"``dmcl`xeoandtdfbv`wdjcediecbiaydectatch", +"``amdvcm`xaf`kagaodi`qdbbaecanazejdvdv`u", +"````e``xcvandlcqckdtcgagcq`qaqay`tbjef``", +"````dsclaxbwdzdebsckb`acegbjeg`eaaadds``", +"``````eeeeejbzanegdw`abmdl`b`rcnavaw````", +"````````eeczbc`b`dby`dbya``eae`iaw``````", +"``````````bdawa`dkc`aeae`i`i`vab````````", +"``````````````bd`pcdcdbdcdbd````````````", +"````````````````````````````````````````" +}; +/* XPM */ +static char *glass5[] = { +/* width height ncolors chars_per_pixel */ +"24 24 164 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #292967", +"`h c #3535A1", +"`i c #272751", +"`j c #23234D", +"`k c #29293F", +"`l c #2C2C63", +"`m c #2A2A61", +"`n c #33334C", +"`o c #272754", +"`p c #414188", +"`q c #20202C", +"`r c #2E2E3D", +"`s c #1C1C28", +"`t c #2E2E68", +"`u c #242447", +"`v c #2C2C66", +"`w c #181824", +"`x c #25253E", +"`y c #161622", +"`z c #B9B9ED", +"a` c #3E3E67", +"aa c #1C1C3F", +"ab c #6767A3", +"ac c #2B2B47", +"ad c #222248", +"ae c #292931", +"af c #29295C", +"ag c #252544", +"ah c #1E1E47", +"ai c #2B2B61", +"aj c #29295F", +"ak c #1F1F3E", +"al c #2F2F68", +"am c #2D2D66", +"an c #30305F", +"ao c #2C2C5B", +"ap c #11111C", +"aq c #262655", +"ar c #31316D", +"as c #4C4C6D", +"at c #323264", +"au c #2D2D69", +"av c #33335B", +"aw c #212146", +"ax c #37374B", +"ay c #22223D", +"az c #252536", +"b` c #1D1D42", +"ba c #28285A", +"bb c #2B2B53", +"bc c #333372", +"bd c #2F2F6E", +"be c #2C2C36", +"bf c #424266", +"bg c #232337", +"bh c #2F2FB0", +"bi c #34346C", +"bj c #525265", +"bk c #32326A", +"bl c #1B1B2F", +"bm c #3B3B55", +"bn c #303068", +"bo c #21214C", +"bp c #2C2C64", +"bq c #292957", +"br c #26264A", +"bs c #202044", +"bt c #5D5D97", +"bu c #2B2B5C", +"bv c #363674", +"bw c #3C3C66", +"bx c #252556", +"by c #30306E", +"bz c #3E3E54", +"c` c #2C2C6A", +"ca c #25252E", +"cb c #27275B", +"cc c #363663", +"cd c #4C4C68", +"ce c #20204A", +"cf c #2E2E5B", +"cg c #29294C", +"ch c #242451", +"ci c #27274A", +"cj c #343464", +"ck c #252548", +"cl c #16162C", +"cm c #292938", +"cn c #333384", +"co c #3C3C6F", +"cp c #353572", +"cq c #1E1E37", +"cr c #38386B", +"cs c #414156", +"ct c #242454", +"cu c #31316E", +"cv c #181831", +"cw c #232349", +"cx c #272739", +"cy c #4C4C85", +"cz c #2F2F83", +"d` c #28285B", +"da c #292952", +"db c #48486D", +"dc c #23234C", +"dd c #37377A", +"de c #1E1E3D", +"df c #26265C", +"dg c #313174", +"dh c #4C4C60", +"di c #27273F", +"dj c #3C3C78", +"dk c #48485C", +"dl c white", +"dm c #383874", +"dn c #333379", +"do c #444458", +"dp c #272756", +"dq c #1B1B33", +"dr c #1E1E2C", +"ds c #30306C", +"dt c #40407F", +"du c #292944", +"dv c #212150", +"dw c #23233E", +"dx c #343473", +"dy c #323271", +"dz c #2D2D76", +"e` c #2E2E6D", +"ea c #40406E", +"eb c #21213F", +"ec c #8080BA", +"ed c #23232D", +"ee c #25255A", +"ef c #35356D", +"eg c #191937", +"eh c #262651", +"ei c #313169", +"ej c #2C2C6E", +"ek c #22224D", +"el c #18182C", +"em c #373786", +"en c #2D2D65", +"eo c #232344", +"ep c #2B2B63", +"eq c #292961", +"er c #27275F", +"es c #1C1C33", +"et c #242452", +"eu c #45456F", +"ev c #484868", +"ew c #1F1F43", +"ex c #2C2C5D", +"ey c #3535DD", +"ez c #262657", +"f` c #393963", +"fa c #242455", +/* pixels */ +"``````````````````dkdhbjbjbjbjdh````````````````", +"``````````````csasascdevcdascddbevdh````````````", +"``````````dodobfa`dbeubfeueueacrbfbfcsax````````", +"````````bzcsbwf`bwcrbicobteccratcof`bmbzbz``````", +"```````n`navavanefcjbibt`zcrcobicratccf``nax````", +"``````acbbao`oat`fambycobtdldjbkbialan`can`n````", +"````dicg`icj`fbi`fefdyauarabbybiefbnaicfbbcg`x``", +"````ac`udcbqenbk`tdyabczdgdxdmdtbpcpcjeicwcgcq``", +"```wdq`acfaiefcpe`bydn`hcyeydmc`ambcef`fcf`u`y`s", +"```ydudaandfbnaubvdgerbhdd`h`pdyc`cu`tezcf`b`ubl", +"``elad`abqezbndmdsbccncnczeydnbvdmdxamep`fcgcv`w", +"```weoetdv`leidfdd`gbddzdzdncncneqeebpexan`ucvap", +"``elcwdaexehd`epaubd`hdz`hcz`gdycucueeba`oekcl`w", +"``eldebsdcbxfaeedmejcuemdtcnbdbyalafambuet`bdq`w", +"```yclakboce`fbx`mcper`veccyauei`mbncbaqdpdaesap", +"````clakegbsceetbxdsdjdt`zbt`tctajdvafahakayel``", +"````eldqdeebetboenepetezbnbxencb`lbaeteoaabldr``", +"``````blakb`ceetekambxctbbafezctdcbo`eew`xcq````", +"``````ed`qakbsawekchchchetd``jboceaddwcxesed````", +"````````cmazag`xdcek`bchctetbrci`deocqbg`q``````", +"```````````qbgayckaybr`uacek`beo`x`xazca````````", +"``````````````aecxdi`kagacag`xcxcxcm````````````", +"``````````````````ca`rcmbebebeae````````````````", +"````````````````````````````````````````````````" +}; +/* XPM */ +static char *glass6[] = { +/* width height ncolors chars_per_pixel */ +"30 30 181 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #3535A1", +"`h c #23234D", +"`i c #29293F", +"`j c #2C2C63", +"`k c #2A2A61", +"`l c #33334C", +"`m c #353579", +"`n c #272754", +"`o c #20202C", +"`p c #2E2E3D", +"`q c #1C1C28", +"`r c #2E2E68", +"`s c #242447", +"`t c #2C2C66", +"`u c #222245", +"`v c #181824", +"`w c #25253E", +"`x c #161622", +"`y c #B9B9ED", +"`z c #3E3E67", +"a` c #1C1C3F", +"aa c #6767A3", +"ab c #2B2B47", +"ac c #272743", +"ad c #292931", +"ae c #29295C", +"af c #1D1D39", +"ag c #252544", +"ah c #1E1E47", +"ai c #2B2B61", +"aj c #29295F", +"ak c #1F1F3E", +"al c #2F2F68", +"am c #2D2D66", +"an c #30305F", +"ao c #2C2C5B", +"ap c #11111C", +"aq c #262655", +"ar c #31316D", +"as c #4C4C6D", +"at c #222251", +"au c #323264", +"av c #2D2D69", +"aw c #33335B", +"ax c #43436E", +"ay c #2B2B67", +"az c #212146", +"b` c #37374B", +"ba c #22223D", +"bb c #252536", +"bc c #1D1D42", +"bd c #28285A", +"be c #2B2B53", +"bf c #333372", +"bg c #2F2F6E", +"bh c #2C2C36", +"bi c #424266", +"bj c #232337", +"bk c #2F2FB0", +"bl c #34346C", +"bm c #525265", +"bn c #32326A", +"bo c #1B1B2F", +"bp c #3B3B55", +"bq c #303068", +"br c #21214C", +"bs c #2C2C64", +"bt c #292957", +"bu c #232351", +"bv c #26264A", +"bw c #2F2F60", +"bx c #202044", +"by c #5D5D97", +"bz c #2B2B5C", +"c` c #363674", +"ca c #3C3C66", +"cb c #252556", +"cc c #30306E", +"cd c #3E3E54", +"ce c #414178", +"cf c #2C2C6A", +"cg c #2F2F4F", +"ch c #25252E", +"ci c #27275B", +"cj c #363663", +"ck c #4C4C68", +"cl c #20204A", +"cm c #2E2E5B", +"cn c #29294C", +"co c #242451", +"cp c #27274A", +"cq c #343464", +"cr c #4F4F64", +"cs c #252548", +"ct c #16162C", +"cu c #292938", +"cv c #333384", +"cw c #3C3C6F", +"cx c #353572", +"cy c #1E1E37", +"cz c #38386B", +"d` c #414156", +"da c #242454", +"db c #31316E", +"dc c #181831", +"dd c #232349", +"de c #272739", +"df c #393979", +"dg c #4C4C85", +"dh c #2F2F83", +"di c #28285B", +"dj c #292952", +"dk c #36366C", +"dl c #48486D", +"dm c #23234C", +"dn c #37377A", +"do c #20203F", +"dp c #1E1E3D", +"dq c #26265C", +"dr c #313174", +"ds c #4C4C60", +"dt c #27273F", +"du c #3C3C78", +"dv c #48485C", +"dw c white", +"dx c #383874", +"dy c #333379", +"dz c #444458", +"e` c #272756", +"ea c #47477C", +"eb c #32326E", +"ec c #1E1E2C", +"ed c #30306C", +"ee c #40407F", +"ef c #292944", +"eg c #212150", +"eh c #23233E", +"ei c #141422", +"ej c #343473", +"ek c #323271", +"el c #2D2D76", +"em c #2E2E6D", +"en c #40406E", +"eo c #21213F", +"ep c #272731", +"eq c #8080BA", +"er c #23232D", +"es c #25255A", +"et c #1B1B39", +"eu c #35356D", +"ev c #191937", +"ew c #262651", +"ex c #313169", +"ey c #2C2C6E", +"ez c #22224D", +"f` c #18182C", +"fa c #373786", +"fb c #2D2D65", +"fc c #232344", +"fd c #2B2B63", +"fe c #292961", +"ff c #27275F", +"fg c #202037", +"fh c #1C1C33", +"fi c #242452", +"fj c #45456F", +"fk c #484868", +"fl c #535380", +"fm c #1F1F43", +"fn c #2C2C5D", +"fo c #353573", +"fp c #262657", +"fq c #393963", +"fr c #242455", +/* pixels */ +"````````````````````````bmbmbmbmbmbmbm``````````````````````", +"``````````````````dscrasasascrckasasasfkckbm````````````````", +"````````````````dsdsdzbifjfjfjfjaxaxfjfjckdzdv``````````````", +"````````````d`dvfqdzenfkfjencaendlaxaxcabibi`zdvb```````````", +"``````````cd`zaw`cfqcacaceflczbydg`zencjcwca`cbpbpcd````````", +"````````d`cdb``cawcqczdkeubycwbyczdwcwczcqaucaawb`b`b```````", +"````````b``lcmcqaoczaublbndgeqdfeqczdgbn`jcmanfnawcg`l``````", +"``````cu`w`wcmcmcqblardxeu`yceareqdueualbleuexdjcmbeba`p````", +"````chabcg`acmbwbqczaiebcfdfdgekeqdudxebcxblbncmcm`ababjer``", +"`````o`aeodmaobdalbn`rcfdf`mdhdrdyeaejdubscxffbwbwdd`b`w`q``", +"````fhbadjcmbq`jcxcxekemeydr`gdy`geeekek`t`rexe`e``ndjdcdc``", +"```q`veocnbtdialbleb`rfo`medfadnelbkc`bffeedeufn`jcmfmbvfg`x", +"``ecbo`sbze`feaeayexavbgej`gbkdyeydhdudnemdbfdal`kfna``udc`v", +"```xeieodjbtfpexfbc`avekbg`gbkelfa`g`gdxcxcfdxamfpbtcpfcdoap", +"```vcya`btegex`kbldqdncfeycvdyelcv`gdycvfefeebaedianfmfcdc`q", +"``fhcyetahfncobdbs`tbncfdybgcf`gdhcfavavav`tfraifnbtbteteoei", +"```xdpaz`bbtcl`fesfbedfdekelbkdhaaavbgcf`jfe`fesbwez`bbxdcei", +"```xfhdcbx`hfratbresfdedcfee`meedffded`t`tbqdiaee``nazazdcap", +"`````vdp`sew`bbqaifpfpdbbsccdxdfekbyee`j`jdialbzfidmazafct``", +"`````vbodpevbcaqbdatcb`tfdamar`ydg`taicbaje`dadaahaketevbo``", +"`````qf`bjakdobdezegfbaidacibncxdgbddiajalatfibz`ubccyfh`q``", +"``````chbjbcbcfmbdaediatcbfpfpajfpdaesfpbudmco`h`eewfhf`````", +"`````````ocydp`waz`e`baqfiesfpdjfpfiaidacpewah`wafdpbb``````", +"````````chfgfgfmddcofibdfi`bfi`ada`hegbu`h`seodtbafhec``````", +"``````````cuepdo`wefdmfidd`b`hdae``bbvcn`dagakbabj`o````````", +"````````````erbbdeefcsefcpabezcp`habef`sbx`wehbber``````````", +"````````````````chbbba`ief`iacagabef`i`wba`wcu``````````````", +"``````````````````chbb`p`p`w`w`pcu`p`icucuch````````````````", +"````````````````````````adadcudeepadbh``````````````````````", +"````````````````````````````````````````````````````````````" +}; +/* XPM */ +static char *glass7[] = { +/* width height ncolors chars_per_pixel */ +"36 36 187 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #292967", +"`h c #3535A1", +"`i c #272751", +"`j c #23234D", +"`k c #29293F", +"`l c #2C2C63", +"`m c #2A2A61", +"`n c #33334C", +"`o c #353579", +"`p c #272754", +"`q c #414188", +"`r c #20202C", +"`s c #2E2E3D", +"`t c #1C1C28", +"`u c #2E2E68", +"`v c #242447", +"`w c #2C2C66", +"`x c #222245", +"`y c #181824", +"`z c #25253E", +"a` c #161622", +"aa c #B9B9ED", +"ab c #3E3E67", +"ac c #1C1C3F", +"ad c #6767A3", +"ae c #2B2B47", +"af c #272743", +"ag c #222248", +"ah c #292931", +"ai c #29295C", +"aj c #1D1D39", +"ak c #252544", +"al c #1E1E47", +"am c #2B2B61", +"an c #29295F", +"ao c #1F1F3E", +"ap c #2F2F68", +"aq c #2D2D66", +"ar c #30305F", +"as c #2C2C5B", +"at c #11111C", +"au c #262655", +"av c #31316D", +"aw c #4C4C6D", +"ax c #222251", +"ay c #323264", +"az c #2D2D69", +"b` c #33335B", +"ba c #43436E", +"bb c #2B2B67", +"bc c #212146", +"bd c #37374B", +"be c #22223D", +"bf c #252536", +"bg c #1D1D42", +"bh c #2A2A5C", +"bi c #28285A", +"bj c #2B2B53", +"bk c #333372", +"bl c #2F2F6E", +"bm c #2B2B3F", +"bn c #2C2C36", +"bo c #424266", +"bp c #232337", +"bq c #2F2FB0", +"br c #34346C", +"bs c #525265", +"bt c #32326A", +"bu c #1B1B2F", +"bv c #3B3B55", +"bw c #303068", +"bx c #21214C", +"by c #2C2C64", +"bz c #292957", +"c` c #232351", +"ca c #26264A", +"cb c #2F2F60", +"cc c #202044", +"cd c #5D5D97", +"ce c #2B2B5C", +"cf c #363674", +"cg c #3C3C66", +"ch c #252556", +"ci c #30306E", +"cj c #3E3E54", +"ck c #414178", +"cl c #2C2C6A", +"cm c #2F2F4F", +"cn c #25252E", +"co c #27275B", +"cp c #363663", +"cq c #4C4C68", +"cr c #20204A", +"cs c #2E2E5B", +"ct c #29294C", +"cu c #242451", +"cv c #27274A", +"cw c #343464", +"cx c #4F4F64", +"cy c #252548", +"cz c #16162C", +"d` c #292938", +"da c #333384", +"db c #3C3C6F", +"dc c #353572", +"dd c #1E1E37", +"de c #38386B", +"df c #414156", +"dg c #242454", +"dh c #31316E", +"di c #181831", +"dj c #232349", +"dk c #272739", +"dl c #393979", +"dm c #4C4C85", +"dn c #2F2F83", +"do c #28285B", +"dp c #292952", +"dq c #48486D", +"dr c #23234C", +"ds c #37377A", +"dt c #1E1E3D", +"du c #26265C", +"dv c #313174", +"dw c #4C4C60", +"dx c #27273F", +"dy c #3C3C78", +"dz c #48485C", +"e` c white", +"ea c #383874", +"eb c #333379", +"ec c #444458", +"ed c #272756", +"ee c #47477C", +"ef c #32326E", +"eg c #1B1B33", +"eh c #1E1E2C", +"ei c #30306C", +"ej c #40407F", +"ek c #292944", +"el c #212150", +"em c #23233E", +"en c #141422", +"eo c #343473", +"ep c #323271", +"eq c #2D2D76", +"er c #2E2E6D", +"es c #40406E", +"et c #21213F", +"eu c #272731", +"ev c #8080BA", +"ew c #23232D", +"ex c #25255A", +"ey c #1B1B39", +"ez c #35356D", +"f` c #191937", +"fa c #262651", +"fb c #313169", +"fc c #2C2C6E", +"fd c #22224D", +"fe c #18182C", +"ff c #373786", +"fg c #2D2D65", +"fh c #232344", +"fi c #2B2B63", +"fj c #292961", +"fk c #27275F", +"fl c #202037", +"fm c #1C1C33", +"fn c #242452", +"fo c #45456F", +"fp c #484868", +"fq c #535380", +"fr c #1F1F43", +"fs c #2C2C5D", +"ft c #3535DD", +"fu c #353573", +"fv c #262657", +"fw c #393963", +"fx c #242455", +/* pixels */ +"````````````````````````````````bsbsbsdwbs``````````````````````````````", +"````````````````````````dwbsdwcqcxbscqdwcqcxdzcxbs``````````````````````", +"````````````````````fpcxawcqawcqawawcqawfocqcqawfpcqcx``````````````````", +"``````````````````ececfpfpbofodqdqdqesbababadqfobafpeccj````````````````", +"``````````````dfeccjabcgesbobaabadcgabbaeefobaesbob`cgdfcjcj````````````", +"````````````cjdfbvcgfwfwcgcgesbrevdbcdeeesdedbfwdbcgcpbvbvdfcj``````````", +"``````````bdbvbvcg`ccpcwdecwayckcdeecddydcbrezdecpayfwb`ar`ncjbd````````", +"```````````saecmcscpcscwbwaqayeaevfqdyckbtdefbcpeicscbcscpb`cmae````````", +"`````````scvbjcmar`pcsfb`fbt`fcidmdecdcdefdyezaqbraz`farasasarek`s``````", +"``````bnaecmdjayb`fscsbwaqfbbwdyaacddheacdfudbfbbrbtfbaqbzcsdpafcmcn````", +"```````s`zbj`basfs`fbr`f`wdcepeqcfcdfue`dmdvcdbkbkbrfb`fbwbjcaaect`z````", +"`````taeaoccdrcsfdfgbwbr`ubb`oadebdndvebe`eadsejbyavfgcwbtcsdjbjaeddbf``", +"````eudidjbzdp`pbzbwbbefeperfjdabldadada`qcfdveofi`wfb`fay`ped`aeteg`k``", +"`````yflfadpcsfs`lbrdcav`wcfeoepdsda`qbqebdydsepfiaveabwbz`maybc`abufe``", +"````fmek`aararaiambwbyefcfcfbqfkeqejds`gft`qeofuclfkbw`ubibtcs`bcv`vfe``", +"```ydi`v`xdpbzamaxaqfkavererbkfffcfc`hdaeqdscffudcclbkfgapanayaodpczeg`t", +"``atbpao`adpbzdo`mfgbtepereperfcbqft`g`hffbqbkdlfucleiaqfbdg`bctfrfmfea`", +"```yetfh`xdpelfbfsfbaz`mdsci`gblffdneqftebda`hdafjfjfgbybwdgardr`xdia`at", +"``ateheycccredfsaxfgcibbeffjejdafc`g`heqblfjepclazazap`wfscbbz`jacfrflat", +"``atczey`v`afsacfsdgco`lbb`gebffereqft`qffdaer`wfgfifififjbzcu`i`adda`at", +"````a`dtcy`xdrcrexfxfvfgeabkbbdhffadejdndnblclepapdubhaqfvcefn`xdtegfe``", +"````a`dieybxfnbx`jfsfxfkfgfgdheoev`qdncdfcdlfjfi`wfiapcuchaubzaceydiat``", +"````atdifr`abz`bbzbranaifneifufidyckejepckffepfibyaianancu`bbgbgagegen``", +"````atczegeyf`bgascrcrelchanefdyfieaaa`qaq`uexduanbhfxaicecraoemajfea```", +"```````tfebedtccaled`dcoaqdoamdeaiandydyaifi`mfbaqfdfnbh`pagfrddfmfe````", +"```````t`reydidjagbzaxchanfnaianchch`lbhcoaichauc`chdoelbgbgbcegfm`r````", +"`````````reyaoacetcrfn`afd`ffvchc`fvbjaianfvco`bdrdgbz`e`vbe`zeyeg``````", +"```````````regacem`vccfnbxc`cu`jbifnfvcoc`bi`ich`adjac`xflajemew````````", +"``````````ewbpbpdtaobcbc`jchbic``ac``afafafnfd`jfncybcdxdkbedd`r````````", +"````````````d`ddbeakfh`kdrfd`b`b`jcudged`bcacvct`dcyccddewd``r``````````", +"``````````````eubndddxdxakaecvcaae`ecaagaecvafcabcfhbp`keucn````````````", +"``````````````````d`flem`z`s`v`kbc`bekaeagaeetafekd`bmbf````````````````", +"`````````````````````s`zdk`zae`kdxakaeekek`zekbfdkd`bn``````````````````", +"````````````````````````bnbmd`dkdk`sbndxd`bmbfbnah``````````````````````", +"````````````````````````````````cnbneu`sah``````````````````````````````", +"````````````````````````````````````````````````````````````````````````" +}; +/* XPM */ +static char *glass8[] = { +/* width height ncolors chars_per_pixel */ +"44 44 189 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #292967", +"`h c #3535A1", +"`i c #272751", +"`j c #23234D", +"`k c #29293F", +"`l c #2C2C63", +"`m c #2A2A61", +"`n c #33334C", +"`o c #353579", +"`p c #272754", +"`q c #414188", +"`r c #20202C", +"`s c #2E2E3D", +"`t c #1C1C28", +"`u c #2E2E68", +"`v c #242447", +"`w c #2C2C66", +"`x c #222245", +"`y c #181824", +"`z c #25253E", +"a` c #161622", +"aa c #B9B9ED", +"ab c #3E3E67", +"ac c #1C1C3F", +"ad c #6767A3", +"ae c #2B2B47", +"af c #272743", +"ag c #222248", +"ah c #292931", +"ai c #29295C", +"aj c #1D1D39", +"ak c #252544", +"al c #1E1E47", +"am c #2B2B61", +"an c #29295F", +"ao c #1F1F3E", +"ap c #2F2F68", +"aq c #2D2D66", +"ar c #30305F", +"as c #2C2C5B", +"at c #11111C", +"au c #262655", +"av c #31316D", +"aw c #4C4C6D", +"ax c #222251", +"ay c #323264", +"az c #2D2D69", +"b` c #33335B", +"ba c #43436E", +"bb c #2B2B67", +"bc c #212146", +"bd c #37374B", +"be c #22223D", +"bf c #252536", +"bg c #1D1D42", +"bh c #2A2A5C", +"bi c #28285A", +"bj c #2B2B53", +"bk c #333372", +"bl c #2F2F6E", +"bm c #2B2B3F", +"bn c #2C2C36", +"bo c #424266", +"bp c #232337", +"bq c #2F2FB0", +"br c #34346C", +"bs c #525265", +"bt c #32326A", +"bu c #1B1B2F", +"bv c #3B3B55", +"bw c #303068", +"bx c #21214C", +"by c #2C2C64", +"bz c #292957", +"c` c #232351", +"ca c #26264A", +"cb c #2F2F60", +"cc c #202044", +"cd c #5D5D97", +"ce c #2B2B5C", +"cf c #363674", +"cg c #3C3C66", +"ch c #252556", +"ci c #30306E", +"cj c #3E3E54", +"ck c #414178", +"cl c #2C2C6A", +"cm c #2F2F4F", +"cn c #25252E", +"co c #27275B", +"cp c #363663", +"cq c #4C4C68", +"cr c #20204A", +"cs c #2E2E5B", +"ct c #29294C", +"cu c #242451", +"cv c #27274A", +"cw c #343464", +"cx c #4F4F64", +"cy c #252548", +"cz c #16162C", +"d` c #292938", +"da c #333384", +"db c #3C3C6F", +"dc c #353572", +"dd c #1E1E37", +"de c #38386B", +"df c #414156", +"dg c #242454", +"dh c #31316E", +"di c #181831", +"dj c #232349", +"dk c #272739", +"dl c #393979", +"dm c #4C4C85", +"dn c #2F2F83", +"do c #28285B", +"dp c #292952", +"dq c #36366C", +"dr c #48486D", +"ds c #23234C", +"dt c #37377A", +"du c #20203F", +"dv c #1E1E3D", +"dw c #26265C", +"dx c #313174", +"dy c #4C4C60", +"dz c #27273F", +"e` c #3C3C78", +"ea c #48485C", +"eb c white", +"ec c #383874", +"ed c #333379", +"ee c #444458", +"ef c #272756", +"eg c #47477C", +"eh c #32326E", +"ei c #1B1B33", +"ej c #1E1E2C", +"ek c #30306C", +"el c #40407F", +"em c #292944", +"en c #212150", +"eo c #23233E", +"ep c #141422", +"eq c #343473", +"er c #323271", +"es c #2D2D76", +"et c #2E2E6D", +"eu c #40406E", +"ev c #21213F", +"ew c #272731", +"ex c #8080BA", +"ey c #23232D", +"ez c #25255A", +"f` c #1B1B39", +"fa c #35356D", +"fb c #191937", +"fc c #262651", +"fd c #313169", +"fe c #2C2C6E", +"ff c #22224D", +"fg c #18182C", +"fh c #373786", +"fi c #2D2D65", +"fj c #232344", +"fk c #2B2B63", +"fl c #292961", +"fm c #27275F", +"fn c #202037", +"fo c #1C1C33", +"fp c #242452", +"fq c #45456F", +"fr c #484868", +"fs c #535380", +"ft c #1F1F43", +"fu c #2C2C5D", +"fv c #3535DD", +"fw c #353573", +"fx c #262657", +"fy c #393963", +"fz c #242455", +/* pixels */ +"````````````````````````````````````````````bs``````````````````````````````````````````", +"````````````````````````````````dybseabsawbsbscxawcxbsdybs``````````````````````````````", +"````````````````````````````eedycqcqcqdrcxawcqawawawawfrfrcxcq``````````````````````````", +"````````````````````````eadyfrdybafrfqawawfqdrawawfrfrdrawcqeaeeee``````````````````````", +"````````````````````eeeebofrboawbofqdrbadrfqeufqfqbababafqfrbobobocjee``````````````````", +"``````````````````dfeebvfybvcgbaboeueueueuababfqdefqegeuabeufybocgdfeacj````````````````", +"````````````````bvbo`nfydffybocgcgdedbegfsfqeuegexeudbdqdedbdeabfybvcjdfcj``````````````", +"``````````````bdcjbvfyfyb`defyfydedbckexexebckdmaqdbdbdbayaydeaycpbvab`ccjbd````````````", +"`````````````s`ccjb`b`b`b`ardededeaydcexadckaddbdbaadqdqbrbtbrayb`cpb``c`ccm`n``````````", +"```````````n`n`ncmcsb`cpascpegfi`ucwbrcdcdebehaddbbrdmfaayaqcbb`arcscs`ccmb`ae`s````````", +"``````````aeafcmaeasfu`paraycbbtfd`lavecckegcdcdaaec`qfa`ufa`f`ubwarbzb`cscs`kbm````````", +"````````ewaectfjbzcsb`arcwbtdcapec`fdcaadmcd`ueqaddmekecav`fapbtecbwdparbjcmaoct`n``````", +"````````bddzcmbjdparcscb`fdbfdfidcdlcieqbbdlciebexeletegbwbk`ubtbwfufucsdpcm`zctbm``````", +"```````ycmdjdpctauaramefcsbwapehekereddleledcfdmdmdmerelecaqaqbrehcbbzarfc`vbjcyem`r````", +"``````bpaobefjccbzasenbw`ufafdblcl`oeldldnbqededdtcdbkdldlet`lekamcbbw`fbjauctdp`zfn````", +"`````yfoaj`bbzeodsfibhbrekavcfcletfldneddxeddadtdadmbkerercleh`ubwbwcbbzarbhdpfjdiei`t``", +"````atfoemfcdpbzasfi`ffadcekbkazeqerbkerdadtdmfhbqdldleddxfkfdapdcfdfcam`pbz`e`ifoepa```", +"````a`dd`v`bbzbjefdw`lbwbtehdceccf`hfeerbqfhedesbqfvdlcifwcifldhbrficbficsefcc`v`xajbp``", +"````fnfgeo`vfubzbwdwco`ufm`m`ucfbler`ofh`hfveddndnbqdldldtcffmbkbwapbwaiefaybgctczfgei``", +"`````yczacaodpbjayfxcobwapbkehdhblerdtdnfe`hbqfhbqfedtcfeqecaqeqbwfiapanbhbr`zdjbcaofo``", +"````atczf``bbzbzbhax`laqbwaqdhciblfeclfhfhdafmbqdabqdacidldtdhflcf`wby`fauef`vccakev`y``", +"``ata`fnagccbzenbhfiaifdehezdhdlet`geteddnbqesfvedbqesdndabbfmfmbtbyamfufuasbcccdidiepat", +"````fgfgao`dbg`e`falcobwfkfmdh`o`gcidnesdn`gdabqed`geteretblekazfk`u`fdocb`j`abgf`ev`y``", +"`````yeicv`v`b`pamfcbhfxfidwetazazdx`q`heted`qfveder`get`wciekehchcodgbhffefeffcczbu`y``", +"````epdvfjfj`acubzenanbifxbyaqci`w`gereleddnesehdnazdxbkcl`wfmfm`f`lfmayenau`bfceidia```", +"`````ybuev`xcc`j`pfzaxau`jezekcferblcifhfhdmdmdldtfmblekdhekaq`fbififzbzftbidudvdifgbu``", +"````atfgfoaobgal`pc`auamaxcoekapdcfwaqe`edeldnele`ekelfm`manapaqficubi`pdjfcacf`bgdvep``", +"`````ya`f`ag`bdpasbcfubraibifmfmdhcfanekdcdmdtdhflexblcifkbyfiaifian`pau`pagbgbceicza```", +"``````epdif`dubcefbgauenaxfmco`f`mecekfied`uavexfkbbaqfmdwanapcubifxffbgacftbef`di`y````", +"``````a`czbuf`ddddbcfffcfcdgdoancofdezbwecfkap`wehaifmbtfiandwaxenbibzagf`ccbpaj`t`y````", +"`````````yfoeyaceoevenfpffbx`mam`mbifpdwchapehaicocoamaibibtezfxdgfxeffjccfpeiddfg``````", +"````````ej`rdidvaobzalbzfp`mauchfpfkezfkau`f`fdechchchfzbic`axbxfpauff`ebg`pejej`t``````", +"```````````tf`f`ajal`zcrfpendsffaycochfzdgfzbjcoancofpdo`ben`affce`edjbcbebef`di````````", +"```````````t`rf`dvaoeobcdu`ece`bfpencucofxbic`auc`dgficuef`bbxffbg`ebedddvaobfew````````", +"````````````cnejbpaodvftdj`jcr`pcoen`j`jcu`ifcbifx`jc``jen`bbx`vccbe`z`zddddcn``````````", +"``````````````ewbpddfbddaccycr`dfp`jfpca`jcu`dc`cacv`dff`d`d`x`dft`z`zbeejcn````````````", +"````````````````fgfneoduembmfj`vag`act`bds`ac``j`j`acv`bbcagak`xdudvbpcn`t``````````````", +"``````````````````ewd`fnaeakemcyaecvdjaeaecrcvdsakaeakafcy`jao`zfnd`cn`t````````````````", +"````````````````````d`dkfndzd``zbm`v`k`b`ecvemaeca`vaedudz`zafew`kbfey``````````````````", +"````````````````````````bfdkd`dz`kafdzae`vemcyafakakaedzdzbed`dkcn``````````````````````", +"````````````````````````````ahdkbnbnbm`z`sdk`s`zd`bm`safd`bn`s``````````````````````````", +"````````````````````````````````bnbn`sd`d`dk`sbmbnah`s`sah``````````````````````````````", +"````````````````````````````````````````````cn``````````````````````````````````````````", +"````````````````````````````````````````````````````````````````````````````````````````" +}; +/* XPM */ +static char *glass9[] = { +/* width height ncolors chars_per_pixel */ +"50 50 188 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #292967", +"`h c #3535A1", +"`i c #272751", +"`j c #23234D", +"`k c #29293F", +"`l c #2C2C63", +"`m c #2A2A61", +"`n c #33334C", +"`o c #353579", +"`p c #272754", +"`q c #414188", +"`r c #20202C", +"`s c #2E2E3D", +"`t c #1C1C28", +"`u c #2E2E68", +"`v c #242447", +"`w c #2C2C66", +"`x c #222245", +"`y c #181824", +"`z c #25253E", +"a` c #161622", +"aa c #B9B9ED", +"ab c #3E3E67", +"ac c #1C1C3F", +"ad c #6767A3", +"ae c #2B2B47", +"af c #272743", +"ag c #222248", +"ah c #292931", +"ai c #29295C", +"aj c #1D1D39", +"ak c #252544", +"al c #1E1E47", +"am c #2B2B61", +"an c #29295F", +"ao c #1F1F3E", +"ap c #2F2F68", +"aq c #2D2D66", +"ar c #30305F", +"as c #2C2C5B", +"at c #11111C", +"au c #262655", +"av c #31316D", +"aw c #4C4C6D", +"ax c #222251", +"ay c #323264", +"az c #2D2D69", +"b` c #33335B", +"ba c #43436E", +"bb c #2B2B67", +"bc c #212146", +"bd c #37374B", +"be c #22223D", +"bf c #252536", +"bg c #1D1D42", +"bh c #2A2A5C", +"bi c #28285A", +"bj c #2B2B53", +"bk c #333372", +"bl c #2F2F6E", +"bm c #2B2B3F", +"bn c #2C2C36", +"bo c #424266", +"bp c #232337", +"bq c #2F2FB0", +"br c #34346C", +"bs c #525265", +"bt c #32326A", +"bu c #1B1B2F", +"bv c #3B3B55", +"bw c #303068", +"bx c #21214C", +"by c #292957", +"bz c #232351", +"c` c #26264A", +"ca c #2F2F60", +"cb c #202044", +"cc c #5D5D97", +"cd c #2B2B5C", +"ce c #363674", +"cf c #3C3C66", +"cg c #252556", +"ch c #30306E", +"ci c #3E3E54", +"cj c #414178", +"ck c #2C2C6A", +"cl c #2F2F4F", +"cm c #25252E", +"cn c #27275B", +"co c #363663", +"cp c #4C4C68", +"cq c #20204A", +"cr c #2E2E5B", +"cs c #29294C", +"ct c #242451", +"cu c #27274A", +"cv c #343464", +"cw c #4F4F64", +"cx c #252548", +"cy c #16162C", +"cz c #292938", +"d` c #333384", +"da c #3C3C6F", +"db c #353572", +"dc c #1E1E37", +"dd c #38386B", +"de c #414156", +"df c #242454", +"dg c #31316E", +"dh c #181831", +"di c #232349", +"dj c #272739", +"dk c #393979", +"dl c #4C4C85", +"dm c #2F2F83", +"dn c #28285B", +"do c #292952", +"dp c #36366C", +"dq c #48486D", +"dr c #23234C", +"ds c #37377A", +"dt c #20203F", +"du c #1E1E3D", +"dv c #26265C", +"dw c #313174", +"dx c #4C4C60", +"dy c #27273F", +"dz c #3C3C78", +"e` c #48485C", +"ea c white", +"eb c #383874", +"ec c #333379", +"ed c #444458", +"ee c #272756", +"ef c #47477C", +"eg c #32326E", +"eh c #1B1B33", +"ei c #1E1E2C", +"ej c #30306C", +"ek c #40407F", +"el c #292944", +"em c #212150", +"en c #23233E", +"eo c #141422", +"ep c #343473", +"eq c #323271", +"er c #2D2D76", +"es c #2E2E6D", +"et c #40406E", +"eu c #21213F", +"ev c #272731", +"ew c #8080BA", +"ex c #23232D", +"ey c #25255A", +"ez c #1B1B39", +"f` c #35356D", +"fa c #191937", +"fb c #262651", +"fc c #313169", +"fd c #2C2C6E", +"fe c #22224D", +"ff c #18182C", +"fg c #373786", +"fh c #2D2D65", +"fi c #232344", +"fj c #2B2B63", +"fk c #292961", +"fl c #27275F", +"fm c #202037", +"fn c #1C1C33", +"fo c #242452", +"fp c #45456F", +"fq c #484868", +"fr c #535380", +"fs c #1F1F43", +"ft c #2C2C5D", +"fu c #3535DD", +"fv c #353573", +"fw c #262657", +"fx c #393963", +"fy c #242455", +/* pixels */ +"````````````````````````````````````````````````````````````````````````````````````````````````````", +"``````````````````````````````````````e`bscwbscwbsbsbsbsbsbsbscw````````````````````````````````````", +"````````````````````````````````bse`bscpbse`awawcwbsbsdqawawbsdxdxcwcw``````````````````````````````", +"````````````````````````````e`eddxfqcwcpfqfqawawdqawdqawawfqcwawawfqfqe`cw``````````````````````````", +"````````````````````````cie`e`dxfqboboawfpfpdqfpbafpawfpdqbofpabdqfqfqedcfdee```````````````````````", +"``````````````````````edede`cifqbodqabfpfpbabobaccbabafpbaddbaetfpfqabbobobodee`````````````````````", +"````````````````````deedbvbvfxfxcfetboetfpcfewetddetetdaefetbaetabetbofxabcfedcici``````````````````", +"``````````````````bdedbd`cabdefxababfxddetddcccjefbacjeaetddddcfdpdaddababb``cdeedde````````````````", +"````````````````bvbdbvfx`cb`fxcfcffxdddaddefccaaeaefewbwdldadaddcoayddcvcfb``cbvbdbvci``````````````", +"```````````````s`cbvbdb`b`b`cocvdddaddayf`braadlfrccdldzewdddaebddfcbwayfxcfb``cbd`cbd`s````````````", +"````````````bd`sclclbjb`crb`arcofr`ubtbtfcdkaaewewdlcjdabtdabtcvddebayaycadoarb``c`n`ncl`s``````````", +"``````````bdbv`c`ccub`b`b`ascrdp`fcadzaqbwfjebcjeaccewaaccdlfrdlegbw`f`lcab`crcrcrclclelbpbd````````", +"``````````bnbmcuclclcrb``pararcv`ff`fcegf`dzewcjcjeqdleabkavf`fc`mbrcaegfcaycabjararcrae`sbm````````", +"````````evaedycragcacvb`apcrasbwf``faybtavekewaddleqdkccccdkbrdzfcavapbrfhf`biascac`bjcuel`kbf``````", +"````````aeae`vcldo`acrcacr`fbtddaqapebceckbleqdzdseqaaadekdwebdkavceapbrbt`fftamcrbybjaeclbpbp``````", +"```````rfnbeakdocubzarfw`faiarbraqegejbkcheqeqekd``oefekewdzchekbkaqfhbtbkapcrcacr`j`vdocbbpfn`t````", +"``````cz`zdoakbccbbyasdr`fap`uf`fcejck`obkdl`odmfudwecdwaadzbkdzdbaz`legaqftar`fcadofbdobjafdccm````", +"``````bfehdc`aeefifbftaiambw`gavbkblck`gckd`eqecec`hfgd`addsepbkfvfkapazavf`fw`fbycrcd`a`vehbubp````", +"`````tbuehdyfbasdocaapayayebebbteq`geqchfvdwecbqdkaddsfudwdzbkckdwfjbrapf`bwf`byfwbyasdr`iezbucy`t``", +"`````yfnfieu`bdi`abydn`mfcf`f`egdbavdbec`odwcefgecdsd`dmbqepceeqf`az`wejdbbrambi`lcdft`bcbc``va`ei``", +"````a`eoenfifsaycrbyfl`mfc`uan`webceebdmer`gdwbqdsdsdmdmbqekdkeccechckfkejegfhbiftarby`a`v`vfiffbu``", +"````fmcycxdidt`iardpdnemanavflejazeqesepcefgblerfud`fgfderfgdkdsdkdzfkeqbkapapbt`lctfceuas`vcydhfn``", +"````ehdheudtagbybjcabidnapapfcebejblchcheqer`hbqbqerbqfufgecdsebcedkbkbleqf`fjambicaaycu`vcxa`du`y``", +"````fnfndhdtbgdobybifocnbwameqckdgeqeqfdesfdfgfgdwflfddmfufudwch`odschflejebdvayby`pee`vcbacfndcbu``", +"````bube`vacfe`iembyfc`f`ufc`wdveqdkeqflfddwfudm`her`hd`fgbqecd`ecbbflfkfjapdvbwdnftas`jfifieh`yeo``", +"````ffehdhdhdrcqalft`jembtai`wfkdg`obbesbldmfddm`gecfud`dmbbdw`ochbl`ufkap`weganaiar`j`j`ddu`adhff``", +"````ffdcdrdtbj`a`pfhfebibh`legfkesapaqeq`obqbqfddkfu`hd`dwfkchdw`wcheq`ufjemfyaucdby`peectduezdhbu``", +"`````tfadhag`v`iee`fcqfweefleyanaqfjazazebfg`g`qfu`hadcher`q`h`gazdwaibbap`lfw`waybxct`aagcbeueofn``", +"````eoa`ffcbfididr`eaxeybzbhcgaqepdlbkckazeqds`qfueqfdblefeqdzchdg`wfheyamey`laibyalbiagdraodheheo``", +"````at`ydhdh`dfsal`pfyalfyemeyey`waqdgazckepbkdw`qekepecfjdmejflazfj`ubw`lbiftaxee`beecbcbbcdu`ta```", +"````a`a`a`ficbalcqeeauct`fcgdffyflejapds`wefdleradewegaaegeseqbr`lfl`u`megamamctfb`vfebc`deudceoat``", +"``````eofffacb`abyftcbbybtfcanfwaidvapepap`wegazdzdlek`uerfgepdgfj`laqdncn`mbyfoct`p`vbgacezdhbu````", +"```````yffdhfsficbeealbybxbiemcncnamflch`u`uccew`udgdlf``wdldbcgflanbweefycnaxeeacezfsdyfmdh`y`t````", +"```````teoeiezajdcdc`ealeeai`jaxaiamcgavaiew`ucc`w`mandzanebflfcamfldvbiemdffw`pfeezcbdcbpeh`yeo````", +"`````````tfffffmaoakdtalamfbdremfjamaiaidffraiddegdbfhancnbrdn`mamegfwaxfocgftct`x`efeezeifn`t``````", +"````````ex`tehbeezdubydialcdaxcnbidndfbhfwbweydf`mandfcgdvananfyfofycncgcnaxfoacbg`e`pfadueiex``````", +"```````````rbufndcajacfscbbycqfofodnaifhfyai`paxcnfweyddcg`pcgfwfofedifeaxbyalfs`j`kduehfmfm````````", +"```````````yeifndhbefsao`vaxbxbxcsfebyfwbzfybidfcgbjfwaidnambibybzbx`afocdbc`vfidtezajbueha`````````", +"`````````````y`r`rezduaocxficb`jfw`abz`jct`jdnfwbzfwdnaufofofw`afo`i`ddiducb`zdudcezdu`rex``````````", +"``````````````evbudjfmajcbagbcctbcfwcgaufoct`afofb`afodf`jbzemfobx`dfe`val`xczdjbebpdccm````````````", +"````````````````evcmezfneufsaoelcqcxctfeaufecsfectbxbzfeae`b`jdrc``b`x`ecb`zbpfmfmeiev``````````````", +"``````````````````ffbubpfiafafbmbc`vag`bc`csdr`j`bct`jfefbcxcx`j`xdificxacbeenbfev`t````````````````", +"````````````````````cmczczdy`zak`kcucucudrcuaecxc`cxdrcxaeelak`vc``jajakbpafbfbf`r``````````````````", +"``````````````````````cmczbpdjdc`kcxelaoelakagbc`aaeel`bbxakakeu`zdtbm`zdjbpevbf````````````````````", +"````````````````````````cmbfeibfbmeuel`kelelafelelakaeelaf`k`k`zdjbebm`zbncmah``````````````````````", +"````````````````````````````czbnczbp`zafbmaedyafelbmdy`zdybeczdjczbf`kbpex``````````````````````````", +"`````````````````````````````````sevdjbncz`zdj`sczcz`k`k`s`sdjbfahevbn``````````````````````````````", +"``````````````````````````````````````evah`sbncz`kev`sbnczbnczah````````````````````````````````````", +"````````````````````````````````````````````````````````````````````````````````````````````````````", +"````````````````````````````````````````````````````````````````````````````````````````````````````" +}; +/* XPM */ +static char *glass10[] = { +/* width height ncolors chars_per_pixel */ +"60 60 189 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #292967", +"`h c #3535A1", +"`i c #272751", +"`j c #23234D", +"`k c #29293F", +"`l c #2C2C63", +"`m c #2A2A61", +"`n c #33334C", +"`o c #353579", +"`p c #272754", +"`q c #414188", +"`r c #20202C", +"`s c #2E2E3D", +"`t c #1C1C28", +"`u c #2E2E68", +"`v c #242447", +"`w c #2C2C66", +"`x c #222245", +"`y c #181824", +"`z c #25253E", +"a` c #161622", +"aa c #B9B9ED", +"ab c #3E3E67", +"ac c #1C1C3F", +"ad c #6767A3", +"ae c #2B2B47", +"af c #272743", +"ag c #222248", +"ah c #292931", +"ai c #29295C", +"aj c #1D1D39", +"ak c #252544", +"al c #1E1E47", +"am c #2B2B61", +"an c #29295F", +"ao c #1F1F3E", +"ap c #2F2F68", +"aq c #2D2D66", +"ar c #30305F", +"as c #2C2C5B", +"at c #11111C", +"au c #262655", +"av c #31316D", +"aw c #4C4C6D", +"ax c #222251", +"ay c #323264", +"az c #2D2D69", +"b` c #33335B", +"ba c #43436E", +"bb c #2B2B67", +"bc c #212146", +"bd c #37374B", +"be c #22223D", +"bf c #252536", +"bg c #1D1D42", +"bh c #2A2A5C", +"bi c #28285A", +"bj c #2B2B53", +"bk c #333372", +"bl c #2F2F6E", +"bm c #2B2B3F", +"bn c #2C2C36", +"bo c #424266", +"bp c #232337", +"bq c #2F2FB0", +"br c #34346C", +"bs c #525265", +"bt c #32326A", +"bu c #1B1B2F", +"bv c #3B3B55", +"bw c #303068", +"bx c #21214C", +"by c #2C2C64", +"bz c #292957", +"c` c #232351", +"ca c #26264A", +"cb c #2F2F60", +"cc c #202044", +"cd c #5D5D97", +"ce c #2B2B5C", +"cf c #363674", +"cg c #3C3C66", +"ch c #252556", +"ci c #30306E", +"cj c #3E3E54", +"ck c #414178", +"cl c #2C2C6A", +"cm c #2F2F4F", +"cn c #25252E", +"co c #27275B", +"cp c #363663", +"cq c #4C4C68", +"cr c #20204A", +"cs c #2E2E5B", +"ct c #29294C", +"cu c #242451", +"cv c #27274A", +"cw c #343464", +"cx c #4F4F64", +"cy c #252548", +"cz c #16162C", +"d` c #292938", +"da c #333384", +"db c #3C3C6F", +"dc c #353572", +"dd c #1E1E37", +"de c #38386B", +"df c #414156", +"dg c #242454", +"dh c #31316E", +"di c #181831", +"dj c #232349", +"dk c #272739", +"dl c #393979", +"dm c #4C4C85", +"dn c #2F2F83", +"do c #28285B", +"dp c #292952", +"dq c #36366C", +"dr c #48486D", +"ds c #23234C", +"dt c #37377A", +"du c #20203F", +"dv c #1E1E3D", +"dw c #26265C", +"dx c #313174", +"dy c #4C4C60", +"dz c #27273F", +"e` c #3C3C78", +"ea c #48485C", +"eb c white", +"ec c #383874", +"ed c #333379", +"ee c #444458", +"ef c #272756", +"eg c #47477C", +"eh c #32326E", +"ei c #1B1B33", +"ej c #1E1E2C", +"ek c #30306C", +"el c #40407F", +"em c #292944", +"en c #212150", +"eo c #23233E", +"ep c #141422", +"eq c #343473", +"er c #323271", +"es c #2D2D76", +"et c #2E2E6D", +"eu c #40406E", +"ev c #21213F", +"ew c #272731", +"ex c #8080BA", +"ey c #23232D", +"ez c #25255A", +"f` c #1B1B39", +"fa c #35356D", +"fb c #191937", +"fc c #262651", +"fd c #313169", +"fe c #2C2C6E", +"ff c #22224D", +"fg c #18182C", +"fh c #373786", +"fi c #2D2D65", +"fj c #232344", +"fk c #2B2B63", +"fl c #292961", +"fm c #27275F", +"fn c #202037", +"fo c #1C1C33", +"fp c #242452", +"fq c #45456F", +"fr c #484868", +"fs c #535380", +"ft c #1F1F43", +"fu c #2C2C5D", +"fv c #3535DD", +"fw c #353573", +"fx c #262657", +"fy c #393963", +"fz c #242455", +/* pixels */ +"````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````", +"````````````````````````````````````````````````bsbsbsbsbsbsbsbsbsbsbscxbs``````````````````````````````````````````````", +"``````````````````````````````````````````dycxdydycxawawawbsbsbsawcxcxcqdycxcxbs````````````````````````````````````````", +"````````````````````````````````````dyeacxfrawcqawfrawcqcxawcqawawawawawawfrfrcxcqeabs``````````````````````````````````", +"````````````````````````````````dfeadydyawcqawawfrcqawawdrawcqawawfqawcqcqfrawawfrdyeaeadf``````````````````````````````", +"``````````````````````````````eadyeadyfreedrboawfqfqfqdrfqeufqawbaawbabofqeufqdrcqfreeboeadf````````````````````````````", +"``````````````````````````dydffrbocjfrfrdrfrfrfqfqbabofrfqfsbaeubafqfqcgeubafqdrbaabbobobocjeedf````````````````````````", +"````````````````````````dfeeeadffyboeecgeufrfreufqeueueucgbaeubadrdbbacdbaeucgbabocpboboabboeaeebd``````````````````````", +"``````````````````````bdbdcjbd`cfyeefybaabcgfyeubaabdmfseudbdefsaackdbeudebaeudedebocgbofyfycjcjeecj````````````````````", +"````````````````````cjdfabbvb`cg`cfyfyfycgabcgdeckbrfscddecdcddmdmfsabdeeucwcpdbdbcgcgcp`cbvbvcjbvbdcj``````````````````", +"``````````````````bdbddfbv`ccgfyb`cgcgcpfycwdedbdbcdadcdexexckcd`u`uegdedbdbaycpaydecpcpb`bvfybvbdcj`s`s````````````````", +"````````````````dfbdcjbvbd`c`c`cb`cpcwcgdededqayfabrcdexdbcdcdcddeexebbrdbecdedqcwfdaycpcgarb`b`bd`cbd`sbd``````````````", +"```````````````sbdbd`n`ncmcscsarcscwcpdbbtbwbwbtbrfaebexegexaddbdeeceldqbrbrdqbtbkaybt`fbjcscpb`b``ncmctbdbd````````````", +"``````````````aebd`c`ncmcsb`cwayascsdebraybwbrfdbtazdmdeexaddladexckdedmdme`btay`lcbcscwarasfucpb`cmcmae`nbd````````````", +"`````````````saeeo`nbjcmcsarar`paycsbtcb`fbrbtfkfdciecdmdqebcdaacddmece`elbrazfabr`f`wbwbtarbzcsascsarbjbm`kbn``````````", +"``````````ewd`ae`z`c`zbjcsb`cscscwcwbrbravbtecbrfackaadmckexavciexdme`bkfabtapanbr`ffabtfdbtdpcscsbjbjdpbeae`s`s````````", +"``````````ahcm`kcm`bdparaycsay`fcscsfdbrfibwbtbrfdeqcd`qdmelbkeldmexdmeqdce`faerdcapbtbwfa`waucscscvdpdpafcmae`n````````", +"````````cncmaeakcmct`adpcsarcbcbbwdqdeapamdcehcfclbldlbldmeqeradexade`esecelehehdc`ubrbrbtfucsbhcsas`actbecmbpbpey``````", +"````````ejbpeo`vctcv`abzb`ef`ffxfucbbwapbldcdheqetesdlfwdmescfcddmdmdmbkbleldldhaq`ubrfabtcbcsbtcs`pcccycm`veobe`t``````", +"`````````rae`aajevdjdsasas`jbifiapbrbtav`uapclcfdlad`odndnfvdxededexegeceqe`e`cfbybydcbrfmcwcbfdcbbjdjca`bcv`zdd`t``````", +"``````ej`rbu`vcvcv`vcyfcbzefbz`f`uclapfderfeerclerdldlerdada`hedfhe`aacferdtcfciazapfk`ubramcbfuararbzfc`zaeaofo`t`r````", +"``````bpfodibedsdp`jcs`abwbh`lfadccidcecerclet`gfe`hdxdx`hededdt`hdaelcfereterer`wbk`ubtfdbtef`fefcb`paudpbcdiczdi`y````", +"``````ejddddemfcbjefcscs`faycedcececapciazcieqbldterdxdnbqelcdfhfv`h`oe`ererdnetfkfdekfabwbtfubifxfcar`affdpf``yepfo````", +"`````tej`ycyevcuctftbzefdoaiapaqbrbrehfw`udcfwda`oerekfhfhdxdtdaes`hbqfwcferbkehflfkekcffabwfuco`lbzcsbzftbccaevfneja```", +"````atddddem`xaocscsar`pdwdwfibwapbyapeccfdlcf`hdnfmbl`hfhdtdt`hclfvbq`qfhdxbkcfcl`gfkehfa`ufufpamaycsaydjcc`v`vfoepat``", +"````ejfgbucy`vccceaseffdfldgai`ubbfzfdazazcfblereqdt`hdnbq`hedbqfedndndte`dtdtdletfmdhehfkapapbt`mdgfubzacdp`xf`dicz`y``", +"````budddi`x`vevdpcsbzcwfxai`mapfdflfaavblercibkcffhcl`gfvfvfvdadaedclcfcfdteqecdcfkercfav`lbt`famchfdcsbe`bcaczfjbefg``", +"````a`buepccevcrdpbzbzcbfxbifdfififacfekazereretblfe`hfhbqesesdnfh`h`hbq`hfwecdldcerclavecaqaqfifxbhbzbzcv`xfjfodufnat``", +"````atepbufodualfcdp`lauauchfi`lapek`gcicieretfecl`gfhed`hesfm`gfefvfvfvdxbl`oederetfm`wdlfkfxaybzau`d`j`xduf`fgdufga```", +"`````yepddfjacccbz`benamfd`f`mfdbr`mdwcidtcfclfmfebldadneddnesdadadx`hdaededdaclflfmflfmehbyaiaydofuarasftccfjdidiei`t``", +"````a``yczczfbbcbc`bacficucraqfdanfkflaz`oehbbesbldndxfefefeesfvbqbqdnbbdtedciciazaqfkazaz`ubw`laicbas`pdjcccc`advddat``", +"````fo`yddccf`fcalcefucbcufpbi`fbyav`wazbt`ucldxed`hblescldn`hbqdndncl`gazedazazazfw`wekfzanameffucbbzbxbz`jf`fbevbuep``", +"````at`yfbaccy`a`bdsceaiffbzbichfi`manekaq`uclbkcffheletfvesfh`hesdx`qclci`gfkapap`wekapezanfzaifubxeffcfc`bdubufgepat``", +"````a`czdvf`bcdv`bffbzbicrax`fbiezcofifiekbkfk`geredeserbqdndndtadfhazcfblfecl`u`laiflaq`f`lez`ucbdgff`j`bdpccdddiepep``", +"````atczdidvaocy`v`edsbcaxdwbxfzefchameqecdlbl`gazdh`qfhaaadelesfhdaflblbkblerazapfidwbhchaqdobibzalfp`pccbgdveiczepat``", +"````a`epfoczdi`dccac`jaufzcraxaubxdwez`wfkehekbbclbkelaa`obqeleddldafkdmekfm`wfk`wfibwfidobhaiaxef`j`pdsbcacbcaodiddat``", +"``````eifgczevccfbau`jefdgffbhamaxfxezfd`w`l`odl`udcbk`wdneldtegadaaazetdlfmanan`waqfkehfifpbic``p`dbzagftao`vdifbfg````", +"``````a``yfgdv`b`v`ifcbz`b`ibwbtamfxfxfmfxekdhcfby`lciehec`wdlaverapcdecelaz`lby`lfidofiap`mcefxfp`idsagbcagajeicza`````", +"``````ata`czfbdv`vdjceasac`ibiamfian`maifxanazehave`apekehap`uege`ecazcfbkekdwfkfifiauchefbiencuftbcdvfbfof`fbdi`y`y````", +"`````````yczbudvdvdvfbcubgfcaucrbicraxfzchco`wekfke`aqflav`uaa`udm`u`w`uamfzchfmanameffpdgaidgfpaldvaoevf``zfbfgbu``````", +"````````a``tejeif`ajddajdsccbz`pbi`jfpdoanfzanbtai`f`ufkfkdq`lanebexaidcfme`fafiancodgenenbiai`pcracccf`bpddbufg`t``````", +"`````````t`yfgfgbpacaoakdubgbiauffdsenanfidoamaidgcdcoezbtecdc`mdmanbifidoanan`uapfzaxfpfpbhcecr`xbcbgbxddbufoej`t``````", +"```````````t`yfoddaodidv`i`xaleffpc`chfxamchezaichezfmfzanbwanfpcb`famfkanfxfzezcoanbifxc`ffefacbgccacf`ddddej`t````````", +"```````````tcnfobpdvbgdvbgbxftefbibxaiaudofzaxfichanfxfpfxezananfxchdgefezfzfxcuc`crdsfpcubz`jft`eeofcfbfoejfg`r````````", +"````````````eyfgbudiaoajbgdvbecrfpfpff`bffefbwaichchdgdgbhdgbjbidoaicofxfpaicubxds`afpdgas`e`vduag`z`zajdibuey``````````", +"```````````````t`rbuddeodvft`zalbccr`ec``bc`auenfp`jezchfxaidpc`fxdgfpfiamfcdgfxcvcrfcfpalcr`zbeajf`dvajbfey````````````", +"```````````````rbfbpfofbbgdvaffjfjcc`jfxbxfcc``b`bdsbiau`jc`biaibifxfpfcch`afpc``d`d`vdvfjfj`zdvajfbdvbp`tcn````````````", +"````````````````cnfnfnbpfnaoftftdj`ecuftfpaubidgfp`j`bfcfpfc`afpdgc``jfpencuc``b`j`e`vcrevdkdzewbefnfobfej``````````````", +"``````````````````bffnfnajfodvddccftaf`e`b`jdgcuai`jcv`jc`fcdj`jbxcvcvdsdsbxbxdjcr`xbxdjft`z`zddbefnbf`r````````````````", +"````````````````````d`eyewbeduak`zfjemcads`dfp`jdj`b`bcu`jcudgfpefds`bcacacvctct`dagak`xaoddbeeybpfn`r``````````````````", +"``````````````````````eyfnbpdkdz`z`zbmakfj`bag`v`dctctctctem`d`ecvctaeaeafcu`v`ecc`zakafbp`kbpewbfew````````````````````", +"````````````````````````eyeybfbpdk`zemcvcyafemakcvcvaeaeffdjcvcv`j`vae`vemaf`vagcc`z`z`zeodkbfd`ey``````````````````````", +"``````````````````````````cnbnfobe`kbe`kevemdzfj`k`z`b`edjctaeaeemds`eaf`vevdzdjafemd`dk`zbfd`ey````````````````````````", +"``````````````````````````````bncneybf`kbeaf`kememem`kcvafemakaeaeakemem`kdk`z`kbebm`zd`d`ah````````````````````````````", +"````````````````````````````````ahcnewd`dk`z`zaeaf`kaf`k`vemaedzcvakak`z`kdzd`dkdkbmbfbnah``````````````````````````````", +"````````````````````````````````````cncnbf`z`sd``s`k`z`s`zbm`s`kd`d``s`s`k`kd`ahd`bncn``````````````````````````````````", +"``````````````````````````````````````````bnd``s`s`kbnd`d`bfd``kbnbnd`bnd`ewahbn````````````````````````````````````````", +"````````````````````````````````````````````````ahbnahbnd`ewdkbfewahahewbn``````````````````````````````````````````````", +"````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````", +"````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````" +}; +/* XPM */ +static char *glass11[] = { +/* width height ncolors chars_per_pixel */ +"72 72 189 2", +/* colors */ +"`` c None", +"`a c #27274E", +"`b c #25254C", +"`c c #383858", +"`d c #23234A", +"`e c #212148", +"`f c #2E2E62", +"`g c #292967", +"`h c #3535A1", +"`i c #272751", +"`j c #23234D", +"`k c #29293F", +"`l c #2C2C63", +"`m c #2A2A61", +"`n c #33334C", +"`o c #353579", +"`p c #272754", +"`q c #414188", +"`r c #20202C", +"`s c #2E2E3D", +"`t c #1C1C28", +"`u c #2E2E68", +"`v c #242447", +"`w c #2C2C66", +"`x c #222245", +"`y c #181824", +"`z c #25253E", +"a` c #161622", +"aa c #B9B9ED", +"ab c #3E3E67", +"ac c #1C1C3F", +"ad c #6767A3", +"ae c #2B2B47", +"af c #272743", +"ag c #222248", +"ah c #292931", +"ai c #29295C", +"aj c #1D1D39", +"ak c #252544", +"al c #1E1E47", +"am c #2B2B61", +"an c #29295F", +"ao c #1F1F3E", +"ap c #2F2F68", +"aq c #2D2D66", +"ar c #30305F", +"as c #2C2C5B", +"at c #11111C", +"au c #262655", +"av c #31316D", +"aw c #4C4C6D", +"ax c #222251", +"ay c #323264", +"az c #2D2D69", +"b` c #33335B", +"ba c #43436E", +"bb c #2B2B67", +"bc c #212146", +"bd c #37374B", +"be c #22223D", +"bf c #252536", +"bg c #1D1D42", +"bh c #2A2A5C", +"bi c #28285A", +"bj c #2B2B53", +"bk c #333372", +"bl c #2F2F6E", +"bm c #2B2B3F", +"bn c #2C2C36", +"bo c #424266", +"bp c #232337", +"bq c #2F2FB0", +"br c #34346C", +"bs c #525265", +"bt c #32326A", +"bu c #1B1B2F", +"bv c #3B3B55", +"bw c #303068", +"bx c #21214C", +"by c #2C2C64", +"bz c #292957", +"c` c #232351", +"ca c #26264A", +"cb c #2F2F60", +"cc c #202044", +"cd c #5D5D97", +"ce c #2B2B5C", +"cf c #363674", +"cg c #3C3C66", +"ch c #252556", +"ci c #30306E", +"cj c #3E3E54", +"ck c #414178", +"cl c #2C2C6A", +"cm c #2F2F4F", +"cn c #25252E", +"co c #27275B", +"cp c #363663", +"cq c #4C4C68", +"cr c #20204A", +"cs c #2E2E5B", +"ct c #29294C", +"cu c #242451", +"cv c #27274A", +"cw c #343464", +"cx c #4F4F64", +"cy c #252548", +"cz c #16162C", +"d` c #292938", +"da c #333384", +"db c #3C3C6F", +"dc c #353572", +"dd c #1E1E37", +"de c #38386B", +"df c #414156", +"dg c #242454", +"dh c #31316E", +"di c #181831", +"dj c #232349", +"dk c #272739", +"dl c #393979", +"dm c #4C4C85", +"dn c #2F2F83", +"do c #28285B", +"dp c #292952", +"dq c #36366C", +"dr c #48486D", +"ds c #23234C", +"dt c #37377A", +"du c #20203F", +"dv c #1E1E3D", +"dw c #26265C", +"dx c #313174", +"dy c #4C4C60", +"dz c #27273F", +"e` c #3C3C78", +"ea c #48485C", +"eb c white", +"ec c #383874", +"ed c #333379", +"ee c #444458", +"ef c #272756", +"eg c #47477C", +"eh c #32326E", +"ei c #1B1B33", +"ej c #1E1E2C", +"ek c #30306C", +"el c #40407F", +"em c #292944", +"en c #212150", +"eo c #23233E", +"ep c #141422", +"eq c #343473", +"er c #323271", +"es c #2D2D76", +"et c #2E2E6D", +"eu c #40406E", +"ev c #21213F", +"ew c #272731", +"ex c #8080BA", +"ey c #23232D", +"ez c #25255A", +"f` c #1B1B39", +"fa c #35356D", +"fb c #191937", +"fc c #262651", +"fd c #313169", +"fe c #2C2C6E", +"ff c #22224D", +"fg c #18182C", +"fh c #373786", +"fi c #2D2D65", +"fj c #232344", +"fk c #2B2B63", +"fl c #292961", +"fm c #27275F", +"fn c #202037", +"fo c #1C1C33", +"fp c #242452", +"fq c #45456F", +"fr c #484868", +"fs c #535380", +"ft c #1F1F43", +"fu c #2C2C5D", +"fv c #3535DD", +"fw c #353573", +"fx c #262657", +"fy c #393963", +"fz c #242455", +/* pixels */ +"````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````", +"``````````````````````````````````````````````````````````````bsbsbsbsbsbsdydybsbsea````````````````````````````````````````````````````````````", +"``````````````````````````````````````````````````````eabsbsdybsbsbsbsbsbscqcxbsbsbsbsbscxdy````````````````````````````````````````````````````", +"````````````````````````````````````````````````dydybsbsdycqcqdycxbsbsfrcqcxdyfrcqcxcxbseacxcxbsbs``````````````````````````````````````````````", +"````````````````````````````````````````````eaeaeafrcqawawawdrdrawcxawawcqcqawawawawawbscqfrfrdycxcxea``````````````````````````````````````````", +"````````````````````````````````````````frdfcxcqawcqcqawawfrcqdrawfrawawcqawawawfqawcqawcqdrawdrfrdycqdycx``````````````````````````````````````", +"````````````````````````````````````eeeaeaeadycqdffrboboawfqfqfqdrdrfqbabadrdrdrdrbobodrdrbaawdrdyfreaeaboeeee``````````````````````````````````", +"``````````````````````````````````eeeefreeeefrbofrfrbofrfqeudrbadrfqdrfqeubabababababafqdreufqfrbafrfreeeeeacjdf````````````````````````````````", +"``````````````````````````````eecjboeebocjboboababboabdrfsfqfqbabobobafqfqawdrfqawbaeueudrdebafrbocgbobobobodfdfcjbd````````````````````````````", +"````````````````````````````dfeeeedfcjbvab`ccgfyeuabboabbabaabdbadeucgdeabbabadbegfqfqfqbaeueueubobob`bocgcgdfeacjcjcj``````````````````````````", +"``````````````````````````cjbddfcjbv`ccgdffycgfqbofyfyabdbeuabfqexbaeueudefqexadckdbbadedebaabdedeeufyboabcpfycjdfdfeecj````````````````````````", +"````````````````````````cjcjdfdfbvb`cg`cfyfyfyfycgabcgdeeudbbregexdbdbadcddmegexeucgdedbdbayfydbdbabcgfycpb`bv`cbvcjdfbdcj``````````````````````", +"``````````````````````bdbdcjbvbvfy`c`cb`cpcgfyfyfycpdededbdeegexdmaaebexckaadm`ucddbdedbdbcwcpcpfddedeb`fyb`bvfycjcmbdcj`s`s````````````````````", +"````````````````````bd`nbvbvbv`ccg`c`ccscpcwcwcgdebrcwbraydqckdbcdegegcdcdade`btdcadbrdqfabrdebrcpbwaycpfyfyb``car`n`nbdcjbnbd``````````````````", +"```````````````````n`s`n`ncj`nb`b`b`b`b`b`arcpdqfabrbrcwaybtbrexadcddbadaae`dedeexaddbdqdebrdedbdededeayb`b`cpb`b`fy`n`c`ncmbdbd````````````````", +"```````````````````n`sbdaecmcmcscscscpcscscpcwfsbwfiaqfdaybtecadexaafsexe`exckdbbtecdedqfdaycpbrekcbcsaycb`icsaycpb`b``ncm`naebd````````````````", +"`````````````````scj`c`ccmctbjcsb`cparasascsdqayaybwecbwbrbrbbe`dee`ebadegcdexadegdbcdade`ecbrbwfk`ffuarcwarcscscscpcscmcmct`nd`bd``````````````", +"```````````````s`saecv`nbjaecmasarar`parcsayfdcb`fbrbtaq`fbtciecdmdbdeebcdebcdebehece`egfabtaqecbrcbazap`fayarcsas`casbjarcmem`n`sbn````````````", +"``````````````ew`s`zcv`nevcmbjcscsbzcscwaydedqbwavfafdfadcdcckadebcke`aaehdhadebe`dcehdcbtbran`fbr`fbrfibtayaybzbjarcsb`bjbjafbm`sae````````````", +"````````````bnaeae`kcmagdjfuaycsb``ffucscsbtbwdcaqfifdfabwave`exaaadcdcddh`oecadcddmfwapdbe`fdaqbrapbtbtfdecaqbhbzarcs`adpcmaf`zcmcncn``````````", +"````````````dz`n`kctcmct`idparcwaybw`farfubrdqbr`ffdfafaecekerdcfeazeleqavdmexaddmelcibkegbrbtbkfa`uehbwfifiambzfxcscs`abjbjakctcmcm`z``````````", +"``````````ey`saf`zafbjcv`befascsfuar`ffdbrde`faq`wdcdcbkerclesdlcfdmcdblfwcdebaddmdldxercdecbkavbkapbrbtfdbt`fcbbwcbbjbzcactaebectfn`zey````````", +"``````````a`bf`zcacvdpcv`icucscsbi`fefbhar`fbr`uekbrekcierdxdxdlcieleqes`odmelelexdmcfere`eldcetaqfibwfadcapcbcscsbtcsfcccakdp`vcv`zfncn````````", +"`````````tbpaecvao`vcccydsbzcsbzffaifiekbwbtbrap`uekbber`odladdteddndnbqdxeqedeqebeleceqdtelelerbyfkavdcfiancwarbtfdcsbjdjfcbjctaebpddbpbf``````", +"````````bf`rfodpevcv`vfjcybz`idpefbhayapetblapfdciblcleqeteqeldldxdxdadadaesdadtadcdcfereqdldcekapap`wflbwayamcbbhcbasasdp`pbjakcvfjfo`y`y``````", +"````````ewdddidvdj`abzagdpcu`p`lbzambwfdbbclehdcerfeetetflfedaedbldxdadndaeddada`qdmcfeqdxdheqblfkap`waqfddq`fdgaycs`pcsefef`afjeveieifo`k``````", +"```````ybfevei`zft`afubzcsas`fam`fbwfaecdcdcdccfetbbblcieretedesed`h`heldm`qdafvdndleceqercledetaqbrapbkfaayfabwbz`fbiascs`p`j`vftf`a`epbu`t````", +"```````y`ybufnaefc`bdpcucs`pfubw`lbwbrdqdcehavfw`wcfcfereqfwercidt`hdae``qdtbqbqeddle`cfdtdxercifk`uavavecbwbw`fbz`m`mefay`jbc`d`aaobua`fg`t````", +"``````epbuddcvfjefca`bdsbzbzbhezbyaqaqbrdqehecdcfddccfeqdaedblazdtfhfhdxdtdnfednfvfvcfdtererdcehfl`wfkbkfafaap`fcefifiasasfudjbc`bcadudda``t````", +"``````a`foeoemak`adparcsarefaidwamapbwapbyazeheccfeccfdxbqesfmblesbqeldtdtbq`g`hfvbq`q`qeqerfweqclbbfmdhbwfa`ufubifxbtarcscb`b`bcv`v`vfgfgbu````", +"````atejfgfgcy`v`bbcfuasef`ffiezchco`uazezezap`uekdlererereqeddadnfvfved`ofvesesbqfvdle`dleddtdlclfmfkerbr`mapfibtbi`lbzfufuccfccvccdvfg`yfoat``", +"`````yfodiaj`v`v`x`bdpcsbzdeamamaxfkaqehfm`wav`ueteretbkbkcffhdxfednfefv`hbqdadxesfedtfwcfdtfwe`dcflcldlbkfdfibtap`fanfpayasao`idpagczfneifg`t``", +"````atfgfofgagccao`abjasbzcbfufxbibtbwfdapecdlavekerblbkeqeqdaesfedafvdndn`hfvfv`hdxeddtdtcffwdlecdhcleqehbkaqaqfkfkco`f`fayafctdjcadiajdv`yfo``", +"````atejbpczaocc`aaldpbzbzfudoen`mbtfiambtbtereretererbletetfeesbq`hfv`g`gdn`hdafhdabqfvbkbkdldlfwerclfkekecaqaqfdfidgef`b`pctccftakfoajfgbua```", +"````ata`befofoft`daldp`p`laubzambi`lby`lehfm`gavciererclfe`g`gfhdtdxed`g`gesfmdnfvfvdndnetdxedblblazfmfmapec`mfzcbarc`bzbxfcaoccftf`fgbcepfgbu``", +"`````y`yevbefjdv`xfpdp`jenbifd`lfufkfdbtazdw`merdtdtci`g`gfebledfhesdnfeesdafvededfvdaed`hdadaclflfmflezfibtbycobwfudgfuarfuds`v`xaodidia`atat``", +"````atfgaobudif`acfp`ebxacfu`fc`fxfdfdan`mdw`gaz`ocfekcletesdndxfecletesdn`h`hfvfhedclfheqfherek`gbyazfm`uaz`ubtamanfucbceaufcccccducaevfoatat``", +"````atfoejfof`fbcc`jcrbheffufualaxamfiancifkbbciehekflcleleqdadxfedn`gbq`hfvesdnblfmflbberedcletazeqazehapfm`w`lfubzcbcsbzcr`jdpacf`ftdvfn`yat``", +"````atfgbufodjfjdudp`afpfu`l`jfcbiefdoapavfkfketazbyazbldxdt`hes`hesdxdx`h`hesdndaet`gazeler`wazdhdhcidhanbxezfzchbibh`p`pfceffffcf`czfodd`yat``", +"````atatczdif``b`v`v`afffu`facfcfubidgfmcoez`lapbbap`gbbedecfhedetdaesesfv`h`qcifhfhdadletfl`wekfianfkcifk`lfkchfl`lbzcrcufc`ift`aaodddda`buat``", +"````at`tdif`dvagcycc`iff`pefcraxfz`fbianezfkap`uehfw`ufl`gcieqcderfh`hdnedeqdcfedmazdldxdl`gazaq`lfmfmdwfi`l`lan`wfdfucrc`fp`b`d`daoddbufnatat``", +"``````fga`f`dvdvcycc`xffdsdscrchezcrfzeffxezfieqecdlbkfebbcidh`qfhfhad`qelfedndadnfkblcfclcierazapaqdwaibhchaqanfxcecealfpef`x`bdvf`eiczfg`y````", +"``````at`yeiczeiajftftac`j`pfpaxalaxefbxfzch`maqfkbkerazclblbkdmdtdaaaedexfvaddafe`udmblflfkazbbazaqfiaqanbiamanaxfpbzds`pfcbcccdvftaoei`yep````", +"``````a`a`didif`f`acbxalfp`pbxax`jcefufzfzfmfmbbfifkfibkdhaveqelexfv`qcddndmcdadfeekdl`hflanfkfm`wfdfkapapbhcuefchcuau`bbz`jacccf``vdidvat`y````", +"``````a`epfoczdv`baoacefbxbzcscr`pfi`fcochchezez`mavekdcecfmfmdmfa`wdlapexcdcddmaabbazes`wfd`lan`maqaibwehapcofiauauau`befalbcdp`ddvfodieiat````", +"````````ata`difbftao`a`bbzfu`bagbzfdbrfiandoaiaifp`wekeqfw`wfkeke`apckaqelecerfkckcdfherer`ufk`wbyaqaidoanamanbzcufx`b`pbgbcbgccagdieiczep``````", +"````````at`yfgf`difbctagbzascrbcefaubififx`lananezdo`mcidhapav`uelcddcecape`dcflfaekbkeqekdwcofkfiapaidgefchbic`ffalftaldvf`bpf`fbdidia`a```````", +"````````at`yczddeiaof`dvfb`jbgccasc`crbhcrfpenchchcoanekeh`we``wfkelececaaek`qcdaqfk`ufiezdgdwfman`lbhenfzfzaifpcealcraoaodueobeajdifg`ya```````", +"``````````a`bueibueiajajddddbcbgalbzfcbh`j`pfpdoaichchavapdodmbtbyad`mfkbydweccfckaielfmbybt`l`mcodwanaxaxenbifxbzdsbxf`ftacfndkajfofgfg````````", +"``````````a``teifgbubeftdvafccbgalamef`j`dbxcofkaqcodo`famdgdeanaidqanape``me`fiaianfk`m`mbwfdapaqfzffenfpc`bhfu`pftagagft`jddddfofofga`````````", +"````````````fg`tbueibpf`dvevfbevbgfpfpcrenbxaxamfiananfkbiaxfpezezfxfkecbwbifzch`mezfiamdocochfi`lcobibibzfpfpbzcufjevccac`efgbubu`tej``````````", +"`````````````tbu`rejf`aodidvdjfcagacbzbhaxdochfxanfzfpbiaichanbychchchbt`lfzbhezcofxaiaichchaufzc`fxch`jdoffenefbgalbgbcbccceiddfo`y`r``````````", +"```````````````rejeifodvdvajacbcccccdgbibxfpdgaufuezfz`manfzanfxaufp`fcodocoezchchenauchfxchefff`jagffbxenbzbi`dftbc`edz`df`buddbudd````````````", +"```````````````y`rbuf`diaoajacbgevevcrfpfpfp`afffffc`faqfxchchfzc`dgfxdgbjfxaiaiancofxfpcodg`bffds`adgbxbzbz`e`v`vftbeev`zajf`ddei`t````````````", +"`````````````````yfoeyfbaj`zajbgevakalbxcccu`e`b`bc`efbic`axaxchfxfpezchbjfcdodochfx`fanbzcuaufxcv`bfp`pef`e`eeoeoaof`f`ajdv`rfn`r``````````````", +"``````````````````cn`rejeidvacdveoak`vccccfffpbibx`ac``jcucu`jfxbifxfpfxfxfxcodgc`aybiai`i`jch`j`a`edjagacbc`x`zfnddajf`eodvey`t````````````````", +"``````````````````eybfej`rejfoaoevcccc`v`xbcc`c`fffpbicubxcucuffc`cu`pfcfpdgbhdoaucu`jcuffbxbx`bcr`efjagbcfjeodkeodkevddfobpcney````````````````", +"````````````````````eyejbpejbpdddvaoaodjbcagbcft`jefchfxbiauc``a`ac`c`fc`afcfccufcenfp`jfffp`jdsfpftcycrbcccdz`zdkbebebfddbf`r``````````````````", +"``````````````````````cnbpeyfofofodudd`eacdjafcr`d`dcufpffef`jca`bff`jfcbxcuc`dsaecv`d`jds`dcy`vag`xagbcfteo`zbpfnbpbfej`r`r````````````````````", +"````````````````````````d`bpddbfbebgak`zfj`z`kdsdsbxffff`bdj`b`b`jcucucudgcueffp`b`bcacacvcvctct`dagcyfjccevddeoeybpd`ej`r``````````````````````", +"``````````````````````````eyddbp`r`k`z`zdzem`kfjfj`b`d`vdjcyctctcactctcv`dcr`bcvctaeaecv`b`jfjdsccakcveoakbedz`zd`ahewah````````````````````````", +"````````````````````````````ewcnbnbndd`kdzfjdzemakemae`zcv`dcaaeaecy`e`acadsag`vaeaecvakaffjcacrbcajfj`zbp`z`kfnewewcn``````````````````````````", +"```````````````````````````````rewbfbp`z`zbedzafcyakembeafctcaak`d`v`acvaeae`dff`dag`baeakfj`zcy`zbm`z`z`k`zbfd`ahcn````````````````````````````", +"```````````````````````````````````sd`eyfnbmeobm`zdz`saf`v`k`kcvbcag`bcvemaeaecvagcyaecvevafaf`zem`zd`dkbmd`bfbf````````````````````````````````", +"````````````````````````````````````ahewfoewbf`k`z`zdz`zafemememcvaf`kdz`vafaeafakemembmbpafdkdkbp`k`zbp`seyah``````````````````````````````````", +"`````````````````````````````````````````sah`zewdk`z`zdzaeaf`kemdzakakaeae`kemakemeo`z`kemdkbfbpdk`kd`d`bn``````````````````````````````````````", +"````````````````````````````````````````````ahbnbf`zd`d``sbm`kdz`sdkdk`sae`k`zbmd``k`sbmdz`kbnah`s`sbn``````````````````````````````````````````", +"````````````````````````````````````````````````bncnbmbnd`dkdkdkdkbm`sbnbnbndzd`d``sbm`sbfd`bnewah``````````````````````````````````````````````", +"``````````````````````````````````````````````````````cnd``s`s`sahd`dkbmbnbn`sbnd`bnbn`newah````````````````````````````````````````````````````", +"``````````````````````````````````````````````````````````````ahcn`sbnahewbn`sewahbn````````````````````````````````````````````````````````````", +"````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````", +"````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````" +}; +char **default_bubbles[] = {glass1, glass2, glass3, glass4, glass5, glass6, glass7, glass8, glass9, glass10, glass11, (char **)0}; + +int num_default_bubbles = 11; + +#endif /* NO_DEFAULT_BUBBLE */ diff --git a/hacks/compile_axp.com b/hacks/compile_axp.com new file mode 100644 index 00000000..b65f53eb --- /dev/null +++ b/hacks/compile_axp.com @@ -0,0 +1,51 @@ +$ 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]) 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 +$ 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 +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GREYNETIC.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HALO.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HELIX.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HOPALONG.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HYPERCUBE.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IFS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IMSMAP.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C +$ 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]) 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]) 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]) 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]) 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]) 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 +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SLIP.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPHERE.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPIRAL.C +$ 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]) XLOCKMORE.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,XLOCKMORE)/INCL=([],[-],[-.UTILS])/OBJ=SCREENHACK-XLOCK.OBJ SCREENHACK.C diff --git a/hacks/compile_decc.com b/hacks/compile_decc.com new file mode 100644 index 00000000..b65f53eb --- /dev/null +++ b/hacks/compile_decc.com @@ -0,0 +1,51 @@ +$ 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]) 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 +$ 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 +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GREYNETIC.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HALO.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HELIX.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HOPALONG.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HYPERCUBE.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IFS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IMSMAP.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C +$ 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]) 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]) 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]) 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]) 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]) 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 +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SLIP.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPHERE.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPIRAL.C +$ 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]) XLOCKMORE.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,XLOCKMORE)/INCL=([],[-],[-.UTILS])/OBJ=SCREENHACK-XLOCK.OBJ SCREENHACK.C diff --git a/hacks/decayscreen.c b/hacks/decayscreen.c new file mode 100644 index 00000000..60450049 --- /dev/null +++ b/hacks/decayscreen.c @@ -0,0 +1,139 @@ +/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997 + * 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. + */ + +/* decayscreen + * + * Based on slidescreen program from the xscreensaver application and the + * decay program for Sun framebuffers. This is the comment from the decay.c + * file: + + * decay.c + * find the screen bitmap for the console and make it "decay" by + * randomly shifting random rectangles by one pixelwidth at a time. + * + * by David Wald, 1988 + * rewritten by Natuerlich! + * based on a similar "utility" on the Apollo ring at Yale. + + * X version by + * + * Vivek Khera + * 5-AUG-1993 + */ + +#include "screenhack.h" + +static int sizex, sizey; +static int delay; +static GC gc; + +static void +init_decay (Display *dpy, Window window) +{ + XGCValues gcv; + XWindowAttributes xgwa; + + delay = get_integer_resource ("delay", "Integer"); + + if (delay < 0) delay = 0; + + gcv.function = GXcopy; + gcv.subwindow_mode = IncludeInferiors; + gc = XCreateGC (dpy, window, GCForeground |GCFunction | GCSubwindowMode, + &gcv); + + XGetWindowAttributes (dpy, window, &xgwa); + sizex = xgwa.width; + sizey = xgwa.height; + + grab_screen_image (xgwa.screen, window); +} + + +/* + * perform one iteration of decay + */ +static void +decay1 (Display *dpy, Window window) +{ + int left, top, width, height; + +#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; + } + XSync (dpy, True); +#undef nrnd +} + + +char *progclass = "DecayScreen"; + +char *defaults [] = { + "*dontClearRoot: True", + +#ifdef __sgi /* really, HAVE_READ_DISPLAY_EXTENSION */ + "*visualID: Best", +#endif + + "*delay: 10", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_decay (dpy, window); + while (1) { + decay1 (dpy, window); + if (delay) usleep (delay); + } +} diff --git a/hacks/decayscreen.man b/hacks/decayscreen.man new file mode 100644 index 00000000..007301bc --- /dev/null +++ b/hacks/decayscreen.man @@ -0,0 +1,53 @@ +.TH XScreenSaver 1 "05-aug-93" "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] +.SH DESCRIPTION +The \fIdecayscreen\fP program creates a melting effect by randomly +shifting rectangles around the screen. +.SH OPTIONS +.I decayscreen +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 \-delay \fImicroseconds\fP +Slow it down. +.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" +X(1), +xscreensaver(1) +.SH COPYRIGHT +Copyright 1992 by Vivek Khera. 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 +Vivek Khera , 05-Aug-93; based on code by David Wald, 1988. diff --git a/hacks/deco.c b/hacks/deco.c new file mode 100644 index 00000000..bd9e62d8 --- /dev/null +++ b/hacks/deco.c @@ -0,0 +1,152 @@ +/* xscreensaver, Copyright (c) 1997 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. + * + * Concept snarfed from Michael D. Bayne in + * http://www.go2net.com/internet/deep/1997/04/16/body.html + */ + +#include "screenhack.h" +#include + +static XColor colors[255]; +static int ncolors = 0; +static int max_depth = 0; +static int min_height = 0; +static int min_width = 0; + +static void +deco (Display *dpy, + Window window, + Colormap cmap, + GC fgc, GC bgc, + int x, int y, int w, int h, int depth) +{ + if (((random() % max_depth) < depth) || (w < min_width) || (h < min_height)) + { + if (!mono_p) + { + static int current_color = 0; + if (++current_color >= ncolors) + current_color = 0; + XSetForeground(dpy, bgc, colors[current_color].pixel); + } + XFillRectangle (dpy, window, bgc, x, y, w, h); + XDrawRectangle (dpy, window, fgc, x, y, w, h); + } + else + { + if (random() & 1) + { + deco (dpy, window, cmap, fgc, bgc, x, y, w/2, h, depth+1); + deco (dpy, window, cmap, fgc, bgc, x+w/2, y, w/2, h, depth+1); + } + else + { + deco (dpy, window, cmap, fgc, bgc, x, y, w, h/2, depth+1); + deco (dpy, window, cmap, fgc, bgc, x, y+h/2, w, h/2, depth+1); + } + } +} + + +char *progclass = "Deco"; + +char *defaults [] = { + "Deco.background: black", /* to placate SGI */ + "Deco.foreground: white", + "*maxDepth: 12", + "*minWidth: 20", + "*minHeight: 20", + "*cycle: False", + "*delay: 5", + "*cycleDelay: 1000000", + "*ncolors: 64", + 0 +}; + +XrmOptionDescRec options [] = { + { "-max-depth", ".maxDepth", XrmoptionSepArg, 0 }, + { "-min-width", ".minWidth", XrmoptionSepArg, 0 }, + { "-min-height", ".minHeight", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-ncolors", ".ncolors", XrmoptionSepArg, 0 }, + { "-cycle", ".cycle", XrmoptionNoArg, "True" }, + { "-no-cycle", ".cycle", XrmoptionNoArg, "False" }, + { "-cycle-delay", ".cycleDelay", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + GC fgc, bgc; + XGCValues gcv; + XWindowAttributes xgwa; + int delay = get_integer_resource ("delay", "Integer"); + int cycle_delay = get_integer_resource ("cycleDelay", "Integer"); + Bool writable = get_boolean_resource ("cycle", "Boolean"); + + max_depth = get_integer_resource ("maxDepth", "Integer"); + if (max_depth < 1) max_depth = 1; + else if (max_depth > 1000) max_depth = 1000; + + min_width = get_integer_resource ("minWidth", "Integer"); + if (min_width < 2) min_width = 2; + min_height = get_integer_resource ("minHeight", "Integer"); + if (min_height < 2) min_height = 2; + + XGetWindowAttributes (dpy, window, &xgwa); + + gcv.foreground = get_pixel_resource("foreground", "Foreground", + dpy, xgwa.colormap); + fgc = XCreateGC (dpy, window, GCForeground, &gcv); + + gcv.foreground = get_pixel_resource("background", "Background", + dpy, xgwa.colormap); + bgc = XCreateGC (dpy, window, GCForeground, &gcv); + + ncolors = get_integer_resource ("ncolors", "Integer"); + + make_random_colormap (dpy, xgwa.visual, xgwa.colormap, colors, &ncolors, + False, True, &writable, True); + + if (ncolors <= 2) + mono_p = True; + + if (!mono_p) + { + GC tmp = fgc; + fgc = bgc; + bgc = tmp; + } + + while (1) + { + XGetWindowAttributes (dpy, window, &xgwa); + XFillRectangle(dpy, window, bgc, 0, 0, xgwa.width, xgwa.height); + deco (dpy, window, xgwa.colormap, fgc, bgc, + 0, 0, xgwa.width, xgwa.height, 0); + XSync (dpy, True); + + if (!delay) continue; + if (!writable) + sleep (delay); + else + { + time_t start = time((time_t) 0); + while (start - delay < time((time_t) 0)) + { + rotate_colors (dpy, xgwa.colormap, colors, ncolors, 1); + if (cycle_delay) + usleep (cycle_delay); + } + } + } +} diff --git a/hacks/deco.man b/hacks/deco.man new file mode 100644 index 00000000..e9f61c54 --- /dev/null +++ b/hacks/deco.man @@ -0,0 +1,72 @@ +.TH XScreenSaver 1 "27-Apr-97" "X Version 11" +.SH NAME +deco - draw tacky 70s basement wall panelling +.SH SYNOPSIS +.B deco +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-max\-depth \fIint\fP] [\-min\-width \fIint\fP] [\-min\-height \fIint\fP] [\-cycle] [\-no\-cycle] [\-cycle\-delay] +.SH DESCRIPTION +The \fIdeco\fP program subdivides and colors rectangles randomly. +It looks kind of like Brady-Bunch-era rec-room wall paneling. +(Raven says: "this screensaver is ugly enough to peel paint.") +.SH OPTIONS +.I deco +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 \-delay \fIseconds\fP +How long to wait before starting over. Default 5 seconds. +.TP 8 +.B \-max\-depth \fIinteger\fP +How deep to subdivide. Default 12. +Default 8. +.TP 8 +.B \-min-width \fIinteger\fP +.B \-min-height \fIinteger\fP +The size of the smallest rectangle to draw. Default 20x20. +.TP 8 +.B \-cycle +.TP 8 +.B \-no\-cycle +Whether to do color cycling. Default False. +.TP 8 +.B \-cycle\-delay \fIusecs\fP +If color cycling, how often to change the colors. Default 1000000, +or 1 second. +.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 , 26-Apr-97, based on code by +Michael D. Bayne . diff --git a/hacks/default.xbm b/hacks/default.xbm new file mode 100644 index 00000000..dcd2ff50 --- /dev/null +++ b/hacks/default.xbm @@ -0,0 +1,1686 @@ +#define logo_width 464 +#define logo_height 435 +static unsigned char logo_bits[] = { +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x60, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x60,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xf0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf8,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf8,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf8,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc,0x01, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfc,0x01,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfc,0x03,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfc,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfe,0x07,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0x07,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfe,0x07,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff, +0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xff,0x0f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0x0f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0xff,0x3f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x80,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x80,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0x7f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0x7f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xe0,0xff,0x7f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xe0,0xff,0xff,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf0,0xff,0xff,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf0,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff, +0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xf8,0xff,0xff,0x03, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0x03,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfc,0xff,0xff,0x03,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfc,0xff,0xff,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfc,0xff,0xff,0x07,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfe,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfe, +0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0xff, +0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff,0x0f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0xff,0xff,0x1f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0xff,0xff,0xff,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x80,0xff,0xff,0xff,0x1f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x80,0xff,0xff,0xff,0x1f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0xff,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff, +0xff,0x7f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0xff,0x7f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0xff,0x7f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0xff,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xe0,0xff,0xff,0xff,0xff,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf0,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff, +0xff,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0xff,0xff, +0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xf8,0xff,0xff,0xff,0xff,0x03, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xf8,0xff,0xff,0xff,0xff,0x03,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf8,0xff,0xff,0xff,0xff,0x03,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xf8,0xff,0xff,0xff,0xff,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfc,0xff,0xdf,0xff,0xff,0x07,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfe, +0xff,0xdf,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0x8f, +0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0x0f,0xff,0xff, +0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xfe,0xff,0x0f,0xff,0xff,0x0f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xff,0xff,0x07,0xff,0xff,0x1f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xff,0xff,0x07,0xff,0xff,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x80,0xff,0xff,0x07,0xfe,0xff,0x1f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0xff,0xff,0x03,0xfc,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff, +0x03,0xfc,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0x03,0xfc, +0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0x01,0xf8,0xff,0x7f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xe0,0xff,0xff,0x01,0xf8,0xff,0x7f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xe0,0xff,0xff,0,0xf0,0x03,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xe0,0xff,0xff,0,0xf0,0x03,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xe0,0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff, +0x01,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xf0,0x07,0,0, +0x80,0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xf8,0xff,0xff, +0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xf8,0xff,0xff,0xff,0xff, +0x03,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xc0,0xff,0xff,0xff,0x03,0,0,0xe0,0xff,0x7f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfc,0xff,0xff,0,0,0,0,0,0xe0,0xff,0x07,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff, +0x7f,0xfe,0,0,0,0,0,0,0xfc,0x7f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0x01,0xfe, +0x01,0,0,0,0,0,0xc0,0xff,0x03,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfe,0xff,0x01,0xfe,0x01,0, +0,0,0,0,0xc0,0xff,0x03,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf0,0xff,0x07,0,0xce,0x07,0,0,0, +0,0,0,0xfe,0x1f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xfe,0x7f,0,0,0x87,0x1f,0,0,0,0,0, +0,0xc0,0xff,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xe0,0xff,0x07,0,0x80,0x03,0x3e,0,0,0,0,0,0,0, +0xfe,0x07,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc, +0x3f,0,0,0x80,0x03,0xf8,0,0,0,0,0,0,0,0xe0,0x3f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xfc,0x3f,0, +0,0x80,0x03,0xf8,0,0,0,0,0,0,0,0xe0,0x3f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0x07,0,0,0xc0, +0x01,0xe0,0x01,0,0,0,0,0,0,0,0xff,0x01,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xf0,0xff,0x7f,0,0,0xc0,0xfb,0xff, +0x0f,0,0,0,0,0,0,0,0xf0,0x0f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfe,0xff,0xff,0x07,0,0xc0,0xff,0xff,0x3f,0, +0,0,0,0,0,0,0x80,0xff,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x80,0xff,0xc0,0xff,0x7f,0,0xe0,0xff,0xff,0x7f,0,0,0, +0,0,0,0,0,0xfe,0x01,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x80,0xff,0xc0,0xff,0x7f,0,0xe0,0xff,0xff,0x7f,0,0,0,0,0, +0,0,0,0xfe,0x01,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0,0x1f, +0,0xf8,0xff,0x0f,0xf0,0x0f,0xc0,0xff,0x01,0,0,0,0,0,0, +0,0xf0,0x0f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xe0,0x0f,0,0, +0xff,0x7f,0xf0,0x01,0,0xf8,0x03,0,0,0,0,0,0,0,0xc0, +0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xf0,0x01,0,0,0x80,0xff, +0x7b,0,0,0xe0,0x07,0,0,0,0,0,0,0,0,0xfe,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xf8,0,0,0,0,0xfc,0x3f,0, +0,0x80,0x1f,0,0,0,0,0,0,0,0,0xf0,0x03,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf8,0,0,0,0,0xfc,0x3f,0,0,0x80, +0x1f,0,0,0,0,0,0,0,0,0xf0,0x03,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x3c,0,0,0,0,0xe0,0x7f,0,0,0,0x7e,0, +0,0,0,0,0,0,0,0xe0,0x0f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x3e,0,0,0,0,0,0xff,0x03,0,0,0x70,0,0,0, +0,0,0,0,0,0x80,0x3f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x80,0x0f, +0,0,0,0,0,0xf0,0x1f,0,0,0,0,0,0,0,0, +0,0,0,0,0xfc,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xc0,0x0f,0,0, +0,0,0,0,0xfe,0x01,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xc0,0x07,0,0,0,0, +0,0,0xf8,0x07,0,0,0,0,0,0,0,0,0,0,0, +0xe0,0x07,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xc0,0x07,0,0,0,0,0,0, +0xf8,0x07,0,0,0,0,0,0,0,0,0,0,0,0xe0,0x07, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xe0,0x03,0,0,0,0,0,0,0xe0,0x3f, +0,0,0,0,0,0,0,0,0,0,0,0x80,0x0f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xf0,0x01,0,0,0,0,0,0,0x80,0xff,0,0, +0,0,0,0,0,0,0,0,0,0,0x3f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xf8,0x01,0,0,0,0,0,0,0,0xfc,0x07,0,0,0, +0,0,0,0,0,0,0,0,0x7c,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xf8, +0,0,0,0xfe,0x03,0,0,0,0xf0,0x0f,0,0,0,0,0, +0,0,0,0,0,0,0xf8,0x01,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xf8,0,0, +0,0xfe,0x03,0,0,0,0xf0,0x0f,0,0,0,0,0,0,0, +0,0,0,0,0xf8,0x01,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xfc,0,0,0xf0,0xff, +0x1f,0,0,0,0x80,0x7f,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0x03,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x3f,0,0,0xfc,0xff,0x7f,0, +0,0,0,0xfe,0x01,0,0,0,0,0,0,0,0,0,0, +0xc0,0x07,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0x1f,0,0,0xff,0x47,0x7f,0,0,0, +0,0xf8,0x0f,0,0,0,0,0,0,0,0,0,0,0x80,0x0f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xf0,0x07,0x80,0xff,0xff,0x3f,0x7c,0,0,0,0,0xc0, +0xff,0,0,0,0,0,0,0,0,0,0,0,0x3e,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xf0,0x07,0x80,0xff,0xff,0x3f,0x7c,0,0,0,0,0xc0,0xff,0, +0,0,0,0,0,0,0,0,0,0,0x3e,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc, +0x03,0xc0,0xff,0xfe,0xff,0x7d,0,0,0,0,0x80,0xff,0x01,0,0, +0,0,0,0,0,0,0,0,0x7c,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0,0x40, +0,0,0xfe,0x7f,0,0,0,0,0x80,0xff,0x07,0,0,0,0, +0,0,0,0,0,0,0xf0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xf0,0x3f,0,0,0x80,0x03, +0xf8,0x3f,0,0,0,0,0x80,0xe7,0x1f,0,0,0,0,0,0, +0,0,0,0,0xf0,0x01,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfe,0x0f,0,0,0xf0,0xff,0xff,0x1f, +0,0,0,0,0x80,0xc7,0x7f,0,0,0,0,0,0,0,0, +0,0,0xe0,0x03,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfe,0x0f,0,0,0xf0,0xff,0xff,0x1f,0,0, +0,0,0x80,0xc7,0x7f,0,0,0,0,0,0,0,0,0,0, +0xe0,0x03,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xc0,0xff,0x03,0,0,0xf0,0xff,0xff,0x0f,0,0,0,0, +0xc0,0x0f,0xff,0x01,0,0,0,0,0,0,0,0,0,0xc0,0x07, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf0,0x7f,0,0,0,0xc0,0xff,0xff,0x01,0,0,0,0,0xc0,0x0f, +0xfc,0x07,0,0,0,0,0,0,0,0,0,0x80,0x0f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0x0f, +0,0,0,0,0,0,0,0,0,0,0,0xc0,0x0f,0xf0,0x0f, +0,0,0,0,0,0,0,0,0,0,0x1f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0x80,0xff,0x01,0,0, +0,0,0,0,0,0,0,0,0,0xe0,0x1f,0x80,0x3f,0,0, +0,0,0,0,0,0,0,0,0x1c,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf8,0x0f,0,0,0,0,0, +0,0,0,0,0,0,0,0xf0,0x1c,0,0xfe,0x03,0,0,0, +0,0,0,0,0,0,0x78,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf8,0x0f,0,0,0,0,0,0,0, +0,0,0,0,0,0xf0,0x1c,0,0xfe,0x03,0,0,0,0,0, +0,0,0,0,0x78,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xfe,0x01,0,0,0,0,0,0,0,0,0, +0,0,0,0x70,0x1c,0,0xf0,0x07,0,0,0,0,0,0,0, +0,0,0xf0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x3f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x70,0x38,0,0xc0,0x1f,0,0,0,0,0,0,0,0,0, +0xe0,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x80, +0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0,0x70, +0x78,0,0,0x7f,0,0,0,0,0,0,0,0,0,0xc0,0x03, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xc0,0x03,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x70,0x70,0, +0,0xfc,0,0,0,0,0,0,0,0,0,0xc0,0x07,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xc0,0x03,0,0,0, +0,0,0,0,0,0,0,0,0,0,0x70,0x70,0,0,0xfc, +0,0,0,0,0,0,0,0,0,0xc0,0x07,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xc0,0x01,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x38,0x70,0,0,0xfe,0x03,0xfe, +0x7f,0,0,0,0,0,0,0,0x0f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xe0,0x01,0,0,0,0,0,0,0, +0,0,0,0,0,0,0x38,0xf0,0,0,0xfe,0x0f,0xff,0xff,0x01, +0,0,0,0,0,0,0x0f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xe0,0x01,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x18,0xe0,0,0x80,0x9f,0xff,0x3f,0xfe,0x03,0,0, +0,0,0,0,0x0f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xe0,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x1c,0xe0,0,0x80,0x0f,0xff,0x07,0xc0,0x0f,0,0,0,0, +0,0,0x1e,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xe0,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1c,0xe0,0,0x80,0x0f,0xff,0x07,0xc0,0x0f,0,0,0,0,0,0, +0x1e,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0,0xf1, +0x1f,0,0,0,0,0,0,0,0,0,0,0,0,0x0e,0xe0, +0,0xc0,0x07,0xfc,0x01,0,0x1f,0,0,0,0,0,0,0x3e,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xc0,0xe1,0xff,0, +0,0,0,0,0,0,0,0,0,0,0,0x0e,0xe0,0x01,0xe0, +0x03,0x60,0,0,0x38,0,0,0,0,0,0,0x3c,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xc0,0xc3,0xff,0x01,0,0, +0,0,0,0,0,0,0,0,0,0x07,0xc0,0x01,0xf0,0x01,0, +0xe0,0x03,0xf0,0,0,0,0,0,0,0x38,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0x07,0xf0,0x03,0,0,0,0, +0,0,0,0,0,0,0,0x07,0xc0,0x03,0xf8,0,0,0xf8,0x1f, +0xe0,0,0,0,0,0,0,0x38,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0x07,0xf0,0x03,0,0,0,0,0,0, +0,0,0,0,0,0x07,0xc0,0x03,0xf8,0,0,0xf8,0x1f,0xe0,0, +0,0,0,0,0,0x38,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x80,0x0f,0xc0,0x07,0,0,0,0,0,0,0,0, +0,0,0,0x07,0x80,0x03,0x78,0,0,0xf8,0x7f,0xe0,0x01,0,0, +0,0,0,0x78,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x0f,0x80,0x0f,0,0,0,0,0,0,0,0,0,0, +0x80,0x03,0x80,0x03,0x3e,0,0,0x78,0x7e,0xc0,0x03,0,0,0,0, +0,0x78,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1e,0x1c,0x0f,0,0,0,0,0,0,0,0,0,0,0x80,0xf3, +0x9f,0x03,0x1f,0,0,0,0xf0,0x80,0x03,0,0,0,0,0,0x70, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x1e,0xfe, +0x0f,0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0x07, +0x0f,0,0,0,0xe0,0,0x07,0,0,0,0,0,0x70,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x1e,0xfe,0x0f,0, +0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0x07,0x0f,0, +0,0,0xe0,0,0x07,0,0,0,0,0,0x70,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x7c,0xfc,0x0f,0,0,0, +0,0,0,0,0,0,0,0xc0,0xff,0xff,0x87,0x07,0,0,0, +0xe0,0,0x07,0,0,0,0,0,0x70,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x7c,0xf8,0x0f,0,0,0,0,0, +0,0,0,0,0,0xc0,0x3f,0xf4,0xc7,0x07,0,0,0,0xe0,0, +0x07,0,0,0,0,0,0x70,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf0,0x01,0,0,0,0,0,0,0,0, +0,0,0,0xe0,0x03,0x80,0xe7,0x01,0,0,0,0xe0,0,0x07,0, +0,0,0,0,0xe0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xf0,0x03,0,0,0,0,0,0,0,0,0,0, +0,0xe0,0,0,0xff,0x01,0,0,0,0xe0,0x80,0x07,0,0,0, +0,0,0xe0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xe0,0x03,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xff,0,0,0,0,0xf8,0x80,0x03,0,0,0,0,0, +0xe0,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xe0, +0x03,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xff,0,0,0,0,0xf8,0x80,0x03,0,0,0,0,0,0xe0,0x01, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x80,0x07,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x7e,0, +0,0,0,0x7c,0xc0,0x01,0,0,0,0,0,0xe0,0x01,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x1f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x3e,0,0x80,0x07, +0xe0,0x3f,0xe0,0x01,0,0,0,0,0,0xc0,0x01,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x1e,0,0xc0,0xff,0xff,0x0f, +0xe0,0,0,0,0,0,0,0xc0,0x01,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x1e,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x1f,0,0xe0,0xff,0xff,0x03,0xe0,0, +0,0,0,0,0,0xc0,0x01,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x1e,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x1f,0,0xe0,0xff,0xff,0x03,0xe0,0,0,0, +0,0,0,0xc0,0x01,0,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0x3f,0,0x1e,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x80,0x07,0,0x80,0xff,0x7f,0,0xf8,0x01,0,0,0,0, +0,0xc0,0x01,0,0,0,0,0,0,0,0,0,0,0,0, +0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0x03,0x1e,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xc0,0x07,0,0,0,0,0,0xfc,0x07,0,0,0,0,0,0xc0, +0x01,0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x1e, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0x03, +0,0,0,0,0,0xfe,0x0f,0,0,0,0,0,0xc0,0x01,0, +0,0,0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x0f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xf0,0x01,0,0, +0,0,0x80,0xcf,0x3f,0,0,0xfe,0x01,0,0xc0,0x01,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x0f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xf0,0x01,0,0,0,0, +0x80,0xcf,0x3f,0,0,0xfe,0x01,0,0xc0,0x01,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x0f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xf0,0,0,0,0,0,0xe0,0xe7, +0xff,0,0,0xfe,0x0f,0,0xc0,0xe1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0x03,0,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0x03,0x0f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x7c,0,0,0,0,0xf0,0xff,0xf9,0xff,0x01, +0,0xe0,0x1f,0,0xc0,0xe1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0x03,0,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0x03,0x0f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x7e,0,0,0,0xc0,0xff,0x7f,0xfe,0xe1,0x07,0,0xc0, +0xff,0,0xc0,0xe1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0x01,0,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0x03,0x07,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x1e,0,0,0,0xfc,0xff,0x1f,0xff,0x81,0x0f,0,0x80,0xf1,0x03, +0xc0,0xe1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0,0, +0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, +0x07,0,0,0,0,0,0,0,0,0,0,0,0,0,0x1e, +0,0,0,0xfc,0xff,0x1f,0xff,0x81,0x0f,0,0x80,0xf1,0x03,0xc0,0xe1, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0,0,0xc0,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x81,0x0f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1f,0,0, +0,0xff,0x3f,0x80,0xff,0,0x1f,0,0x80,0xc1,0x07,0xc0,0xe1,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0,0,0,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc1,0xff,0x3f,0,0, +0,0,0,0,0,0,0,0,0,0x80,0x0f,0,0x03,0xc0,0x3f, +0,0xe0,0x7f,0,0x7e,0,0x80,0x01,0x1f,0xe0,0xe1,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0,0,0,0xfc,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0x03,0,0,0, +0,0,0,0,0,0,0,0x80,0x0f,0x80,0x07,0xf0,0x07,0,0xf0, +0x3f,0,0xf8,0,0x80,0x01,0x3c,0xe0,0xe1,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0x03,0,0,0,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0x7f,0,0,0,0,0, +0,0,0,0,0,0xc0,0x03,0x80,0xff,0xff,0x01,0,0xfc,0x1f,0, +0xf0,0x01,0xc0,0x01,0x38,0xe0,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0,0,0,0,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0x7f,0xf0,0,0xf8,0xff,0x07,0,0,0,0,0,0, +0,0,0,0xe0,0x03,0,0xfe,0x1f,0,0x80,0xbf,0x07,0,0x80,0x07, +0xc0,0x01,0xe0,0xf1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, +0,0,0,0,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0x7f,0xf0,0,0xf8,0xff,0x07,0,0,0,0,0,0,0,0, +0,0xe0,0x03,0,0xfe,0x1f,0,0x80,0xbf,0x07,0,0x80,0x07,0xc0,0x01, +0xe0,0xf1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0,0, +0,0,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, +0xf0,0,0,0xfe,0x7f,0,0,0,0,0,0,0,0,0,0xf0, +0x01,0,0xf8,0x03,0,0xc0,0xcf,0x03,0,0x80,0x1f,0xf0,0x01,0xe0,0x71, +0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0,0,0,0, +0,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf0,0, +0,0xe0,0xff,0x03,0,0,0,0,0,0,0,0,0xf8,0,0, +0,0,0,0xe0,0xe7,0x03,0,0,0x7e,0xff,0,0xc0,0x73,0xf0,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0,0,0,0,0,0xfc, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xf0,0,0,0, +0xfc,0x1f,0,0,0,0,0,0,0,0,0x78,0,0,0,0, +0,0xf8,0xf3,0,0,0,0xfc,0x7f,0,0,0x7f,0xf0,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0xf0,0xff,0xff, +0xff,0x1f,0,0,0,0,0,0,0,0xf0,0,0,0,0xe0,0xff, +0,0,0,0,0,0,0,0,0x3c,0,0,0,0,0,0x7c, +0xf8,0,0,0,0xf8,0xff,0xff,0xff,0x7f,0xf0,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0x7f,0,0,0,0,0,0,0xf0,0xff,0xff,0xff,0x1f, +0,0,0,0,0,0,0,0xf0,0,0,0,0xe0,0xff,0,0, +0,0,0,0,0,0,0x3c,0,0,0,0,0,0x7c,0xf8,0, +0,0,0xf8,0xff,0xff,0xff,0x7f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0x7f,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0x3f,0,0, +0,0,0,0,0,0x70,0,0,0,0x80,0xff,0x0f,0,0,0, +0,0,0,0,0x3e,0,0,0,0,0,0x7f,0x7c,0,0,0, +0xe0,0xff,0xff,0xff,0x7f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, +0,0,0,0,0,0,0x80,0xff,0xff,0xff,0xff,0,0,0,0, +0,0,0,0x78,0,0,0,0,0xfe,0x7f,0,0,0,0,0, +0,0,0x1e,0,0,0,0,0xc0,0x1f,0x3e,0,0,0,0xc0,0xff, +0xff,0xff,0x7f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0,0, +0,0,0,0,0,0xff,0xff,0xff,0xff,0x01,0,0,0,0,0, +0,0x7c,0,0,0,0,0xf0,0xff,0x03,0,0,0,0,0,0, +0x0f,0,0,0,0,0xe0,0x07,0x1f,0,0,0,0x80,0x0f,0,0, +0x3c,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0,0,0,0, +0,0,0,0xfc,0xff,0xff,0xff,0x07,0,0,0,0,0,0,0x3c, +0,0,0,0,0,0xfe,0x0f,0,0,0,0,0,0,0x0f,0, +0,0,0,0xfc,0x83,0x0f,0,0,0,0,0x0f,0,0,0x38,0xf0, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0,0,0,0,0,0, +0,0xfc,0xff,0xff,0xff,0x07,0,0,0,0,0,0,0x3c,0,0, +0,0,0,0xfe,0x0f,0,0,0,0,0,0,0x0f,0,0,0, +0,0xfc,0x83,0x0f,0,0,0,0,0x0f,0,0,0x38,0xf0,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0x01,0,0,0,0,0,0,0,0xf0, +0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0x1e,0,0,0,0xf8, +0xff,0xff,0x3f,0,0,0,0,0,0x80,0x07,0,0,0,0,0xff, +0x80,0x07,0,0,0,0,0x3e,0,0,0x38,0,0,0,0,0, +0xff,0xff,0xff,0x7f,0,0,0,0,0,0,0,0,0xc0,0xff,0xff, +0xff,0x7f,0,0,0,0,0,0,0x0f,0,0,0,0xff,0xff,0xff, +0xff,0x03,0,0,0,0,0xe0,0x01,0,0,0,0xe0,0x1f,0xe0,0x03, +0,0,0,0,0x78,0,0,0x1c,0,0,0,0,0xe0,0xff,0xff, +0xff,0x0f,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff,0xff, +0,0,0,0,0,0x80,0x0f,0,0,0,0xff,0x3f,0xe0,0xff,0x0f, +0,0,0,0,0xf0,0x01,0,0,0,0xf8,0x07,0xf0,0x01,0,0, +0,0,0xf0,0x01,0,0x1e,0,0,0,0,0xf0,0xff,0xff,0xff,0x07, +0,0,0,0,0,0,0,0,0,0xfe,0xff,0xff,0xff,0x03,0, +0,0,0,0x80,0x07,0,0,0,0xe0,0xff,0x01,0xfe,0x3f,0,0, +0,0,0xf0,0,0,0,0,0xfe,0x01,0xf8,0,0,0,0,0, +0xc0,0x03,0,0x0e,0,0,0,0,0xfc,0xff,0xff,0xff,0x01,0,0, +0,0,0,0,0,0,0,0xfe,0xff,0xff,0xff,0x03,0,0,0, +0,0x80,0x07,0,0,0,0xe0,0xff,0x01,0xfe,0x3f,0,0,0,0, +0xf0,0,0,0,0,0xfe,0x01,0xf8,0,0,0,0,0,0xc0,0x03, +0,0x0e,0,0,0,0,0xfc,0xff,0xff,0xff,0x01,0,0,0,0, +0,0,0,0,0,0xf8,0xff,0xff,0xff,0x07,0,0,0,0,0x80, +0x07,0,0,0,0,0xf8,0x07,0xc0,0xff,0x01,0,0,0,0xf8,0, +0,0,0x80,0x7f,0,0x78,0,0,0,0,0,0xc0,0x0f,0,0x0e, +0,0,0,0,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0, +0,0,0,0xf0,0xff,0xff,0xff,0x1f,0,0,0,0,0xc0,0xe3,0xff, +0xff,0,0,0xc0,0x1f,0x80,0xff,0x03,0,0,0,0x3c,0,0,0, +0xe0,0x1f,0,0x3e,0,0,0,0,0,0,0x0f,0,0x07,0,0, +0,0x80,0xff,0xff,0xff,0x1f,0,0,0,0,0,0,0,0,0, +0,0xc0,0xff,0xff,0xff,0x7f,0,0,0,0,0xc0,0xfb,0xff,0xff,0x0f, +0,0,0x3e,0x80,0xf3,0x1f,0,0,0,0x3e,0,0,0,0xf8,0x07, +0,0x1e,0,0,0,0,0,0,0x1e,0,0x07,0,0,0,0xe0, +0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0, +0xff,0xff,0xff,0xff,0,0,0,0,0xc0,0xff,0xff,0xff,0xff,0,0, +0x7c,0xc0,0x81,0xff,0,0,0,0x1f,0,0,0,0xff,0x01,0,0x0f, +0,0,0,0,0,0,0x7c,0x80,0x07,0,0,0,0xf0,0xff,0xff, +0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff, +0xff,0xff,0x03,0,0,0,0xc0,0x7f,0,0xe0,0xff,0x3f,0,0xf0,0xc0, +0x01,0xfe,0x03,0,0,0x0f,0,0,0xc0,0x7f,0,0xc0,0x07,0,0, +0,0,0,0,0xf0,0xc0,0x03,0,0,0,0xfc,0xff,0xff,0xff,0, +0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff, +0x03,0,0,0,0xc0,0x7f,0,0xe0,0xff,0x3f,0,0xf0,0xc0,0x01,0xfe, +0x03,0,0,0x0f,0,0,0xc0,0x7f,0,0xc0,0x07,0,0,0,0, +0,0,0xf0,0xc0,0x03,0,0,0,0xfc,0xff,0xff,0xff,0,0,0, +0,0,0,0,0,0,0,0,0,0xf8,0xff,0xff,0xff,0x07,0, +0,0,0xc0,0x0f,0,0,0xfc,0xff,0x03,0xc0,0xe3,0x01,0xf0,0x07,0, +0x80,0x07,0,0,0xf0,0x1f,0,0xc0,0x07,0,0,0,0,0,0, +0xf0,0xc1,0x01,0,0,0,0xff,0xff,0xff,0x7f,0,0,0,0,0, +0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0x1f,0,0,0, +0xc0,0x07,0,0,0,0xfc,0xff,0,0xf7,0,0,0x3f,0,0xc0,0x03, +0,0,0xff,0,0,0xe0,0x01,0,0,0,0,0,0,0xc0,0xe3, +0x01,0,0,0xc0,0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0xff,0xff,0xff,0xff,0,0,0,0xc0,0x01, +0,0,0,0xc0,0xff,0x07,0x7f,0,0,0xfc,0,0xe0,0x03,0,0xe0, +0x3f,0,0,0xf0,0x01,0,0,0,0,0,0,0x80,0xff,0,0, +0,0xf0,0xff,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xfe,0xff,0xff,0xff,0,0,0,0xc0,0x01,0,0, +0,0,0xfe,0x7f,0x7f,0,0,0xf8,0x01,0xe0,0x01,0,0xfc,0x07,0, +0,0xf8,0,0,0,0,0,0,0,0,0xff,0,0,0,0xfc, +0xff,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xfe,0xff,0xff,0xff,0,0,0,0xc0,0x01,0,0,0,0, +0xfe,0x7f,0x7f,0,0,0xf8,0x01,0xe0,0x01,0,0xfc,0x07,0,0,0xf8, +0,0,0,0,0,0,0,0,0xff,0,0,0,0xfc,0xff,0xff, +0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0xff,0xff,0x03,0,0,0xc0,0x03,0,0,0,0,0xe0,0xff, +0x3f,0,0,0xf0,0x07,0xf0,0,0,0xff,0x03,0,0,0x7c,0,0, +0,0,0,0,0,0,0x7e,0,0,0,0xff,0xff,0xff,0x7f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff, +0xff,0xff,0x0f,0,0,0xc0,0x03,0,0,0,0,0,0xfe,0x3f,0, +0,0xc0,0x3f,0xf8,0,0xf8,0x3f,0,0,0,0x3c,0,0,0,0, +0,0,0,0,0x3c,0,0,0x80,0xff,0xff,0xff,0x3f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0xff, +0x3f,0,0,0xc0,0x03,0,0,0,0,0,0xf0,0xff,0x0f,0,0, +0x7f,0x7c,0,0xfe,0x07,0,0,0,0x1e,0,0,0,0,0,0, +0,0,0x1e,0,0,0xe0,0xff,0xff,0xff,0x0f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0xff,0x7f,0, +0,0x80,0x07,0,0,0,0,0,0,0xff,0x7f,0,0,0xfc,0x3e, +0xe0,0x7f,0,0,0,0,0x1f,0,0,0,0,0,0,0,0, +0x1f,0,0,0xf8,0xff,0xff,0xff,0x03,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0xff,0xff,0x7f,0,0,0x80, +0x07,0,0,0,0,0,0,0xff,0x7f,0,0,0xfc,0x3e,0xe0,0x7f, +0,0,0,0,0x1f,0,0,0,0,0,0,0,0,0x1f,0, +0,0xf8,0xff,0xff,0xff,0x03,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xfe,0xff,0xff,0xff,0x01,0,0x80,0x0f,0, +0,0,0,0,0,0xf0,0xff,0x1f,0,0xf0,0x1f,0xfe,0x0f,0,0, +0,0x80,0x0f,0,0,0,0,0,0,0,0,0x07,0,0,0xfc, +0xff,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf8,0xff,0xff,0xff,0x03,0,0,0x0f,0,0,0, +0,0,0,0,0xfc,0xff,0x3f,0xc0,0xff,0xff,0,0,0,0,0xc0, +0x07,0,0,0,0,0,0,0,0x80,0x03,0,0,0xff,0xff,0xff, +0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0xff,0xff,0xff,0x0f,0,0,0x1e,0,0,0,0,0, +0,0,0,0xfe,0xff,0xff,0xff,0x1f,0,0,0,0,0xe0,0x03,0, +0,0,0,0,0,0,0xe0,0x03,0,0xc0,0xff,0xff,0xff,0x1f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x80,0xff,0xff,0xff,0x7f,0,0,0x3c,0,0,0,0,0,0,0, +0,0,0xfc,0xff,0xff,0x03,0,0,0,0,0xf0,0x01,0,0,0, +0,0,0,0,0xf8,0,0,0xf8,0xff,0xff,0xff,0x03,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xff, +0xff,0xff,0x7f,0,0,0x3c,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0xff,0x03,0,0,0,0,0xf0,0x01,0,0,0,0,0, +0,0,0xf8,0,0,0xf8,0xff,0xff,0xff,0x03,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0xff, +0xff,0,0,0x78,0,0,0,0,0,0,0,0,0,0,0xf8, +0xff,0x1f,0,0,0,0,0xf0,0,0,0,0,0,0,0,0, +0x7c,0,0,0xfc,0xff,0xff,0xff,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff,0x03, +0,0xf0,0,0,0,0,0,0,0,0,0,0,0,0xfe,0x7f, +0,0,0,0,0x7c,0,0,0,0,0,0,0,0,0x3e,0, +0,0xff,0xff,0xff,0x7f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf0,0xff,0xff,0xff,0x07,0,0xe0, +0x01,0,0,0,0,0,0,0,0,0,0,0x7c,0xfe,0,0, +0,0,0x3c,0,0,0,0,0,0,0,0x80,0x1f,0,0xc0,0xff, +0xff,0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0x1f,0,0xc0,0x03,0, +0,0,0,0,0,0,0,0,0,0x78,0xf8,0x03,0,0,0, +0x1e,0,0,0,0,0,0,0,0xc0,0x07,0,0xe0,0xff,0xff,0xff, +0x07,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x80,0xff,0xff,0xff,0x7f,0,0x80,0x07,0,0,0, +0,0,0,0,0,0,0,0x70,0xe0,0x0f,0,0,0,0x0f,0, +0,0,0,0,0,0,0xf0,0x03,0,0xf8,0xff,0xff,0xff,0x03,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x80,0xff,0xff,0xff,0x7f,0,0x80,0x07,0,0,0,0,0, +0,0,0,0,0,0x70,0xe0,0x0f,0,0,0,0x0f,0,0,0, +0,0,0,0,0xf0,0x03,0,0xf8,0xff,0xff,0xff,0x03,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xff,0xff,0xff,0xff,0,0x80,0x0f,0,0,0,0,0,0,0, +0,0,0,0x70,0,0x3f,0,0,0x80,0x0f,0,0,0,0,0, +0,0,0xf8,0x01,0,0xfe,0xff,0xff,0x7f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc, +0xff,0xff,0xff,0x03,0,0x1f,0,0,0,0,0,0,0,0,0, +0,0x70,0,0xfe,0,0,0xc0,0x03,0,0,0,0,0,0,0, +0x7e,0,0x80,0xff,0xff,0xff,0x3f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0xff, +0xff,0x0f,0,0x3e,0,0,0,0,0,0,0,0,0,0,0x70, +0,0xf8,0x01,0,0xc0,0x03,0,0,0,0,0,0,0,0x3e,0, +0xc0,0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0xff,0x3f, +0,0xf8,0,0,0,0,0,0,0,0,0,0,0x70,0,0x80, +0x0f,0,0xf0,0x01,0,0,0,0,0,0,0xc0,0x0f,0,0xf8,0xff, +0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0xff,0x3f,0,0xf8, +0,0,0,0,0,0,0,0,0,0,0x70,0,0x80,0x0f,0, +0xf0,0x01,0,0,0,0,0,0,0xc0,0x0f,0,0xf8,0xff,0xff,0xff, +0x01,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xff,0xff,0xff,0xff,0,0xe0,0x01,0, +0,0,0,0,0,0,0,0,0x70,0,0,0x3e,0,0xf0,0, +0,0,0,0,0,0,0xe0,0x07,0,0xfe,0xff,0xff,0xff,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfc,0xff,0xff,0xff,0x03,0xc0,0x03,0,0,0, +0,0,0,0,0,0,0x70,0,0,0xfc,0,0x78,0,0,0, +0,0,0,0,0xf8,0x01,0x80,0xff,0xff,0xff,0x3f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xf0,0xff,0xff,0xff,0x0f,0xc0,0x07,0,0,0,0,0, +0,0,0,0,0x78,0,0,0xe0,0x03,0x3c,0,0,0,0,0, +0,0,0x7c,0,0xe0,0xff,0xff,0xff,0x0f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xc0,0xff,0xff,0xff,0x1f,0,0x0f,0,0,0,0,0,0,0, +0,0,0x7c,0,0,0xc0,0x1f,0x1e,0,0,0,0,0,0,0, +0x3e,0,0xf0,0xff,0xff,0xff,0x03,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0xff,0xff,0xff,0x1f,0,0x0f,0,0,0,0,0,0,0,0,0, +0x7c,0,0,0xc0,0x1f,0x1e,0,0,0,0,0,0,0,0x3e,0, +0xf0,0xff,0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xff,0xff, +0xff,0x7f,0,0x1e,0,0,0,0,0,0,0,0,0,0x7c,0, +0,0,0x3f,0x0f,0,0,0,0,0,0,0x80,0x0f,0,0xfc,0xff, +0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0xff,0xff, +0x01,0x7c,0,0,0,0,0,0,0,0,0,0x3c,0,0,0, +0xfc,0x0f,0,0,0,0,0,0,0xe0,0x07,0,0xff,0xff,0xff,0x3f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff,0x03,0x78, +0,0,0,0,0,0,0,0,0,0x3c,0,0,0,0xf8,0x07, +0,0,0,0,0,0,0xf0,0x01,0xc0,0xff,0xff,0xff,0x1f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xf0,0xff,0xff,0xff,0x07,0xf0,0x01,0, +0,0,0,0,0,0,0,0x1c,0,0,0,0xfc,0x03,0,0, +0,0,0,0,0xf8,0,0xf0,0xff,0xff,0xff,0x07,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf0,0xff,0xff,0xff,0x07,0xf0,0x01,0,0,0, +0,0,0,0,0,0x1c,0,0,0,0xfc,0x03,0,0,0,0, +0,0,0xf8,0,0xf0,0xff,0xff,0xff,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xe0,0xff,0xff,0xff,0x1f,0xe0,0x03,0,0,0,0,0, +0,0,0,0x1c,0,0,0,0xfc,0x01,0,0,0,0,0,0, +0x7e,0,0xf8,0xff,0xff,0xff,0x01,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xff,0xff,0xff,0xff,0x80,0x0f,0,0,0,0,0,0,0, +0,0x1e,0,0,0,0xff,0,0,0,0,0,0,0x80,0x0f,0, +0xfe,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0xff,0xff,0x01,0x1f,0,0,0,0,0,0,0,0,0x0e, +0,0,0x80,0x7f,0,0,0,0,0,0,0xc0,0x07,0x80,0xff,0xff, +0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf8,0xff, +0xff,0xff,0x07,0x3e,0,0,0,0,0,0,0,0,0x0e,0,0, +0xc0,0x3f,0,0,0,0,0,0,0xf0,0x01,0xe0,0xff,0xff,0xff,0x07, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff, +0x0f,0x7c,0,0,0,0,0,0,0,0,0x0f,0,0,0xe0,0x3f, +0,0,0,0,0,0,0xf8,0x01,0xf8,0xff,0xff,0xff,0x01,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0x0f,0x7c, +0,0,0,0,0,0,0,0,0x0f,0,0,0xe0,0x3f,0,0, +0,0,0,0,0xf8,0x01,0xf8,0xff,0xff,0xff,0x01,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xc0,0xff,0xff,0xff,0x3f,0xf0,0,0, +0,0,0,0,0,0,0x0f,0,0,0xf0,0x1f,0,0,0,0, +0,0,0x7e,0,0xfc,0xff,0xff,0xff,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xfe,0xff,0xff,0x7f,0xe0,0x01,0,0,0, +0,0,0,0x80,0x07,0,0,0xfc,0x1f,0,0,0,0,0,0, +0x3e,0,0xff,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xfc,0xff,0xff,0xff,0xe0,0x03,0,0,0,0,0, +0,0x80,0x07,0,0,0xfc,0x0f,0,0,0,0,0,0,0x1f,0xc0, +0xff,0xff,0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0xff,0xff,0xff,0xc1,0x07,0,0,0,0,0,0,0xc0, +0x03,0,0,0xfe,0x07,0,0,0,0,0,0xc0,0x0f,0xf0,0xff,0xff, +0xff,0x07,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf0,0xff,0xff,0xff,0xc1,0x07,0,0,0,0,0,0,0xc0,0x03,0, +0,0xfe,0x07,0,0,0,0,0,0xc0,0x0f,0xf0,0xff,0xff,0xff,0x07, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff, +0xff,0xff,0x83,0x0f,0,0,0,0,0,0,0xc0,0x01,0,0,0xff, +0x07,0,0,0,0,0,0xc0,0x07,0xf8,0xff,0xff,0xff,0x03,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0xff, +0x0f,0x1e,0,0,0,0,0,0,0xe0,0x01,0,0xc0,0xef,0x03,0, +0,0,0,0,0xe0,0x01,0xff,0xff,0xff,0x7f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0xff,0x0f,0x1c, +0,0,0,0,0,0,0xf0,0,0,0xe0,0xf3,0x01,0,0,0, +0,0,0xf0,0x80,0xff,0xff,0xff,0x1f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0x1f,0x38,0,0, +0,0,0,0,0x70,0,0,0xf0,0xf9,0,0,0,0,0,0, +0x78,0xe0,0xff,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xfc,0xff,0xff,0x1f,0x38,0,0,0,0, +0,0,0x70,0,0,0xf0,0xf9,0,0,0,0,0,0,0x78,0xe0, +0xff,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf0,0xff,0xff,0x7f,0xf0,0,0,0,0,0,0, +0x78,0,0,0x78,0x7c,0,0,0,0,0,0,0x3c,0xf0,0xff,0xff, +0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x80,0xff,0xff,0xff,0xe0,0,0,0,0,0,0,0x78,0, +0,0x7e,0x7c,0,0,0,0,0,0,0x3c,0xf8,0xff,0xff,0xff,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xff,0xff,0xff,0xe0,0x01,0,0,0,0,0,0x3c,0,0,0x3e, +0x3e,0,0,0,0,0,0,0x1f,0xfe,0xff,0xff,0x7f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfe, +0xff,0xff,0xc1,0x03,0,0,0,0,0,0x3c,0,0,0x0f,0x1e,0, +0,0,0,0,0,0x0f,0xfe,0xff,0xff,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0xff, +0xc1,0x03,0,0,0,0,0,0x3c,0,0,0x0f,0x1e,0,0,0, +0,0,0,0x0f,0xfe,0xff,0xff,0x1f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0x83,0x07, +0,0,0,0,0,0x1e,0,0xc0,0x07,0x0f,0,0,0,0,0, +0x80,0x07,0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf0,0xff,0xff,0x07,0x0f,0,0, +0,0,0,0x0f,0,0xe0,0x83,0x0f,0,0,0,0,0,0x80,0xc7, +0xff,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xc0,0xff,0xff,0x0f,0x0f,0,0,0,0, +0,0x07,0,0xf0,0x81,0x07,0,0,0,0,0,0xc0,0xc3,0xff,0xff, +0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xff,0xff,0x1f,0x1c,0,0,0,0,0x80,0x03, +0,0x7c,0xc0,0x03,0,0,0,0,0,0xe0,0xe1,0xff,0xff,0x7f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0xff,0x3f,0x3c,0,0,0,0,0xc0,0x03,0,0x3f, +0xe0,0x01,0,0,0,0,0,0xe0,0xe0,0xff,0xff,0x1f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfe,0xff,0x3f,0x3c,0,0,0,0,0xc0,0x03,0,0x3f,0xe0,0x01, +0,0,0,0,0,0xe0,0xe0,0xff,0xff,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xf8, +0xff,0x3f,0x3c,0,0,0,0,0xe0,0x01,0x80,0x1f,0xe0,0x01,0,0, +0,0,0,0xf0,0xe0,0xff,0xff,0x07,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xf8,0xff,0x3f, +0x38,0,0,0,0,0xe0,0,0xe0,0x07,0xf0,0,0,0,0,0, +0,0x78,0xf8,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xf8,0xff,0x3f,0x38,0, +0,0,0,0xf0,0,0xf0,0x03,0x70,0,0,0,0,0,0,0x78, +0xf8,0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf8,0xff,0x3f,0x38,0,0,0, +0,0x70,0,0xfe,0,0x38,0,0,0,0,0,0,0x3c,0xfc,0xff, +0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf8,0xff,0x3f,0x38,0,0,0,0,0x70, +0,0xfe,0,0x38,0,0,0,0,0,0,0x3c,0xfc,0xff,0x3f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf8,0xff,0x3f,0x38,0,0,0,0,0x38,0x80,0x3f, +0,0x3c,0,0,0,0,0,0,0x1c,0xfc,0xff,0x3f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xfc,0xff,0x3f,0x38,0,0,0,0,0x1c,0xc0,0x0f,0,0x1c, +0,0,0,0,0,0,0x1e,0xfc,0xff,0x3f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0x1f,0x38,0,0,0,0,0x1e,0xf0,0x03,0,0x1e,0,0, +0,0,0,0,0x1e,0xfc,0xff,0x3f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff, +0x1f,0x38,0,0,0,0,0x0f,0x7f,0,0,0x0f,0,0,0,0, +0,0,0x0f,0xfc,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0x1f,0x38, +0,0,0,0,0x0f,0x7f,0,0,0x0f,0,0,0,0,0,0, +0x0f,0xfc,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfe,0xff,0x1f,0x38,0,0, +0,0,0xe7,0x3f,0,0,0x07,0,0,0,0,0,0,0x0f,0xfc, +0xff,0x7f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xff,0xff,0x0f,0x38,0,0,0,0x80, +0xfb,0x0f,0,0x80,0x03,0,0,0,0,0,0,0x07,0xfc,0xff,0x7f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xff,0xff,0x07,0x38,0,0,0,0xc0,0xff,0x01, +0,0xc0,0x03,0,0,0,0,0,0x80,0x07,0xf8,0xff,0xff,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xff,0xff,0x07,0x38,0,0,0,0xe0,0x3f,0,0,0xc0, +0x01,0,0,0,0,0,0xc0,0x03,0xf8,0xff,0xff,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xff,0xff,0x07,0x38,0,0,0,0xe0,0x3f,0,0,0xc0,0x01,0, +0,0,0,0,0xc0,0x03,0xf8,0xff,0xff,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xff, +0xff,0x07,0x38,0,0,0,0xe0,0x0f,0,0,0xe0,0,0,0,0, +0,0,0xc0,0x03,0xf8,0xff,0xff,0x01,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0x03, +0x38,0,0,0,0xf0,0x03,0,0,0xf0,0,0,0,0,0,0, +0xe0,0x01,0xf8,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0x03,0x38,0, +0,0,0x70,0,0,0,0x70,0,0,0,0,0,0,0xe0,0x01, +0xf0,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xc0,0xff,0xff,0x01,0x38,0,0,0, +0,0,0,0,0x78,0,0,0,0,0,0,0xe0,0,0xf0,0xff, +0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xe0,0xff,0xff,0,0x38,0,0,0,0,0, +0,0,0x38,0,0,0,0,0,0,0xf0,0,0xf0,0xff,0xff,0x03, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xe0,0xff,0xff,0,0x38,0,0,0,0,0,0,0, +0x38,0,0,0,0,0,0,0xf0,0,0xf0,0xff,0xff,0x03,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xe0,0xff,0xff,0,0x38,0,0,0,0,0,0,0,0x3c,0, +0,0,0,0,0,0xf0,0,0xe0,0xff,0xff,0x07,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xe0, +0xff,0xff,0,0x38,0,0,0,0,0,0,0,0x1e,0,0,0, +0,0,0,0x78,0,0xe0,0xff,0xff,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0x7f, +0,0x18,0,0,0,0,0,0,0,0x1e,0,0,0,0,0, +0,0x78,0,0xc0,0xff,0xff,0x0f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0x7f,0,0x18, +0,0,0,0,0,0,0,0x0f,0,0,0,0,0,0,0x3c, +0,0xc0,0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf0,0xff,0x7f,0,0x18,0,0, +0,0,0,0,0,0x0f,0,0,0,0,0,0,0x3c,0,0xc0, +0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf8,0xff,0x7f,0,0x1c,0,0,0,0, +0,0,0x80,0x07,0,0,0,0,0,0,0x3c,0,0x80,0xff,0xff, +0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf8,0xff,0x3f,0,0x1c,0,0,0,0,0,0, +0x80,0x07,0,0,0,0,0,0,0x1e,0,0x80,0xff,0xff,0x1f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xfc,0xff,0x1f,0,0x1c,0,0,0,0,0,0,0xc0,0x03, +0,0,0,0,0,0,0x1e,0,0x80,0xff,0xff,0x1f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0x1f,0,0x1c,0,0,0,0,0,0,0xc0,0x03,0,0, +0,0,0,0,0x1f,0,0,0xff,0xff,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff, +0x1f,0,0x1c,0,0,0,0,0,0,0xc0,0x03,0,0,0,0, +0,0,0x1f,0,0,0xff,0xff,0x1f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfe,0xff,0x0f,0, +0x1c,0,0,0,0,0,0,0xe0,0x01,0,0,0,0,0,0, +0x0f,0,0,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfe,0xff,0x0f,0,0x1c,0, +0,0,0,0,0,0xe0,0,0,0,0,0,0,0,0x0f,0, +0,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfe,0xff,0x07,0,0x1c,0,0,0, +0,0,0,0xf0,0,0,0,0,0,0,0x80,0x07,0,0,0xfe, +0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xff,0xff,0x07,0,0x1e,0,0,0,0,0, +0,0x70,0,0,0,0,0,0,0x80,0x07,0,0,0xfe,0xff,0x7f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xff,0xff,0x07,0,0x1e,0,0,0,0,0,0,0x70, +0,0,0,0,0,0,0x80,0x07,0,0,0xfe,0xff,0x7f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xff,0xff,0x07,0,0x1e,0,0,0,0,0,0,0x78,0,0, +0,0,0,0,0x80,0x07,0,0,0xfc,0xff,0x7f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xff, +0xff,0x03,0,0x1e,0,0,0,0,0,0,0x38,0,0,0,0, +0,0,0x80,0x03,0,0,0xfc,0xff,0xff,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0x03, +0,0x1e,0,0,0,0,0,0,0x3c,0,0,0,0,0,0, +0xc0,0x03,0,0,0xfc,0xff,0xff,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0x03,0,0x1e, +0,0,0,0,0,0,0x1e,0,0,0,0,0,0,0xc0,0x03, +0,0,0xf8,0xff,0xff,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xc0,0xff,0xff,0x03,0,0x1e,0,0, +0,0,0,0,0x1e,0,0,0,0,0,0,0xc0,0x03,0,0, +0xf8,0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xc0,0xff,0xff,0x01,0,0x1e,0,0,0,0, +0,0,0x1e,0,0,0,0,0,0,0xc0,0x03,0,0,0xf8,0xff, +0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xe0,0xff,0xff,0x01,0,0x1c,0,0,0,0,0,0, +0x0f,0,0,0,0,0,0,0xc0,0x01,0,0,0xf0,0xff,0xff,0x01, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xe0,0xff,0xff,0,0,0x1c,0,0,0,0,0,0x80,0x07,0, +0,0,0,0,0,0xc0,0x01,0,0,0xf0,0xff,0xff,0x01,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xe0, +0xff,0xff,0,0,0x3c,0,0,0,0,0,0x80,0x07,0,0,0, +0,0,0,0xc0,0x01,0,0,0xf0,0xff,0xff,0x03,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0x7f, +0,0,0x3c,0,0,0,0,0,0x80,0x03,0,0,0,0,0, +0,0xc0,0x01,0,0,0xe0,0xff,0xff,0x03,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0x7f,0,0, +0x3c,0,0,0,0,0,0x80,0x03,0,0,0,0,0,0,0xc0, +0x01,0,0,0xe0,0xff,0xff,0x03,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf0,0xff,0x7f,0,0,0x38,0, +0,0,0,0,0xc0,0x03,0,0,0,0,0,0,0xc0,0x01,0, +0,0xe0,0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf8,0xff,0x3f,0,0,0x38,0,0,0, +0,0,0xc0,0x01,0,0,0,0,0,0,0xc0,0x01,0,0,0xe0, +0xff,0xff,0x07,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf8,0xff,0x3f,0,0,0x38,0,0,0,0,0, +0xe0,0x01,0,0,0,0,0,0,0xc0,0x01,0,0,0xc0,0xff,0xff, +0x07,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xfc,0xff,0x1f,0,0,0x38,0,0,0,0,0,0xe0,0, +0,0,0,0,0,0,0xc0,0x01,0,0,0xc0,0xff,0xff,0x07,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0x1f,0,0,0x38,0,0,0,0,0,0xe0,0,0,0, +0,0,0,0,0xc0,0x01,0,0,0xc0,0xff,0xff,0x07,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff, +0x1f,0,0,0x38,0,0,0,0,0,0xf0,0,0,0,0,0, +0,0,0xc0,0x01,0,0,0x80,0xff,0xff,0x0f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0x1f,0, +0,0x38,0,0,0,0,0,0x78,0,0,0,0,0,0,0, +0xc0,0x03,0,0,0x80,0xff,0xff,0x0f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfe,0xff,0x0f,0,0,0x38, +0,0,0,0,0,0x78,0,0,0,0,0,0,0,0xc0,0x03, +0,0,0,0xff,0xff,0x1f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfe,0xff,0x0f,0,0,0x3c,0,0, +0,0,0,0x3c,0,0,0,0,0,0,0,0x80,0x07,0,0, +0,0xff,0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfe,0xff,0x0f,0,0,0x3c,0,0,0,0, +0,0x3c,0,0,0,0,0,0,0,0x80,0x07,0,0,0,0xff, +0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xff,0x07,0,0,0xfc,0x3f,0,0,0,0,0,0x3e, +0,0,0,0,0,0,0,0x80,0x07,0,0,0,0xfe,0xff,0x1f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x0f,0,0xe0,0xff,0xff,0x3f,0,0,0,0,0,0x1e,0,0, +0,0,0,0,0,0,0x0f,0,0,0,0xfe,0xff,0x3f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0xff,0xff,0x3f,0,0,0,0,0,0x0f,0,0,0,0, +0,0,0,0,0x0f,0,0,0,0xfe,0xff,0x3f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff, +0xff,0x0f,0x3c,0,0,0,0,0,0x0f,0,0,0,0,0,0, +0,0,0x0e,0,0,0,0xfc,0xff,0x3f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0x0f, +0x3c,0,0,0,0,0,0x0f,0,0,0,0,0,0,0,0, +0x0e,0,0,0,0xfc,0xff,0x3f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0x01,0,0x38,0, +0,0,0,0x80,0x07,0,0,0,0,0,0,0,0,0x1e,0, +0,0,0xfc,0xff,0x7f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf0,0xff,0xff,0,0,0,0x38,0,0,0, +0,0x80,0x07,0,0,0,0,0,0,0,0,0x3c,0,0,0, +0xfc,0xff,0x7f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xff,0xff,0x03,0,0,0,0x38,0,0,0,0,0xc0, +0x03,0,0,0,0,0,0,0,0,0x78,0,0,0,0xf8,0xff, +0x7f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0x1f,0,0,0,0,0x78,0,0,0,0,0xc0,0x01,0, +0,0,0,0,0,0,0,0x70,0,0,0,0xf8,0xff,0xff,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff, +0x01,0,0,0,0,0x70,0,0,0,0,0xe0,0x01,0,0,0, +0,0,0,0,0,0xf0,0x01,0,0,0xf0,0xff,0xff,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0xff,0x01,0, +0,0,0,0x70,0,0,0,0,0xe0,0x01,0,0,0,0,0, +0,0,0,0xf0,0x01,0,0,0xf0,0xff,0xff,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xff,0xff,0x07,0,0xfe,0,0, +0,0x70,0,0,0,0,0xe0,0,0,0,0,0,0,0,0, +0,0xe0,0x03,0,0,0xf0,0xff,0xff,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf0,0xff,0x1f,0,0xf8,0xff,0,0,0,0x70, +0,0,0,0,0xf0,0,0,0,0,0,0,0,0,0,0xc0, +0x03,0,0,0xf0,0xff,0xff,0x01,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0x7f,0,0xe0,0xff,0x7f,0,0,0,0x70,0,0, +0,0,0xf8,0,0,0,0,0,0,0,0,0,0x80,0x0f,0, +0,0xf0,0xff,0xff,0x01,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xe0,0xff,0x03,0,0xf0,0xff,0x3f,0,0,0,0x70,0,0,0,0, +0x78,0,0,0,0,0,0,0,0,0,0,0x1f,0,0,0xe0, +0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff, +0x03,0,0xf0,0xff,0x3f,0,0,0,0x70,0,0,0,0,0x78,0, +0,0,0,0,0,0,0,0,0,0x1f,0,0,0xe0,0xff,0xff, +0x03,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfc,0x7f,0,0, +0xf8,0xff,0x3f,0,0,0,0x70,0,0,0,0,0x78,0,0,0, +0,0,0,0,0,0,0,0x7c,0,0,0xe0,0xff,0xff,0x03,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x80,0xff,0x07,0,0,0xf8,0xff, +0x1f,0,0,0,0xe0,0,0,0,0,0x3c,0,0,0,0,0, +0,0,0,0,0,0xf8,0x01,0,0xe0,0xff,0xff,0x03,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xc0,0xff,0,0,0,0xfc,0xff,0x1f,0, +0,0,0xe0,0,0,0,0,0x3c,0,0,0,0,0,0,0, +0,0,0,0xe0,0x07,0,0xc0,0xff,0xff,0x03,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xc0,0x1f,0,0,0,0xfe,0xff,0x1f,0,0,0, +0xe0,0,0,0,0,0x3c,0,0,0x60,0,0,0,0,0,0, +0,0xc0,0x3f,0,0xc0,0xff,0xff,0x07,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xc0,0x1f,0,0,0,0xfe,0xff,0x1f,0,0,0,0xe0,0, +0,0,0,0x3c,0,0,0x60,0,0,0,0,0,0,0,0xc0, +0x3f,0,0xc0,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x80,0x03,0,0,0,0xfe,0xff,0x0f,0,0,0,0xe0,0,0,0, +0,0x3e,0,0,0x70,0,0,0,0,0,0,0,0,0xff,0x01, +0x80,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0xff,0x0f,0,0,0,0xe0,0,0,0,0,0x3f, +0,0,0x38,0,0,0,0,0,0,0,0,0xf8,0x3f,0x80,0xff, +0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xff,0xff,0x07,0,0,0,0xc0,0x01,0,0,0,0xff,0,0, +0x38,0,0,0,0,0,0,0,0,0xc0,0xff,0,0xfc,0xff,0x0f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff, +0xff,0x07,0,0,0,0xc0,0x01,0,0,0,0xf7,0x03,0,0x3c,0, +0,0,0,0,0,0,0,0,0xff,0x0f,0xc0,0xff,0x0f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0x07, +0,0,0,0xc0,0x01,0,0,0,0xf7,0x03,0,0x3c,0,0,0, +0,0,0,0,0,0,0xff,0x0f,0xc0,0xff,0x0f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0x03,0,0, +0,0xc0,0x01,0,0,0x80,0xe3,0x0f,0,0x3f,0,0,0,0,0, +0,0,0,0,0xf0,0x7f,0,0xf8,0x1f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0xff,0x03,0,0,0,0xc0, +0x01,0,0,0x80,0xe3,0xff,0xff,0x3f,0,0,0,0,0,0,0, +0,0,0x80,0xff,0x03,0x80,0x0f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0xff,0xff,0x03,0,0,0,0xc0,0x01,0, +0,0x80,0xc3,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0xfe,0x1f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xc0,0xff,0xff,0x01,0,0,0,0xc0,0x01,0,0,0xc0, +0x01,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0xe0, +0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xc0,0xff,0xff,0,0,0,0,0xc0,0x01,0,0,0xc0,0x01,0xfe, +0x7f,0x38,0,0,0,0,0,0,0,0,0,0,0,0xfe,0x1f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0xff,0xff,0,0,0,0,0xc0,0x01,0,0,0xc0,0x01,0xfe,0x7f,0x38, +0,0,0,0,0,0,0,0,0,0,0,0xfe,0x1f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff, +0,0,0,0,0xc1,0x01,0,0,0xe0,0,0x3e,0,0x38,0,0, +0,0,0,0,0,0,0,0,0,0xf0,0xff,0x01,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0,0, +0,0x80,0xc3,0x01,0,0,0xe0,0,0x7c,0,0x3c,0,0,0,0, +0,0,0,0,0,0,0,0,0xff,0x7f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf0,0xff,0x7f,0,0,0,0xf0, +0xc3,0x01,0,0,0xf0,0,0xf0,0,0x3c,0,0,0,0,0,0, +0,0,0,0,0,0,0x80,0xff,0xff,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf8,0xff,0x7f,0,0,0,0xf8,0xc3,0x01, +0,0,0xf0,0,0xe0,0x01,0x3c,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xe0,0xff,0xff,0x03,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf8,0xff,0x7f,0,0,0,0xf8,0xc3,0x01,0,0, +0xf0,0,0xe0,0x01,0x3c,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xe0,0xff,0xff,0x03,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf8,0xff,0x7f,0,0,0,0xff,0xc3,0x03,0,0,0x70,0, +0xc0,0x03,0x3c,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x80,0xff,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf8,0xff,0x3f,0,0,0x80,0xff,0xc3,0x03,0,0,0x70,0,0xc0,0x03, +0x3c,0,0,0,0,0,0,0,0,0,0,0,0xf0,0x01,0, +0xf0,0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf8,0xff, +0x1f,0,0,0xe0,0xff,0xc3,0x03,0,0,0x78,0,0x80,0x07,0x3c,0, +0,0,0,0,0,0,0,0,0,0,0xf0,0x7f,0,0,0, +0xfc,0x0f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0x1f,0, +0,0xf8,0xff,0xc3,0x03,0,0,0x78,0,0,0x0f,0x3c,0,0,0, +0,0,0,0,0,0,0,0,0xe0,0xff,0x0f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfc,0xff,0x1f,0,0,0xf8, +0xff,0xc3,0x03,0,0,0x78,0,0,0x0f,0x3c,0,0,0,0,0, +0,0,0,0,0,0,0xe0,0xff,0x0f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfc,0xff,0x0f,0,0,0xfe,0xff,0x83, +0x03,0,0,0x3c,0,0,0x1e,0x1c,0,0,0,0,0,0,0, +0,0xfc,0xff,0x01,0xe0,0xff,0xff,0x01,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfe,0xff,0x0f,0,0x80,0xff,0xff,0x87,0x03,0, +0,0x3c,0,0,0x3c,0x1c,0,0,0,0,0,0,0xf8,0xff,0xff, +0xff,0xff,0xe1,0xff,0xff,0x03,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0xff,0x0f,0,0xc0,0xff,0xff,0x87,0x03,0,0,0x3c, +0,0,0x78,0x1c,0,0,0,0,0,0xfe,0xff,0xff,0xff,0xff,0xff, +0xe1,0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xff,0xff,0x07,0,0xf8,0xff,0xff,0xc7,0x03,0,0,0x1c,0,0, +0xe0,0x1c,0,0,0,0x80,0xff,0xff,0xff,0x01,0,0,0,0xc0,0xff, +0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff, +0xff,0x07,0,0xf8,0xff,0xff,0xc7,0x03,0,0,0x1c,0,0,0xe0,0x1c, +0,0,0,0x80,0xff,0xff,0xff,0x01,0,0,0,0xc0,0xff,0xff,0x03, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0x03, +0,0xfe,0xff,0xff,0xc7,0x03,0,0,0x1c,0,0,0xe0,0x1f,0,0, +0,0xf0,0xff,0xff,0,0,0,0,0,0x80,0xff,0xff,0x07,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0x03,0,0xff, +0xff,0xff,0xc7,0x03,0,0,0x1c,0,0,0x80,0x1f,0,0,0,0xff, +0xff,0x03,0,0,0,0xfc,0x03,0x80,0xff,0xff,0x07,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0xff,0x03,0xc0,0xff,0xff,0xff, +0xc7,0x03,0,0,0x1e,0,0,0,0x1f,0,0,0xf8,0xff,0x0f,0, +0x80,0xff,0xff,0xff,0x1f,0,0xff,0xff,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0xff,0xff,0x01,0xf0,0xff,0xff,0xff,0xc3,0x03, +0,0,0xfe,0xff,0,0,0x1f,0,0xe0,0xff,0x3f,0,0,0x80,0xff, +0xff,0xff,0x3f,0,0xff,0xff,0x07,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xc0,0xff,0xff,0x01,0xfc,0xff,0xff,0xff,0xc1,0x03,0,0, +0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0,0,0x80,0xff,0xff,0xff, +0x7f,0,0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xc0,0xff,0xff,0x01,0xfc,0xff,0xff,0xff,0xc1,0x03,0,0,0xfe,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0x01,0,0,0x80,0xff,0xff,0xff,0x7f,0, +0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xe0, +0xff,0xff,0x01,0xff,0xff,0xff,0xff,0x80,0x03,0,0,0xfe,0xff,0xff,0xff, +0xff,0xff,0xff,0x07,0,0,0,0,0xfe,0xff,0xff,0xff,0x01,0xfe,0xff, +0x1f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff, +0x80,0xff,0xff,0xff,0x3f,0,0,0,0,0x7c,0,0,0xf5,0xff,0xff, +0x3f,0,0,0,0,0,0xfc,0xff,0xff,0xff,0x07,0xfe,0xff,0x1f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0x7f,0xf0,0xff, +0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf0,0xff,0xff,0xff,0x1f,0xfe,0xff,0x1f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf0,0xff,0x7f,0xf8,0xff,0xff,0xff, +0x03,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xc0,0xff,0xff,0xff,0x3f,0xfe,0xff,0x3f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf0,0xff,0x7f,0xf8,0xff,0xff,0xff,0x03,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xc0,0xff,0xff,0xff,0x3f,0xfe,0xff,0x3f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf0,0xff,0xff,0xff,0xff,0xff,0x7f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff, +0xff,0xff,0xff,0xfc,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf8,0xff,0xff,0xff,0xff,0xff,0x3f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff, +0xff,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf8,0xff,0xff,0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0xff,0xff,0xff, +0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff, +0xff,0xff,0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0xff,0xff,0x7f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff, +0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0xff,0xff,0x7f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff,0xff,0xff, +0x01,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x80,0xff,0xff,0xff,0xff,0xff,0x7f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff,0xff,0x7f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0xff,0xff,0xff,0xff,0xff,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfe,0xff,0xff,0xff,0xff,0x3f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfc,0xff,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0xff,0xff,0xff,0xff,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xf0, +0xff,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfe,0xff,0xff,0xff,0xff,0x07,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff,0xff, +0xff,0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xfe, +0xff,0xff,0xff,0xff,0x03,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0xff, +0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff, +0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x80,0xff,0xff,0xff,0xff,0xff,0x01, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0xff,0xff,0x3f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfe,0xff,0xff,0xff,0xff,0x01,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0xff,0xff,0xff,0x1f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf8,0xff,0xff,0xff,0xff,0x03,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xc0,0xff,0xff,0xff,0xff,0x07,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xf0,0xff,0xff,0xff,0xff,0x03,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xc0,0xff,0xff,0xff,0xff,0x07,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xf0,0xff,0xff,0xff,0xff,0x03,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xc0,0xff,0xff,0xff,0xff,0x01,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0xff,0xff,0xff,0xff,0x07,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0xff,0xff,0xff,0xff,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xff,0xff, +0xff,0xff,0x07,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff, +0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff,0xff, +0x07,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0x0f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff,0x0f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xe0,0xff,0xff,0xff,0x0f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfc,0xff,0xff,0xff,0x0f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf0,0xff,0xff,0xff,0x03,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xf8,0xff,0xff,0xff,0x0f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf0,0xff,0xff,0xff,0x01,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xe0,0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf8,0xff,0xff,0x7f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xc0,0xff,0xff,0xff,0x0f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xf8,0xff,0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xff,0xff,0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf8,0xff, +0xff,0x3f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xff, +0xff,0x1f,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xf8,0xff,0xff,0x07, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0x3f, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xfc,0xff,0xff,0x03,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xf8,0xff,0xff,0x3f,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xfe,0xff,0xff,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xe0,0xff,0xff,0x3f,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xfe,0xff,0x3f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0xff,0xff,0x3f,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xfe,0xff,0x3f,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x80,0xff,0xff,0x3f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xfe,0xff,0x0f,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xfe,0xff,0x7f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff, +0xff,0x07,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xfc,0xff,0x7f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xf0,0xff, +0x7f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0x3f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xc0,0xff,0x7f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0x1f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x80,0xff,0xff,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x80,0xff,0x1f,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x80,0xff,0xff,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xc0,0xff,0x03,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xfe,0xff,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xc0,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xfc,0xff,0x01,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0, +0x7f,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xf0,0xff,0x01,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe0,0x1f,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xc0,0xff,0x01,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xe0,0x1f,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xc0,0xff, +0x01,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xe0,0x0f,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x80,0xff,0x01,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf0,0x03,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xfe,0x03,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x78,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xf8,0x03,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x18,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xf0,0x03,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x18,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xf0,0x03,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xc0,0x07,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x07,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +}; diff --git a/hacks/drift.c b/hacks/drift.c new file mode 100644 index 00000000..395a1ec5 --- /dev/null +++ b/hacks/drift.c @@ -0,0 +1,624 @@ +/* -*- Mode: C; tab-width: 4 -*- + * drift --- drifting recursive fractal cosmic flames. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)drift.c 4.02 97/04/01 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: jwz@netscape.com: turned into a standalone program. + * 01-Jan-97: Moved new flame to drift. Compile time options now run time. + * 01-Jun-95: Updated by Scott Draves. + * 27-Jun-91: vary number of functions used. + * 24-Jun-91: fixed portability problem with integer mod (%). + * 06-Jun-91: Written. (received from Scott Draves, spot@cs.cmu.edu). + */ + +#ifdef STANDALONE +# define PROGCLASS "Drift" +# define HACK_INIT init_drift +# define HACK_DRAW draw_drift +# define drift_opts xlockmore_opts +# define DEFAULTS "*count: 30 \n" \ + "*delay: 10000 \n" \ + "*ncolors: 200 \n" +# define SMOOTH_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + + +#define MAXBATCH1 200 /* mono */ +#define MAXBATCH2 20 /* color */ +#define FUSE 10 /* discard this many initial iterations */ +#define NMAJORVARS 7 +#define MAXLEV 10 + +#define DEF_GROW "False" /* Grow fractals instead of animating one at a time, + would then be like flame */ +#define DEF_LISS "False" /* if this is defined then instead of a point + bouncing around in a high dimensional sphere, we + use lissojous figures. Only makes sense if + grow is false. */ + +static Bool grow; +static Bool liss; + +static XrmOptionDescRec opts[] = +{ + {"-grow", ".drift.grow", XrmoptionNoArg, (caddr_t) "on"}, + {"+grow", ".drift.grow", XrmoptionNoArg, (caddr_t) "off"}, + {"-liss", ".drift.trail", XrmoptionNoArg, (caddr_t) "on"}, + {"+liss", ".drift.trail", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & grow, "grow", "Grow", DEF_GROW, t_Bool}, + {(caddr_t *) & liss, "liss", "Liss", DEF_LISS, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+grow", "turn on/off growing fractals, else they are animated"}, + {"-/+liss", "turn on/off using lissojous figures to get points"} +}; + +ModeSpecOpt drift_opts = { 4, opts, 2, vars, desc }; + + +typedef struct { + /* shape of current flame */ + int nxforms; + double f[2][3][MAXLEV]; /* a bunch of non-homogeneous xforms */ + int variation[10]; /* for each xform */ + + /* Animation */ + double df[2][3][MAXLEV]; + + /* high-level control */ + int mode; /* 0->slow/single 1->fast/many */ + int nfractals; /* draw this many fractals */ + int major_variation; + int fractal_len; /* pts/fractal */ + int color; + int rainbow; /* more than one color per fractal + 1-> computed by adding dimension to fractal */ + + int width, height; /* of window */ + int timer; + + /* draw info about current flame */ + int fuse; /* iterate this many before drawing */ + int total_points; /* draw this many pts before fractal ends */ + int npoints; /* how many we've computed but not drawn */ + XPoint pts[MAXBATCH1]; /* here they are */ + unsigned long pixcol; + /* when drawing in color, we have a buffer per color */ + int ncpoints[NUMCOLORS]; + XPoint cpts[NUMCOLORS][MAXBATCH2]; + + double x, y, c; + int liss_time; + Bool grow, liss; +} driftstruct; + +static driftstruct *drifts = NULL; + +static short +halfrandom(int mv) +{ + static short lasthalf = 0; + unsigned long r; + + if (lasthalf) { + r = lasthalf; + lasthalf = 0; + } else { + r = LRAND(); + lasthalf = r >> 16; + } + r = r % mv; + return r; +} + +static int +frandom(int n) +{ + static long saved_random_bits = 0; + static int nbits = 0; + int result; + + if (3 > nbits) { + saved_random_bits = LRAND(); + nbits = 31; + } + switch (n) { + case 2: + result = saved_random_bits & 1; + saved_random_bits >>= 1; + nbits -= 1; + return result; + + case 3: + result = saved_random_bits & 3; + saved_random_bits >>= 2; + nbits -= 2; + if (3 == result) + return frandom(3); + return result; + + case 4: + result = saved_random_bits & 3; + saved_random_bits >>= 2; + nbits -= 2; + return result; + + case 5: + result = saved_random_bits & 7; + saved_random_bits >>= 3; + nbits -= 3; + if (4 < result) + return frandom(5); + return result; + default: + (void) fprintf(stderr, "bad arg to frandom\n"); + exit(1); + } + return 0; +} + +#define DISTRIB_A (halfrandom(7000) + 9000) +#define DISTRIB_B ((frandom(3) + 1) * (frandom(3) + 1) * 120000) +#define LEN(x) (sizeof(x)/sizeof((x)[0])) + +static void +initmode(ModeInfo * mi, int mode) +{ + driftstruct *dp = &drifts[MI_SCREEN(mi)]; + +#define VARIATION_LEN 14 + + dp->mode = mode; + + dp->major_variation = halfrandom(VARIATION_LEN); + /* 0, 0, 1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 6, 6 */ + dp->major_variation = ((dp->major_variation >= VARIATION_LEN >> 1) && + (dp->major_variation < VARIATION_LEN - 1)) ? + (dp->major_variation + 1) >> 1 : dp->major_variation >> 1; + + if (dp->grow) { + dp->rainbow = 0; + if (mode) { + if (!dp->color || halfrandom(8)) { + dp->nfractals = halfrandom(30) + 5; + dp->fractal_len = DISTRIB_A; + } else { + dp->nfractals = halfrandom(5) + 5; + dp->fractal_len = DISTRIB_B; + } + } else { + dp->rainbow = dp->color; + dp->nfractals = 1; + dp->fractal_len = DISTRIB_B; + } + } else { + dp->nfractals = 1; + dp->rainbow = dp->color; + dp->fractal_len = 2000000; + } + dp->fractal_len = (dp->fractal_len * MI_BATCHCOUNT(mi)) / 20; + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); +} + +static void +pick_df_coefs(ModeInfo * mi) +{ + driftstruct *dp = &drifts[MI_SCREEN(mi)]; + int i, j, k; + double r; + + for (i = 0; i < dp->nxforms; i++) { + + r = 1e-6; + for (j = 0; j < 2; j++) + for (k = 0; k < 3; k++) { + dp->df[j][k][i] = ((double) halfrandom(1000) / 500.0 - 1.0); + r += dp->df[j][k][i] * dp->df[j][k][i]; + } + r = (3 + halfrandom(5)) * 0.01 / sqrt(r); + for (j = 0; j < 2; j++) + for (k = 0; k < 3; k++) + dp->df[j][k][i] *= r; + } +} + +static void +initfractal(ModeInfo * mi) +{ + driftstruct *dp = &drifts[MI_SCREEN(mi)]; + int i, j, k; + +#define XFORM_LEN 9 + + dp->fuse = FUSE; + dp->total_points = 0; + if (dp->rainbow) + for (i = 0; i < MI_NPIXELS(mi); i++) + dp->ncpoints[i] = 0; + else + dp->npoints = 0; + dp->nxforms = halfrandom(XFORM_LEN); + /* 2, 2, 2, 3, 3, 3, 4, 4, 5 */ + dp->nxforms = (dp->nxforms >= XFORM_LEN - 1) + dp->nxforms / 3 + 2; + + dp->c = dp->x = dp->y = 0.0; + if (dp->liss && !halfrandom(10)) { + dp->liss_time = 0; + } + if (!dp->grow) + pick_df_coefs(mi); + for (i = 0; i < dp->nxforms; i++) { + if (NMAJORVARS == dp->major_variation) + dp->variation[i] = halfrandom(NMAJORVARS); + else + dp->variation[i] = dp->major_variation; + for (j = 0; j < 2; j++) + for (k = 0; k < 3; k++) { + if (dp->liss) + dp->f[j][k][i] = sin(dp->liss_time * dp->df[j][k][i]); + else + dp->f[j][k][i] = ((double) halfrandom(1000) / 500.0 - 1.0); + } + } + if (dp->color) + dp->pixcol = MI_PIXEL(mi, halfrandom(MI_NPIXELS(mi))); + else + dp->pixcol = MI_WIN_WHITE_PIXEL(mi); + +} + + +void +init_drift(ModeInfo * mi) +{ + driftstruct *dp; + + if (drifts == NULL) { + if ((drifts = (driftstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (driftstruct))) == NULL) + return; + } + dp = &drifts[MI_SCREEN(mi)]; + + dp->width = MI_WIN_WIDTH(mi); + dp->height = MI_WIN_HEIGHT(mi); + dp->color = MI_NPIXELS(mi) > 2; + + if (MI_WIN_IS_FULLRANDOM(mi)) { +#if 1 /* jwz: even up the odds */ + switch ((int) (LRAND() % 3)) { + case 0: dp->grow = True; dp->liss = False; break; + case 1: dp->grow = False; dp->liss = True; break; + default: dp->grow = False; dp->liss = False; break; + /* liss and grow don't work together. */ + } +#else /* 0 */ + if (LRAND() & 1) + dp->grow = True; + else { + dp->grow = False; + dp->liss = (Bool) (LRAND() & 1); + } +#endif + } else { + dp->grow = grow; + if (dp->grow) + dp->liss = False; + else + dp->liss = liss; + } + initmode(mi, 1); + initfractal(mi); +} + +static void +iter(driftstruct * dp) +{ + int i = frandom(dp->nxforms); + double nx, ny, nc; + + + if (i) + nc = (dp->c + 1.0) / 2.0; + else + nc = dp->c / 2.0; + + nx = dp->f[0][0][i] * dp->x + dp->f[0][1][i] * dp->y + dp->f[0][2][i]; + ny = dp->f[1][0][i] * dp->x + dp->f[1][1][i] * dp->y + dp->f[1][2][i]; + + + switch (dp->variation[i]) { + case 1: + /* sinusoidal */ + nx = sin(nx); + ny = sin(ny); + break; + case 2: + { + /* complex */ + double r2 = nx * nx + ny * ny + 1e-6; + + nx = nx / r2; + ny = ny / r2; + break; + } + case 3: + /* bent */ + if (nx < 0.0) + nx = nx * 2.0; + if (ny < 0.0) + ny = ny / 2.0; + break; + case 4: + { + /* swirl */ + + double r = (nx * nx + ny * ny); /* times k here is fun */ + double c1 = sin(r); + double c2 = cos(r); + double t = nx; + + if (nx > 1e4 || nx < -1e4 || ny > 1e4 || ny < -1e4) + ny = 1e4; + else + ny = c2 * t + c1 * ny; + nx = c1 * nx - c2 * ny; + break; + } + case 5: + { + /* horseshoe */ + double r, c1, c2, t; + + /* Avoid atan2: DOMAIN error message */ + if (nx == 0.0 && ny == 0.0) + r = 0.0; + else + r = atan2(nx, ny); /* times k here is fun */ + c1 = sin(r); + c2 = cos(r); + t = nx; + + nx = c1 * nx - c2 * ny; + ny = c2 * t + c1 * ny; + break; + } + case 6: + { + /* drape */ + double t; + + /* Avoid atan2: DOMAIN error message */ + if (nx == 0.0 && ny == 0.0) + t = 0.0; + else + t = atan2(nx, ny) / M_PI; + + if (nx > 1e4 || nx < -1e4 || ny > 1e4 || ny < -1e4) + ny = 1e4; + else + ny = sqrt(nx * nx + ny * ny) - 1.0; + nx = t; + break; + } + } + +#if 0 + /* here are some others */ + { + /* broken */ + if (nx > 1.0) + nx = nx - 1.0; + if (nx < -1.0) + nx = nx + 1.0; + if (ny > 1.0) + ny = ny - 1.0; + if (ny < -1.0) + ny = ny + 1.0; + break; + } + { + /* complex sine */ + double u = nx, v = ny; + double ev = exp(v); + double emv = exp(-v); + + nx = (ev + emv) * sin(u) / 2.0; + ny = (ev - emv) * cos(u) / 2.0; + } + { + + /* polynomial */ + if (nx < 0) + nx = -nx * nx; + else + nx = nx * nx; + + if (ny < 0) + ny = -ny * ny; + else + ny = ny * ny; + } + { + /* spherical */ + double r = 0.5 + sqrt(nx * nx + ny * ny + 1e-6); + + nx = nx / r; + ny = ny / r; + } + { + nx = atan(nx) / M_PI_2 + ny = atan(ny) / M_PI_2 + } +#endif + + /* how to check nan too? some machines don't have finite(). + don't need to check ny, it'll propogate */ + if (nx > 1e4 || nx < -1e4) { + nx = halfrandom(1000) / 500.0 - 1.0; + ny = halfrandom(1000) / 500.0 - 1.0; + dp->fuse = FUSE; + } + dp->x = nx; + dp->y = ny; + dp->c = nc; + +} + +static void +draw(ModeInfo * mi, driftstruct * dp, Drawable d) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + double x = dp->x; + double y = dp->y; + int fixed_x, fixed_y, npix, c, n; + + if (dp->fuse) { + dp->fuse--; + return; + } + if (!(x > -1.0 && x < 1.0 && y > -1.0 && y < 1.0)) + return; + + fixed_x = (int) ((dp->width / 2) * (x + 1.0)); + fixed_y = (int) ((dp->height / 2) * (y + 1.0)); + + if (!dp->rainbow) { + + dp->pts[dp->npoints].x = fixed_x; + dp->pts[dp->npoints].y = fixed_y; + dp->npoints++; + if (dp->npoints == MAXBATCH1) { + XSetForeground(display, gc, dp->pixcol); + XDrawPoints(display, d, gc, dp->pts, dp->npoints, CoordModeOrigin); + dp->npoints = 0; + } + } else { + + npix = MI_NPIXELS(mi); + c = (int) (dp->c * npix); + + if (c < 0) + c = 0; + if (c >= npix) + c = npix - 1; + n = dp->ncpoints[c]; + dp->cpts[c][n].x = fixed_x; + dp->cpts[c][n].y = fixed_y; + if (++dp->ncpoints[c] == MAXBATCH2) { + XSetForeground(display, gc, MI_PIXEL(mi, c)); + XDrawPoints(display, d, gc, dp->cpts[c], + dp->ncpoints[c], CoordModeOrigin); + dp->ncpoints[c] = 0; + } + } +} + +static void +draw_flush(ModeInfo * mi, driftstruct * dp, Drawable d) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + + if (dp->rainbow) { + int npix = MI_NPIXELS(mi); + int i; + + for (i = 0; i < npix; i++) { + if (dp->ncpoints[i]) { + XSetForeground(display, gc, MI_PIXEL(mi, i)); + XDrawPoints(display, d, gc, dp->cpts[i], + dp->ncpoints[i], CoordModeOrigin); + dp->ncpoints[i] = 0; + } + } + } else { + if (dp->npoints) + XSetForeground(display, gc, dp->pixcol); + XDrawPoints(display, d, gc, dp->pts, + dp->npoints, CoordModeOrigin); + dp->npoints = 0; + } +} + + +void +draw_drift(ModeInfo * mi) +{ + Window window = MI_WINDOW(mi); + driftstruct *dp = &drifts[MI_SCREEN(mi)]; + + dp->timer = 3000; + + while (dp->timer) { + iter(dp); + draw(mi, dp, window); + if (dp->total_points++ > dp->fractal_len) { + draw_flush(mi, dp, window); + if (0 == --dp->nfractals) + initmode(mi, frandom(2)); + initfractal(mi); + } + dp->timer--; + } + if (!dp->grow) { + int i, j, k; + + draw_flush(mi, dp, window); + if (dp->liss) + dp->liss_time++; + for (i = 0; i < dp->nxforms; i++) + for (j = 0; j < 2; j++) + for (k = 0; k < 3; k++) { + if (dp->liss) + dp->f[j][k][i] = sin(dp->liss_time * dp->df[j][k][i]); + else { + double t = dp->f[j][k][i] += dp->df[j][k][i]; + + if (t < -1.0 || 1.0 < t) + dp->df[j][k][i] *= -1.0; + } + } + } +} + +void +release_drift(ModeInfo * mi) +{ + if (drifts != NULL) { + (void) free((void *) drifts); + drifts = NULL; + } +} + +void +refresh_drift(ModeInfo * mi) +{ + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); +} diff --git a/hacks/drift.man b/hacks/drift.man new file mode 100644 index 00000000..5cc69775 --- /dev/null +++ b/hacks/drift.man @@ -0,0 +1,75 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +drift - draws drifting recursive fractal cosmic flames +.SH SYNOPSIS +.B drift +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-count \fIinteger\fP] [\-grow] [\-no\-grow] [\-liss] [\-no\-liss] + +.SH DESCRIPTION +The \fIdrift\fP program draws drifting recursive fractal cosmic flames +.SH OPTIONS +.I drift +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 used cycle through the hue, making N stops around +the color wheel. +.TP 8 +.B \-count \fIinteger\fP + +.TP 8 +.B \-grow +.TP 8 +.B \-no\-grow +Whether fractals should grow; otherwise, they are animated. + +.TP 8 +.B \-liss +.TP 8 +.B \-no\-liss +Whether we should use lissojous figures to get points. + +.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 flame (1), +.BR X (1), +.BR xscreensaver (1), +.BR xlock (1) +.SH COPYRIGHT +Copyright \(co 1991, 1995 by Scott Draves. + +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 +Scott Draves , 06-Jun-91, 01-Jun-95. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/fadeplot.c b/hacks/fadeplot.c new file mode 100644 index 00000000..5b715522 --- /dev/null +++ b/hacks/fadeplot.c @@ -0,0 +1,177 @@ +/* -*- Mode: C; tab-width: 4 -*- + * fadeplot.c --- some easy plotting stuff, by Bas van Gaalen, Holland, PD + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)fadeplot.c 4.04 97/07/26 xlockmore"; +#endif + +/* Converted for xlock by Charles Vidal + * See xlock.c for copying information. + * + * 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. + */ + +/*- + 1) Not random enough, i.e. always same starting position. + 2) Needs to be less flashy + */ + +#ifdef STANDALONE +# define PROGCLASS "Fadeplot" +# define HACK_INIT init_fadeplot +# define HACK_DRAW draw_fadeplot +# define fadeplot_opts xlockmore_opts +# define DEFAULTS "*count: 10 \n" \ + "*delay: 30000 \n" \ + "*cycles: 1500 \n" \ + "*ncolors: 64 \n" +# define BRIGHT_COLORS +# define UNIFORM_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* STANDALONE */ + +ModeSpecOpt fadeplot_opts = { + 0, NULL, 0, NULL, NULL }; + +#define MINSTEPS 1 +#define ANGLES 1000 + +typedef struct { + XPoint speed, step, factor, st; + int temps, maxpts, nbstep; + int min; + int width, height; + int pix; + int stab[ANGLES]; + XPoint *pts; +} fadeplotstruct; + +static fadeplotstruct *fadeplots = NULL; + +static void +initSintab(ModeInfo * mi) +{ + fadeplotstruct *fp = &fadeplots[MI_SCREEN(mi)]; + int i; + float x; + + for (i = 0; i < ANGLES; i++) { + x = SINF(i * 2 * M_PI / ANGLES); + fp->stab[i] = (int) (x * ABS(x) * fp->min) + fp->min; + } +} + +void +init_fadeplot(ModeInfo * mi) +{ + fadeplotstruct *fp; + + if (fadeplots == NULL) { + if ((fadeplots = (fadeplotstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (fadeplotstruct))) == NULL) + return; + } + fp = &fadeplots[MI_SCREEN(mi)]; + + fp->width = MI_WIN_WIDTH(mi); + fp->height = MI_WIN_HEIGHT(mi); + fp->min = MAX(MIN(fp->width, fp->height) / 2, 1); + + fp->speed.x = 8; + fp->speed.y = 10; + fp->step.x = 1; + fp->step.y = 1; + fp->temps = 0; + fp->factor.x = MAX(fp->width / (2 * fp->min), 1); + fp->factor.y = MAX(fp->height / (2 * fp->min), 1); + + fp->nbstep = MI_BATCHCOUNT(mi); + if (fp->nbstep < -MINSTEPS) { + fp->nbstep = NRAND(-fp->nbstep - MINSTEPS + 1) + MINSTEPS; + } else if (fp->nbstep < MINSTEPS) + fp->nbstep = MINSTEPS; + + fp->maxpts = MI_CYCLES(mi); + if (fp->maxpts < 1) + fp->maxpts = 1; + + if (fp->pts == NULL) + fp->pts = (XPoint *) calloc(fp->maxpts, sizeof (XPoint)); + if (MI_NPIXELS(mi) > 2) + fp->pix = NRAND(MI_NPIXELS(mi)); + + initSintab(mi); + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); +} + +void +draw_fadeplot(ModeInfo * mi) +{ + fadeplotstruct *fp = &fadeplots[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + int i, j; + long temp; + + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + XDrawPoints(display, window, gc, fp->pts, fp->maxpts, CoordModeOrigin); + + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, fp->pix)); + if (++fp->pix >= MI_NPIXELS(mi)) + fp->pix = 0; + } else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + + for (temp = fp->nbstep - 1; temp >= 0; temp--) { + j = temp; + for (i = 0; i < fp->maxpts / fp->nbstep; i++) { + fp->pts[temp * i + i].x = + fp->stab[(fp->st.x + fp->speed.x * j + i * fp->step.x) % ANGLES] * + fp->factor.x + fp->width / 2 - fp->min; + fp->pts[temp * i + i].y = + fp->stab[(fp->st.y + fp->speed.y * j + i * fp->step.y) % ANGLES] * + fp->factor.y + fp->height / 2 - fp->min; + } + } + XDrawPoints(display, window, gc, fp->pts, fp->maxpts, CoordModeOrigin); + XFlush(display); + fp->st.x = (fp->st.x + fp->speed.x) % ANGLES; + fp->st.y = (fp->st.y + fp->speed.y) % ANGLES; + fp->temps++; + if ((fp->temps % (ANGLES / 2)) == 0) { + fp->temps = fp->temps % ANGLES * 5; + if ((fp->temps % (ANGLES)) == 0) + fp->speed.y = (fp->speed.y++) % 30 + 1; + if ((fp->temps % (ANGLES * 2)) == 0) + fp->speed.x = (fp->speed.x) % 20; + if ((fp->temps % (ANGLES * 3)) == 0) + fp->step.y = (fp->step.y++) % 2 + 1; + XClearWindow(display, window); + } +} +void +refresh_fadeplot(ModeInfo * mi) +{ + +} + +void +release_fadeplot(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/flag.c b/hacks/flag.c new file mode 100644 index 00000000..1c2c5054 --- /dev/null +++ b/hacks/flag.c @@ -0,0 +1,488 @@ +/* -*- Mode: C; tab-width: 4 -*- + * flag --- a waving flag + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)flag.c 4.02 97/04/01 xlockmore"; +#endif + +/* Copyright (c) 1996 Charles Vidal . + * PEtite demo X11 de charles vidal 15 05 96 + * tourne sous Linux et SOLARIS + * thank's to Bas van Gaalen, Holland, PD, for his sources + * in pascal vous devez rajouter une ligne dans mode.c + * + * 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: + * 13-May-97: jwz@netscape.com: turned into a standalone program. + * Made it able to animate arbitrary (runtime) text or bitmaps. + * 01-May-96: written. + */ + +#ifdef STANDALONE +# define PROGCLASS "Flag" +# define HACK_INIT init_flag +# define HACK_DRAW draw_flag +# define flag_opts xlockmore_opts +# define DEFAULTS "*delay: 50000 \n" \ + "*cycles: 1000 \n" \ + "*size: -7 \n" \ + "*ncolors: 200 \n" +# define BRIGHT_COLORS +# define UNIFORM_COLORS +# define DEF_FONT "-*-helvetica-bold-r-*-240-*" +# define DEF_BITMAP "" +# define DEF_TEXT "" +# include "xlockmore.h" /* from the xscreensaver distribution */ + +#ifdef HAVE_XMU +# ifndef VMS +# include +# else /* VMS */ +# include +# endif /* VMS */ +#endif /* HAVE_XMU */ + +#include "bob.xbm" + +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +# include "flag.h" +#endif /* !STANDALONE */ + + +#if defined(VMS) && !defined(HAVE_UNAME) && (__VMS_VER >= 70000000) +# define HAVE_UNAME 1 +#endif + +#ifdef HAVE_UNAME +# include +#endif /* HAVE_UNAME */ + +ModeSpecOpt flag_opts = { + 0, NULL, 0, NULL, NULL }; + +#include +#include + +#define MINSIZE 1 +#define MAXSCALE 8 +#define MINSCALE 2 +#define MAXINITSIZE 6 +#define MININITSIZE 2 +#define MINAMP 5 +#define MAXAMP 20 +#define MAXW(fp) (MAXSCALE * (fp)->image->width + 2 * MAXAMP + (fp)->pointsize) +#define MAXH(fp) (MAXSCALE * (fp)->image->height+ 2 * MAXAMP + (fp)->pointsize) +#define MINW(fp) (MINSCALE * (fp)->image->width + 2 * MINAMP + (fp)->pointsize) +#define MINH(fp) (MINSCALE * (fp)->image->height+ 2 * MINAMP + (fp)->pointsize) +#define ANGLES 360 + +typedef struct { + int samp; + int sofs; + int sidx; + int x_flag, y_flag; + int timer; + int initialized; + int stab[ANGLES]; + Pixmap cache; + int width, height; + int pointsize; + float size; + float inctaille; + int startcolor; + XImage *image; +} flagstruct; + +static flagstruct *flags = NULL; + +static int +random_num(int n) +{ + return ((int) (((float) LRAND() / MAXRAND) * (n + 1.0))); +} + +static void +initSintab(ModeInfo * mi) +{ + flagstruct *fp = &flags[MI_SCREEN(mi)]; + int i; + + for (i = 0; i < ANGLES; i++) + fp->stab[i] = (int) (SINF(i * 4 * M_PI / ANGLES) * fp->samp) + fp->sofs; +} + +static void +affiche(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + int x, y, xp, yp; + flagstruct *fp = &flags[MI_SCREEN(mi)]; + + for (x = 0; x < fp->image->width; x++) + for (y = fp->image->height-1; y >= 0; y--) { + xp = (int) (fp->size * (float) x) + + fp->stab[(fp->sidx + x + y) % ANGLES]; + yp = (int) (fp->size * (float) y) + + fp->stab[(fp->sidx + 4 * x + y + y) % ANGLES]; + if (XGetPixel(fp->image, x, y)) + XSetForeground(display, MI_GC(mi), MI_WIN_BLACK_PIXEL(mi)); + else if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, MI_GC(mi), MI_WIN_WHITE_PIXEL(mi)); + else + XSetForeground(display, MI_GC(mi), + MI_PIXEL(mi, (y + x + fp->sidx + fp->startcolor) % MI_NPIXELS(mi))); + if (fp->pointsize <= 1) + XDrawPoint(display, fp->cache, MI_GC(mi), xp, yp); + else if (fp->pointsize < 6) + XFillRectangle(display, fp->cache, MI_GC(mi), xp, yp, + fp->pointsize, fp->pointsize); + else + XFillArc(display, fp->cache, MI_GC(mi), xp, yp, + fp->pointsize, fp->pointsize, 0, 360*64); + } +} + +#ifdef STANDALONE + +static void +make_flag_bits(ModeInfo *mi) +{ + Display *dpy = MI_DISPLAY(mi); + flagstruct *fp = &flags[MI_SCREEN(mi)]; + char *bitmap_name = get_string_resource ("bitmap", "Bitmap"); + char *text = get_string_resource ("text", "Text"); + + /* If neither a bitmap nor text are specified, randomly select either + the builtin bitmap or builtin text. */ + if ((!bitmap_name || !*bitmap_name) && (!text || !*text)) + { + if (random() & 1) + { + free(bitmap_name); + bitmap_name = strdup("(default)"); + } + else + { + free(text); + text = strdup("(default)"); + } + } + + if (bitmap_name && + *bitmap_name && + !!strcmp(bitmap_name, "(default)")) + { +#ifdef HAVE_XMU + int width, height, xh, yh; + Pixmap bitmap = + XmuLocateBitmapFile (DefaultScreenOfDisplay (dpy), + bitmap_name, 0, 0, &width, &height, &xh, &yh); + if (!bitmap) + { + fprintf(stderr, "%s: unable to load bitmap file %s\n", + progname, bitmap_name); + exit (1); + } + fp->image = XGetImage(dpy, bitmap, 0, 0, width, height, + 1L, XYPixmap); + XFreePixmap(dpy, bitmap); + +#else /* !XMU */ + fprintf (stderr, + "%s: your vendor doesn't ship the standard Xmu library.\n", + progname); + fprintf (stderr, "\tWe can't load XBM files without it.\n"); + exit (1); +#endif /* !XMU */ + + } + else if (text && *text) + { + char *text2; + char *fn = get_string_resource ("font", "Font"); + char *def_fn = "fixed"; + char *line, *token; + int width, height; + int lines; + int margin = 2; + int fg = 1; + int bg = 0; + Pixmap bitmap; + XFontStruct *font; + XCharStruct overall; + XGCValues gcv; + GC gc; + + if (!strcmp(text, "(default)")) + { +# ifdef HAVE_UNAME + struct utsname uts; + if (uname (&uts) < 0) + { + text = strdup("uname() failed"); + } + else + { + char *s; + if ((s = strchr(uts.nodename, '.'))) + *s = 0; + text = (char *) malloc(strlen(uts.nodename) + + strlen(uts.sysname) + + strlen(uts.release) + 10); + sprintf(text, "%s\n%s %s", + uts.nodename, uts.sysname, uts.release); + } +#else /* !HAVE_UNAME */ +# ifdef VMS + text = strdup(getenv("SYS$NODE")); +# else + text = strdup("X\nScreen\nSaver"); +# endif +#endif /* !HAVE_UNAME */ + } + + while (*text && + (text[strlen(text)-1] == '\r' || + text[strlen(text)-1] == '\n')) + text[strlen(text)-1] = 0; + + text2 = strdup(text); + + if (!fn) fn = def_fn; + font = XLoadQueryFont (dpy, fn); + if (! font) + { + fprintf(stderr, "%s: unable to load font %s; using %s\n", + progname, fn, def_fn); + font = XLoadQueryFont (dpy, def_fn); + } + + memset(&overall, 0, sizeof(overall)); + token = text; + lines = 0; + while ((line = strtok(token, "\r\n"))) + { + XCharStruct o2; + int ascent, descent, direction; + token = 0; + XTextExtents(font, line, strlen(line), + &direction, &ascent, &descent, &o2); + overall.lbearing = MAX(overall.lbearing, o2.lbearing); + overall.rbearing = MAX(overall.rbearing, o2.rbearing); + lines++; + } + + width = overall.lbearing + overall.rbearing + margin + margin + 1; + height = ((font->ascent + font->descent) * lines) + margin + margin; + + bitmap = XCreatePixmap(dpy, MI_WINDOW(mi), width, height, 1); + + gcv.font = font->fid; + gcv.foreground = bg; + gc = XCreateGC (dpy, bitmap, (GCFont | GCForeground), &gcv); + XFillRectangle(dpy, bitmap, gc, 0, 0, width, height); + XSetForeground(dpy, gc, fg); + + token = text2; + lines = 0; + while ((line = strtok(token, "\r\n"))) + { + XCharStruct o2; + int ascent, descent, direction, xoff; + token = 0; + + XTextExtents(font, line, strlen(line), + &direction, &ascent, &descent, &o2); + xoff = ((overall.lbearing + overall.rbearing) - + (o2.lbearing + o2.rbearing)) / 2; + + XDrawString(dpy, bitmap, gc, + overall.lbearing + margin + xoff, + ((font->ascent * (lines + 1)) + + (font->descent * lines) + + margin), + line, strlen(line)); + lines++; + } + free(text2); + XUnloadFont(dpy, font->fid); + XFree((XPointer) font); + XFreeGC(dpy, gc); + + fp->image = XGetImage(dpy, bitmap, 0, 0, width, height, 1L, XYPixmap); + XFreePixmap(dpy, bitmap); + } + else + { + fp->image = XCreateImage (dpy, MI_VISUAL(mi), 1, XYBitmap, 0, + (char *) bob_bits, bob_width, bob_height, + 8, 0); + fp->image->byte_order = LSBFirst; + fp->image->bitmap_bit_order = LSBFirst; + } + + if (bitmap_name) + free (bitmap_name); + if (text) + free (text); +} + +#else /* !STANDALONE */ + +static void +make_flag_bits(ModeInfo *mi) +{ + flagstruct *fp = &flags[MI_SCREEN(mi)]; + int x, y; + int w = flag_width; + int h = flag_height; + int i = 0; + fp->image = + XCreateImage(MI_DISPLAY(mi), MI_VISUAL(mi), + 1, XYBitmap, 0, /* dpth, fmt, offset */ + (char *) calloc ((w+8) / 8, h), /* data */ + w, h, 8, 0); /* w, h, pad, bpl */ + /* Geez, what kinda goofy bit order is this?? */ + for (x = 0; x < w; x++) + for (y = h-1; y >= 0; y--) + XPutPixel (fp->image, x, y, flag_bits[i++]); +} + +#endif /* !STANDALONE */ + + +void +init_flag(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + int size = MI_SIZE(mi); + flagstruct *fp; + + if (flags == NULL) { + if ((flags = (flagstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (flagstruct))) == NULL) + return; + } + fp = &flags[MI_SCREEN(mi)]; + + make_flag_bits(mi); + + fp->width = MI_WIN_WIDTH(mi); + fp->height = MI_WIN_HEIGHT(mi); + + fp->samp = MAXAMP; /* Amplitude */ + fp->sofs = 20; /* ???????? */ + fp->pointsize = size; + if (size < -MINSIZE) + fp->pointsize = NRAND(-size - MINSIZE + 1) + MINSIZE; + if (fp->pointsize < MINSIZE || + fp->width <= MAXW(fp) || fp->height <= MAXH(fp)) + fp->pointsize = MINSIZE; + fp->size = MAXINITSIZE; /* Initial distance between pts */ + fp->inctaille = 0.05; + fp->timer = 0; + fp->sidx = fp->x_flag = fp->y_flag = 0; + + if (!fp->initialized) { + fp->initialized = True; + if (!(fp->cache = XCreatePixmap(display, MI_WINDOW(mi), + MAXW(fp), MAXH(fp), MI_WIN_DEPTH(mi)))) +#ifdef STANDALONE + exit(-1); +#else /* !STANDALONE */ + error("%s: catastrophe memoire\n"); +#endif /* !STANDALONE */ + } + XSetForeground(display, MI_GC(mi), MI_WIN_BLACK_PIXEL(mi)); + XFillRectangle(display, fp->cache, MI_GC(mi), + 0, 0, MAXW(fp), MAXH(fp)); + /* don't want any exposure events from XCopyArea */ + XSetGraphicsExposures(display, MI_GC(mi), False); + if (MI_NPIXELS(mi) > 2) + fp->startcolor = NRAND(MI_NPIXELS(mi)); + if (fp->width <= MAXW(fp) || fp->height <= MAXH(fp)) { + fp->samp = MINAMP; + fp->sofs = 0; + fp->x_flag = random_num(fp->width - MINW(fp)); + fp->y_flag = random_num(fp->height - MINH(fp)); + } else { + fp->samp = MAXAMP; + fp->sofs = 20; + fp->x_flag = random_num(fp->width - MAXW(fp)); + fp->y_flag = random_num(fp->height - MAXH(fp)); + } + + initSintab(mi); + + XClearWindow(display, MI_WINDOW(mi)); +} + +void +draw_flag(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + flagstruct *fp = &flags[MI_SCREEN(mi)]; + + if (fp->width <= MAXW(fp) || fp->height <= MAXH(fp)) { + fp->size = MININITSIZE; + /* fp->pointsize = MINPOINTSIZE; */ + XCopyArea(display, fp->cache, window, MI_GC(mi), + 0, 0, MINW(fp), MINH(fp), fp->x_flag, fp->y_flag); + } else { + if ((fp->size + fp->inctaille) > MAXSCALE) + fp->inctaille = -fp->inctaille; + if ((fp->size + fp->inctaille) < MINSCALE) + fp->inctaille = -fp->inctaille; + fp->size += fp->inctaille; + XCopyArea(display, fp->cache, window, MI_GC(mi), + 0, 0, MAXW(fp), MAXH(fp), fp->x_flag, fp->y_flag); + } + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi)); + XFillRectangle(display, fp->cache, MI_GC(mi), + 0, 0, MAXW(fp), MAXH(fp)); + XFlush(display); + affiche(mi); + fp->sidx += 2; + fp->sidx %= (ANGLES * MI_NPIXELS(mi)); + XFlush(display); + fp->timer++; + if ((MI_CYCLES(mi) > 0) && (fp->timer >= MI_CYCLES(mi))) + init_flag(mi); +} + +void +release_flag(ModeInfo * mi) +{ + if (flags != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) + { + if (flags[screen].cache) + XFreePixmap(MI_DISPLAY(mi), flags[screen].cache); + if (flags[screen].image) + XDestroyImage(flags[screen].image); + } + (void) free((void *) flags); + flags = NULL; + } +} + +void +refresh_flag(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/flag.man b/hacks/flag.man new file mode 100644 index 00000000..897a1f25 --- /dev/null +++ b/hacks/flag.man @@ -0,0 +1,88 @@ +.TH XScreenSaver 1 "24-May-97" "X Version 11" +.SH NAME +flag - draws a waving flag, containing text or an image +.SH SYNOPSIS +.B flag +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-size \fIinteger\fP] [\-text \fIstring\fP] [\-font \fIfont\fP] [\-bitmap \fIxbm-file\fP] + +.SH DESCRIPTION +The \fIflag\fP program draws a waving flag that contains text or a bitmap. +.SH OPTIONS +.I flag +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. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.TP 8 +.B \-size \fIinteger\fP +How large the pixels in the flag should be, from 1 to 8. +If this is a negative number, the pixel size is chosen randomly +from the range 1 to -size. Default -7. +.TP 8 +.B \-text \fItext\fP +The text to display in the flag. Multiple lines of text are allowed; +the lines will be displayed centered atop one another. Default: none. +If the text is the magic string \fI"(default)"\fP, then the text used +will be the local machine name; a newline; and the local OS version. +.TP 8 +.B \-bitmap \fIxbm-file\fP +The bitmap to display in the flag; this must be an XBM file (color XPMs +are not allowed.) Default: none. If the bitmap is the magic +string \fI"(default)"\fP, then the bitmap used will be a charming +little picture of J. R. "Bob" Dobbs. + +If neither \fI\-text\fP nor \fI\-bitmap\fP are specified, then either +the builtin text or the builtin bitmap will be chosen randomly. +.TP 8 +.B \-font \fIfont\fP +The font in which to draw the text; the default is +"-*-helvetica-bold-r-*-240-*". +.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 1996 Charles Vidal. + +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 +Charles Vidal , 1996. + +Ability to run standalone or with \fIxscreensaver\fP, and the \-text +and \-bitmap options, added by Jamie Zawinski , 24-May-97. diff --git a/hacks/flame.c b/hacks/flame.c new file mode 100644 index 00000000..d723f055 --- /dev/null +++ b/hacks/flame.c @@ -0,0 +1,401 @@ +/* xscreensaver, Copyright (c) 1993, 1995, 1996 + * 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. + */ + +/* This file was ported from xlock for use in xscreensaver (and standalone) + * by jwz on 18-Oct-93. (And again, 11-May-97.) Original copyright reads: + * + * static char sccsid[] = "@(#)flame.c 1.4 91/09/27 XLOCK"; + * + * flame.c - recursive fractal cosmic flames. + * + * 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. + * + * Comments and additions should be sent to the author: + * + * naughton@eng.sun.com + * + * Patrick J. Naughton + * MS 21-14 + * Sun Laboritories, Inc. + * 2550 Garcia Ave + * Mountain View, CA 94043 + * + * Revision History: + * 01-Jun-95: This should look more like the original with some updates by + * Scott Draves. + * 27-Jun-91: vary number of functions used. + * 24-Jun-91: fixed portability problem with integer mod (%). + * 06-Jun-91: Written. (received from Scott Draves, spot@cs.cmu.edu). + */ + +#include +#include "screenhack.h" + +#define POINT_BUFFER_SIZE 10 +#define MAXLEV 4 +#define MAXKINDS 10 + +static double f[2][3][MAXLEV]; /* three non-homogeneous transforms */ +static int max_total; +static int max_levels; +static int max_points; +static int cur_level; +static int variation; +static int snum; +static int anum; +static int num_points; +static int total_points; +static int pixcol; +static int ncolors; +static XColor *colors; +static XPoint points [POINT_BUFFER_SIZE]; +static GC gc; + +static int delay, delay2; +static int width, height; + +static short +halfrandom (int mv) +{ + static short lasthalf = 0; + unsigned long r; + + if (lasthalf) + { + r = lasthalf; + lasthalf = 0; + } + else + { + r = random (); + lasthalf = r >> 16; + } + return (r % mv); +} + +static void +init_flame (Display *dpy, Window window) +{ + XGCValues gcv; + XWindowAttributes xgwa; + Colormap cmap; + XGetWindowAttributes (dpy, window, &xgwa); + width = xgwa.width; + height = xgwa.height; + cmap = xgwa.colormap; + + max_points = get_integer_resource ("iterations", "Integer"); + if (max_points <= 0) max_points = 100; + + max_levels = max_points; + + max_total = get_integer_resource ("points", "Integer"); + if (max_total <= 0) max_total = 10000; + + delay = get_integer_resource ("delay", "Integer"); + if (delay < 0) delay = 0; + delay2 = get_integer_resource ("delay2", "Integer"); + if (delay2 < 0) delay2 = 0; + + variation = random() % MAXKINDS; + + if (mono_p) + ncolors = 0; + else + { + ncolors = get_integer_resource ("colors", "Integer"); + if (ncolors <= 0) ncolors = 128; + colors = (XColor *) malloc ((ncolors+1) * sizeof (*colors)); + make_smooth_colormap (dpy, xgwa.visual, xgwa.colormap, colors, &ncolors, + True, 0, True); + if (ncolors <= 2) + mono_p = True, ncolors = 0; + } + + gcv.foreground = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + gcv.background = get_pixel_resource ("background", "Background", dpy, cmap); + + if (! mono_p) + { + pixcol = halfrandom (ncolors); + gcv.foreground = (colors [pixcol].pixel); + } + + gc = XCreateGC (dpy, window, GCForeground | GCBackground, &gcv); +} + +static int +recurse (double x, double y, int l, Display *dpy, Window win) +{ + int xp, yp, i; + double nx, ny; + + if (l == max_levels) + { + total_points++; + if (total_points > max_total) /* how long each fractal runs */ + return 0; + + if (x > -1.0 && x < 1.0 && y > -1.0 && y < 1.0) + { + xp = points[num_points].x = (int) ((width / 2) * (x + 1.0)); + yp = points[num_points].y = (int) ((height / 2) * (y + 1.0)); + num_points++; + if (num_points >= POINT_BUFFER_SIZE) + { + XDrawPoints (dpy, win, gc, points, num_points, CoordModeOrigin); + num_points = 0; + /* if (delay) usleep (delay); */ + /* XSync (dpy, True); */ + } + } + } + else + { + for (i = 0; i < snum; i++) + { + 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) + { + switch (variation) + { + case 0: /* sinusoidal */ + nx = sin(nx); + ny = sin(ny); + break; + case 1: /* complex */ + { + double r2 = nx * nx + ny * ny + 1e-6; + nx = nx / r2; + ny = ny / r2; + } + break; + case 2: /* bent */ + if (nx < 0.0) + nx = nx * 2.0; + if (ny < 0.0) + ny = ny / 2.0; + break; + case 3: /* swirl */ + { + double r = (nx * nx + ny * ny); /* times k here is fun */ + double c1 = sin(r); + double c2 = cos(r); + double t = nx; + + if (nx > 1e4 || nx < -1e4 || ny > 1e4 || ny < -1e4) + ny = 1e4; + else + ny = c2 * t + c1 * ny; + nx = c1 * nx - c2 * ny; + } + break; + case 4: /* horseshoe */ + { + double r, c1, c2, t; + + /* Avoid atan2: DOMAIN error message */ + if (nx == 0.0 && ny == 0.0) + r = 0.0; + else + r = atan2(nx, ny); /* times k here is fun */ + c1 = sin(r); + c2 = cos(r); + t = nx; + + nx = c1 * nx - c2 * ny; + ny = c2 * t + c1 * ny; + } + break; + case 5: /* drape */ + { + double t; + + /* Avoid atan2: DOMAIN error message */ + if (nx == 0.0 && ny == 0.0) + t = 0.0; + else + t = atan2(nx, ny) / M_PI; + + if (nx > 1e4 || nx < -1e4 || ny > 1e4 || ny < -1e4) + ny = 1e4; + else + ny = sqrt(nx * nx + ny * ny) - 1.0; + nx = t; + } + break; + case 6: /* broken */ + if (nx > 1.0) + nx = nx - 1.0; + if (nx < -1.0) + nx = nx + 1.0; + if (ny > 1.0) + ny = ny - 1.0; + if (ny < -1.0) + ny = ny + 1.0; + break; + case 7: /* spherical */ + { + double r = 0.5 + sqrt(nx * nx + ny * ny + 1e-6); + + nx = nx / r; + ny = ny / r; + } + break; + case 8: /* */ + nx = atan(nx) / M_PI_2; + ny = atan(ny) / M_PI_2; + break; +/* #if 0 */ /* core dumps on some machines, why not all? */ + case 9: /* complex sine */ + { + double u = nx; + double v = ny; + double ev = exp(v); + double emv = exp(-v); + + nx = (ev + emv) * sin(u) / 2.0; + ny = (ev - emv) * cos(u) / 2.0; + } + break; + case 10: /* polynomial */ + if (nx < 0) + nx = -nx * nx; + else + nx = nx * nx; + if (ny < 0) + ny = -ny * ny; + else + ny = ny * ny; + break; +/* #endif */ + default: + nx = sin(nx); + ny = sin(ny); + } + } + if (!recurse (nx, ny, l + 1, dpy, win)) + return 0; + } + } + return 1; +} + + +static void +flame (Display *dpy, Window window) +{ + int i, j, k; + static int alt = 0; + + if (!(cur_level++ % max_levels)) + { + if (delay2) usleep (delay2); + XClearWindow (dpy, window); + alt = !alt; + + variation = random() % MAXKINDS; + } + else + { + if (ncolors > 2) + { + XSetForeground (dpy, gc, colors [pixcol].pixel); + if (--pixcol < 0) + pixcol = ncolors - 1; + } + } + + /* number of functions */ + snum = 2 + (cur_level % (MAXLEV - 1)); + + /* how many of them are of alternate form */ + if (alt) + anum = 0; + else + anum = halfrandom (snum) + 2; + + /* 6 coefs per function */ + for (k = 0; k < snum; k++) + { + for (i = 0; i < 2; i++) + for (j = 0; j < 3; j++) + f[i][j][k] = ((double) (random() & 1023) / 512.0 - 1.0); + } + num_points = 0; + total_points = 0; + (void) recurse (0.0, 0.0, 0, dpy, window); + XDrawPoints (dpy, window, gc, points, num_points, CoordModeOrigin); + XSync (dpy, True); + if (delay) usleep (delay); +} + + +#ifdef __hpux +/* I don't understand why this is necessary, but I'm told that this program + does nothing at all on HP-sUX without it. + */ +#undef random +#undef srandom +#include +int matherr(x) + register struct exception *x; +{ + if (x->type == PLOSS) return 1; + else return 0; +} +#endif /* __hpux */ + + + +char *progclass = "Flame"; + +char *defaults [] = { + "Flame.background: black", /* to placate SGI */ + "Flame.foreground: white", + "*colors: 64", + "*iterations: 25", + "*delay: 50000", + "*delay2: 2000000", + "*points: 10000", + 0 +}; + +XrmOptionDescRec options [] = { + { "-colors", ".colors", XrmoptionSepArg, 0 }, + { "-iterations", ".iterations", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-delay2", ".delay2", XrmoptionSepArg, 0 }, + { "-points", ".points", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_flame (dpy, window); + while (1) + flame (dpy, window); +} diff --git a/hacks/flame.man b/hacks/flame.man new file mode 100644 index 00000000..5c3f7b66 --- /dev/null +++ b/hacks/flame.man @@ -0,0 +1,70 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +flame - draw weird cosmic fractals +.SH SYNOPSIS +.B flame +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-colors \fIinteger\fP] [\-iterations \fIinteger\fP] [\-points \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-delay2 \fImicroseconds\fP] +.SH DESCRIPTION +The \fIflame\fP program generates colorful fractal displays. +.SH OPTIONS +.I flame +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 \-colors \fIinteger\fP +How many colors should be used (if possible). Default 64. +.TP 8 +.B \-iterations \fIinteger\fP +How many fractals to generate. Default 25. +.TP 8 +.B \-points \fIinteger\fP +How many pixels to draw for each fractal. Default 10000. +.TP 8 +.B \-delay \fImicroseconds\fP +How long we should wait between drawing each fractal. Default 50000, +or about 1/20th second. +.TP 8 +.B \-delay2 \fImicroseconds\fP +How long we should wait before clearing the screen when each run ends. +Default 2000000, or two seconds. +.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 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. +.SH AUTHOR +Scott Graves , 06-Jun-91.n + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 18-Oct-93. diff --git a/hacks/forest.c b/hacks/forest.c new file mode 100644 index 00000000..881fe779 --- /dev/null +++ b/hacks/forest.c @@ -0,0 +1,206 @@ +/* -*- Mode: C; tab-width: 4 -*- + * forest.c --- draw a fractal forest. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)forest.c 4.03 97/05/10 xlockmore"; +#endif + +/* Copyright (c) 1995 Pascal Pensa + * + * Original idea : Guillaume Ramey + * + * 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 "Forest" +# define HACK_INIT init_forest +# define HACK_DRAW draw_forest +# define forest_opts xlockmore_opts +# define DEFAULTS "*count: 100 \n" \ + "*cycles: 200 \n" \ + "*delay: 400000 \n" \ + "*ncolors: 100 \n" +# define UNIFORM_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt forest_opts = { + 0, NULL, 0, NULL, NULL }; + + +#define MINTREES 1 + +#define MINHEIGHT 20 /* Tree height range */ +#define MAXHEIGHT 40 + +#define MINANGLE 15 /* (degree) angle between soon */ +#define MAXANGLE 35 +#define RANDANGLE 15 /* (degree) Max random angle from default */ + +#define REDUCE 90 /* Height % from father */ + +#define ITERLEVEL 10 /* Tree iteration */ + +#define COLORSPEED 2 /* Color increment */ + +/* degree to radian */ +#define DEGTORAD(x) (((float)(x)) * M_PI / 180.0) + +#define RANGE_RAND(min,max) ((min) + NRAND((max) - (min))) + +typedef struct { + int width; + int height; + int time; /* up time */ + int ntrees; +} foreststruct; + +static foreststruct *forests = NULL; + +static void +draw_tree(ModeInfo * mi, + short int x, short int y, short int len, + float a, float as, short int c, short int level) + /* Father's end */ + /* Length */ + /* color */ + /* Height level */ + /* Father's angle */ + /* Father's angle step */ +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + short x_1, y_1, x_2, y_2; + float a1, a2; + + /* left */ + + a1 = a + as + DEGTORAD(NRAND(2 * RANDANGLE) - RANDANGLE); + + x_1 = x + (short) (COSF(a1) * ((float) len)); + y_1 = y + (short) (SINF(a1) * ((float) len)); + + /* right */ + + a2 = a - as + DEGTORAD(NRAND(2 * RANDANGLE) - RANDANGLE); + + x_2 = x + (short) (COSF(a2) * ((float) len)); + y_2 = y + (short) (SINF(a2) * ((float) len)); + + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, c)); + c = (c + COLORSPEED) % MI_NPIXELS(mi); + } else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + + XDrawLine(display, window, gc, x, y, x_1, y_1); + XDrawLine(display, window, gc, x, y, x_2, y_2); + + if (level < 2) { + XDrawLine(display, window, gc, x + 1, y, x_1 + 1, y_1); + XDrawLine(display, window, gc, x + 1, y, x_2 + 1, y_2); + } + len = (len * REDUCE * 10) / 1000; + + if (level < ITERLEVEL) { + draw_tree(mi, x_1, y_1, len, a1, as, c, level + 1); + draw_tree(mi, x_2, y_2, len, a2, as, c, level + 1); + } +} + +void +init_forest(ModeInfo * mi) +{ + foreststruct *fp; + + if (forests == NULL) { + if ((forests = (foreststruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (foreststruct))) == NULL) + return; + } + fp = &forests[MI_SCREEN(mi)]; + + fp->width = MI_WIN_WIDTH(mi); + fp->height = MI_WIN_HEIGHT(mi); + fp->time = 0; + + fp->ntrees = MI_BATCHCOUNT(mi); + if (fp->ntrees < -MINTREES) + fp->ntrees = NRAND(-fp->ntrees - MINTREES + 1) + MINTREES; + else if (fp->ntrees < MINTREES) + fp->ntrees = MINTREES; + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); +} + +void +draw_forest(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + foreststruct *fp = &forests[MI_SCREEN(mi)]; + short x, y, x_2, y_2, len, c = 0; + float a, as; + + if (fp->time < fp->ntrees) { + + x = RANGE_RAND(0, fp->width); + y = RANGE_RAND(0, fp->height + MAXHEIGHT); + a = -M_PI / 2.0 + DEGTORAD(NRAND(2 * RANDANGLE) - RANDANGLE); + as = DEGTORAD(RANGE_RAND(MINANGLE, MAXANGLE)); + len = ((RANGE_RAND(MINHEIGHT, MAXHEIGHT) * (fp->width / 20)) / 50) + 2; + + if (MI_NPIXELS(mi) > 2) { + c = NRAND(MI_NPIXELS(mi)); + XSetForeground(display, gc, MI_PIXEL(mi, c)); + c = (c + COLORSPEED) % MI_NPIXELS(mi); + } else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + + x_2 = x + (short) (COSF(a) * ((float) len)); + y_2 = y + (short) (SINF(a) * ((float) len)); + + XDrawLine(display, MI_WINDOW(mi), gc, x, y, x_2, y_2); + XDrawLine(display, MI_WINDOW(mi), gc, x + 1, y, x_2 + 1, y_2); + + draw_tree(mi, x_2, y_2, (len * REDUCE) / 100, a, as, c, 1); + } + if (++fp->time > MI_CYCLES(mi)) + init_forest(mi); +} + +void +release_forest(ModeInfo * mi) +{ + if (forests != NULL) { + (void) free((void *) forests); + forests = NULL; + } +} + +void +refresh_forest(ModeInfo * mi) +{ + foreststruct *fp = &forests[MI_SCREEN(mi)]; + + if (fp->time < fp->ntrees) + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + else + init_forest(mi); +} diff --git a/hacks/forest.man b/hacks/forest.man new file mode 100644 index 00000000..a584cf7b --- /dev/null +++ b/hacks/forest.man @@ -0,0 +1,63 @@ +.TH XScreenSaver 1 "27-May-97" "X Version 11" +.SH NAME +forest - draws a fractal forest +.SH SYNOPSIS +.B forest +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] + +.SH DESCRIPTION +The \fIforest\fP program draws a fractal forest. +.SH OPTIONS +.I forest +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 100. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.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 1995 by Pascal Pensa. + +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 +Pascal Pensa , 1995. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 27-May-97. diff --git a/hacks/fract.c b/hacks/fract.c new file mode 100644 index 00000000..c8a65453 --- /dev/null +++ b/hacks/fract.c @@ -0,0 +1,135 @@ +/* -*- 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 + * 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 new file mode 100644 index 00000000..8f80f8f4 --- /dev/null +++ b/hacks/fract.man @@ -0,0 +1,62 @@ +.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 , 1997. + +Tweaked by David Hansen , 21-Mar-97. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/galaxy.c b/hacks/galaxy.c new file mode 100644 index 00000000..737c4f5d --- /dev/null +++ b/hacks/galaxy.c @@ -0,0 +1,442 @@ +/* -*- Mode: C; tab-width: 4 -*- + * galaxy --- draw spinning, colliding galaxies. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)galaxy.c 4.02 97/04/01 xlockmore"; +#endif + +/* Originally done by Uli Siegmund (uli@wombat.okapi.sub.org) on Amiga + * for EGS in Cluster + * + * 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. + * 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. + * 18-Apr-97: Memory leak fixed by Tom Schmidt + * 07-Apr-97: Modified by Dave Mitchell + * 23-Oct-94: Modified by David Bagley + * random star sizes + * colors change depending on velocity + * 10-Oct-94: Add colors by Hubert Feyer + * 30-Sep-94: Initial port by Hubert Feyer + * 09-Mar-94: VMS can generate a random number 0.0 which results in a + * division by zero, corrected by Jouk Jansen + * + */ + +#ifdef STANDALONE +# define PROGCLASS "Galaxy" +# define HACK_INIT init_galaxy +# define HACK_DRAW draw_galaxy +# define galaxy_opts xlockmore_opts +# define DEFAULTS "*count: 5 \n" \ + "*cycles: 250 \n" \ + "*delay: 100 \n" \ + "*size: 3 \n" \ + "*ncolors: 64 \n" +# define UNIFORM_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#define FLOATRAND ((double) LRAND() / ((double) MAXRAND)) + +#if 0 +#define WRAP 1 /* Warp around edges */ +#define BOUNCE 1 /* Bounce from borders */ +#endif + +#define MINSIZE 1 +#define MINGALAXIES 1 +#define MAX_STARS 300 +#define MAX_IDELTAT 50 +/* These come originally from the Cluster-version */ +#define DEFAULT_GALAXIES 2 +#define DEFAULT_STARS 1000 +#define DEFAULT_HITITERATIONS 7500 +#define DEFAULT_IDELTAT 200 /* 0.02 */ +#define EPSILON 0.0000001 + +#define GALAXYRANGESIZE 0.1 +#define GALAXYMINSIZE 0.1 +#define QCONS 0.001 + +#define COLORBASE 8 + /* Colors for stars start here */ +#define COLORSTEP (NUMCOLORS/COLORBASE) /* 8 colors per galaxy */ + +#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; + int color; + int size; +} Star; + +typedef struct { + int mass; + int nstars; + Star *stars; + double pos[3], vel[3]; + int galcol; +} Galaxy; + +typedef struct { + struct { + int left; /* x minimum */ + int right; /* x maximum */ + int top; /* y minimum */ + int bottom; /* y maximum */ + } clip; + double mat[3][3]; /* Movement of stars(?) */ + double scale; /* Scale */ + int midx; /* Middle of screen, x */ + int midy; /* Middle of screen, y */ + double size; /* */ + 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; + +static unistruct *universes = NULL; + +static void +free_galaxies(unistruct * gp) +{ + if (gp->galaxies != NULL) { + int i; + + for (i = 0; i < gp->ngalaxies; i++) { + Galaxy *gt = &gp->galaxies[i]; + + if (gt->stars != NULL) + (void) free((void *) gt->stars); + } + (void) free((void *) gp->galaxies); + gp->galaxies = NULL; + } +} + +static void +startover(ModeInfo * mi) +{ + unistruct *gp = &universes[MI_SCREEN(mi)]; + int size = MI_SIZE(mi); + int i, j; /* more tmp */ + double w1, w2; /* more tmp */ + double d, v, w, h; /* yet more tmp */ + + gp->step = 0; + + if (MI_BATCHCOUNT(mi) < -MINGALAXIES) + free_galaxies(gp); + gp->ngalaxies = MI_BATCHCOUNT(mi); + if (gp->ngalaxies < -MINGALAXIES) + gp->ngalaxies = NRAND(-gp->ngalaxies - MINGALAXIES + 1) + MINGALAXIES; + else if (gp->ngalaxies < MINGALAXIES) + gp->ngalaxies = MINGALAXIES; + if (gp->galaxies == NULL) + gp->galaxies = (Galaxy *) calloc(gp->ngalaxies, sizeof (Galaxy)); + + for (i = 0; i < gp->ngalaxies; ++i) { + Galaxy *gt = &gp->galaxies[i]; + double sinw1, sinw2, cosw1, cosw2; + + gt->galcol = NRAND(COLORBASE - 2); + if (gt->galcol > 1) + gt->galcol += 2; /* Mult 8; 16..31 no green stars */ + /* Galaxies still may have some green stars but are not all green. */ + + if (gt->stars != NULL) { + (void) free((void *) gt->stars); + gt->stars = NULL; + } + gt->nstars = (NRAND(MAX_STARS / 2)) + MAX_STARS / 2; + gt->stars = (Star *) malloc(gt->nstars * sizeof (Star)); + w1 = 2.0 * M_PI * FLOATRAND; + w2 = 2.0 * M_PI * FLOATRAND; + sinw1 = SINF(w1); + sinw2 = SINF(w2); + cosw1 = COSF(w1); + cosw2 = COSF(w2); + + gp->mat[0][0] = cosw2; + gp->mat[0][1] = -sinw1 * sinw2; + gp->mat[0][2] = cosw1 * sinw2; + gp->mat[1][0] = 0.0; + gp->mat[1][1] = cosw1; + gp->mat[1][2] = sinw1; + gp->mat[2][0] = -sinw2; + gp->mat[2][1] = -sinw1 * cosw2; + gp->mat[2][2] = cosw1 * cosw2; + + 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 * + gp->f_hititerations + FLOATRAND - 0.5; + gt->pos[1] = -gt->vel[1] * gp->f_deltat * + gp->f_hititerations + FLOATRAND - 0.5; + gt->pos[2] = -gt->vel[2] * gp->f_deltat * + gp->f_hititerations + FLOATRAND - 0.5; + + gt->mass = (int) (FLOATRAND * 1000.0) + 1; + + gp->size = GALAXYRANGESIZE * FLOATRAND + GALAXYMINSIZE; + + for (j = 0; j < gt->nstars; ++j) { + Star *st = >->stars[j]; + double sinw, cosw; + + w = 2.0 * M_PI * FLOATRAND; + sinw = SINF(w); + cosw = COSF(w); + d = FLOATRAND * gp->size; + h = FLOATRAND * exp(-2.0 * (d / gp->size)) / 5.0 * gp->size; + if (FLOATRAND < 0.5) + h = -h; + st->pos[0] = gp->mat[0][0] * d * cosw + gp->mat[1][0] * d * sinw + + gp->mat[2][0] * h + gt->pos[0]; + st->pos[1] = gp->mat[0][1] * d * cosw + gp->mat[1][1] * d * sinw + + gp->mat[2][1] * h + gt->pos[1]; + st->pos[2] = gp->mat[0][2] * d * cosw + gp->mat[1][2] * d * sinw + + gp->mat[2][2] * h + gt->pos[2]; + + v = sqrt(gt->mass * QCONS / sqrt(d * d + h * h)); + st->vel[0] = -gp->mat[0][0] * v * sinw + gp->mat[1][0] * v * cosw + + gt->vel[0]; + st->vel[1] = -gp->mat[0][1] * v * sinw + gp->mat[1][1] * v * cosw + + gt->vel[1]; + st->vel[2] = -gp->mat[0][2] * v * sinw + gp->mat[1][2] * v * cosw + + gt->vel[2]; + + st->px = 0; + st->py = 0; + + if (size < -MINSIZE) + st->size = NRAND(-size - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + st->size = MINSIZE; + else + st->size = size; + } + } + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(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("Screen: "); + (void) printf("%dx%d pixel (%d-%d, %d-%d)\n", + (gp->clip.right - gp->clip.left), (gp->clip.bottom - gp->clip.top), + gp->clip.left, gp->clip.right, gp->clip.top, gp->clip.bottom); +#endif /*0 */ +} + +void +init_galaxy(ModeInfo * mi) +{ + unistruct *gp; + + if (universes == NULL) { + if ((universes = (unistruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (unistruct))) == NULL) + return; + } + 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; + gp->clip.right = MI_WIN_WIDTH(mi); + gp->clip.bottom = MI_WIN_HEIGHT(mi); + + gp->scale = (double) (gp->clip.right + gp->clip.bottom) / 8.0; + gp->midx = gp->clip.right / 2; + gp->midy = gp->clip.bottom / 2; + startover(mi); +} + +void +draw_galaxy(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + unistruct *gp = &universes[MI_SCREEN(mi)]; + double d; /* tmp */ + int i, j, k; /* more tmp */ + + for (i = 0; i < gp->ngalaxies; ++i) { + Galaxy *gt = &gp->galaxies[i]; + + for (j = 0; j < gp->galaxies[i].nstars; ++j) { + Star *st = >->stars[j]; + + for (k = 0; k < gp->ngalaxies; ++k) { + Galaxy *gtk = &gp->galaxies[k]; + + 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]; + } + + 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->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; + + if (st->px >= gp->clip.left && + st->px <= gp->clip.right - st->size && + st->py >= gp->clip.top && + st->py <= gp->clip.bottom - st->size) { + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + drawStar(st->px, st->py, st->size); + } + st->px = (int) (st->pos[0] * gp->scale) + gp->midx; + st->py = (int) (st->pos[1] * gp->scale) + gp->midy; + + +#ifdef WRAP + if (st->px < gp->clip.left) { + (void) printf("wrap l -> r\n"); + st->px = gp->clip.right; + } + if (st->px > gp->clip.right) { + (void) printf("wrap r -> l\n"); + st->px = gp->clip.left; + } + if (st->py > gp->clip.bottom) { + (void) printf("wrap b -> t\n"); + st->py = gp->clip.top; + } + if (st->py < gp->clip.top) { + (void) printf("wrap t -> b\n"); + st->py = gp->clip.bottom; + } +#endif /*WRAP */ + + + if (st->px >= gp->clip.left && + st->px <= gp->clip.right - st->size && + st->py >= gp->clip.top && + st->py <= gp->clip.bottom - st->size) { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, st->color)); + else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + if (tracks) + drawStar(st->px + 1, st->py, st->size); + else + drawStar(st->px, st->py, st->size); + } + } + + for (k = i + 1; k < gp->ngalaxies; ++k) { + Galaxy *gtk = &gp->galaxies[k]; + + 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; + } + 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; + } + + gp->step++; + if (gp->step > gp->f_hititerations * 4) + startover(mi); +} + +void +release_galaxy(ModeInfo * mi) +{ + if (universes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) + free_galaxies(&universes[screen]); + (void) free((void *) universes); + universes = NULL; + } +} + +void +refresh_galaxy(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/galaxy.man b/hacks/galaxy.man new file mode 100644 index 00000000..8a4fe4c5 --- /dev/null +++ b/hacks/galaxy.man @@ -0,0 +1,83 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +galaxy - draws spinning galaxies +.SH SYNOPSIS +.B galaxy +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-size \fIinteger\fP] [\-trail] [\-no\-trail] + +.SH DESCRIPTION +The \fIgalaxy\fP program draws spinning galaxies. +.SH OPTIONS +.I galaxy +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 64. +The colors used cycle through the hue, making N stops around +the color wheel. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.TP 8 +.B \-size \fIinteger\fP + +.TP 8 +.B \-trail +.TP 8 +.B \-no\-trail + +.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 1994 by Hubert Feyrer. + +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 +Original Amiga version by Uli Siegmund + for EGS in Cluster. + +Ported from Cluster/EGS to C/Intuition by Harald Backert. + +Ported to X11 and xlockmore by +Hubert Feyrer , 30-Sep-94. + +Modified by David Bagley , 23-Oct-94. + +Modified by Dave Mitchell , 7-Apr-97. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/glx/Makefile.in b/hacks/glx/Makefile.in new file mode 100644 index 00000000..2f8292b6 --- /dev/null +++ b/hacks/glx/Makefile.in @@ -0,0 +1,333 @@ +# hacks/glx/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# the `../../configure' script generates `hacks/glx/Makefile' from this file. + +@SET_MAKE@ +.SUFFIXES: +.SUFFIXES: .c .o + +srcdir = @srcdir@ +VPATH = @srcdir@ + +install_prefix = +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +mansuffix = 1 + +CC = @CC@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +DEFS = -DSTANDALONE -DUSE_GL @DEFS@ +LIBS = @LIBS@ + +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +SHELL = /bin/sh +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +HACKDIR = @HACKDIR@ + +X_CFLAGS = @X_CFLAGS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ + +HACK_LIBS = $(LIBS) $(X_LIBS) $(X_PRE_LIBS) @GL_LIBS@ @HACK_LIBS@ \ + -lXt -lX11 -lXext $(X_EXTRA_LIBS) -lm + +HACK_SRC = $(srcdir)/.. +HACK_BIN = .. +UTILS_SRC = $(HACK_SRC)/../utils +UTILS_BIN = $(HACK_BIN)/../utils + +INCLUDES = -I$(srcdir) -I$(UTILS_SRC) -I$(HACK_SRC) \ + -I$(HACK_SRC)/.. @INCLUDES@ + +UTIL_SRCS = $(UTILS_SRC)/colors.c $(UTILS_SRC)/hsv.c \ + $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \ + $(UTILS_SRC)/visual.c $(UTILS_SRC)/yarandom.c +UTIL_OBJS = $(UTILS_SRC)/colors.o $(UTILS_SRC)/hsv.o \ + $(UTILS_SRC)/resources.o $(UTILS_SRC)/usleep.o \ + $(UTILS_SRC)/visual.o $(UTILS_SRC)/yarandom.o + +SRCS = buildlwo.c escher.c gears.c morph3d.c pipeobjs.c pipes.c \ + s1_1.c s1_2.c s1_3.c s1_4.c s1_5.c s1_6.c s1_b.c \ + sproingies.c sproingiewrap.c superquadrics.c rubik.c \ + xlock-gl.c + +OBJS = buildlwo.o escher.o gears.o morph3d.o pipeobjs.o pipes.o \ + s1_1.o s1_2.o s1_3.o s1_4.o s1_5.o s1_6.o s1_b.o \ + sproingies.o sproingiewrap.o superquadrics.o rubik.o \ + xlock-gl.o + +GL_EXES = escher gears pipes sproingies superquadrics morph3d rubik +EXES = @GL_EXES@ + +HACK_OBJS = screenhack-gl.o xlock-gl.o $(HACK_BIN)/xlockmore.o \ + $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \ + $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o \ + $(UTILS_BIN)/hsv.o $(UTILS_BIN)/colors.o + +HDRS = buildlwo.h e_textures.h +MEN = +EXTRAS = README Makefile.in + +TARFILES = $(SRCS) $(HDRS) $(MEN) $(EXTRAS) + + +all: $(EXES) + +install: install-program install-man +uninstall: uninstall-program uninstall-man + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install + +install-program: + @exes="$(EXES)" ; \ + for program in $$exes; do \ + echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ; \ + $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ; \ + done + +install-man: + @men="$(MEN)" ; \ + for man in $$men; do \ + instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ + echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ; \ + $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ; \ + done + +uninstall-program: + @for program in $(EXES); do \ + echo rm -f $(HACKDIR)/$$program ; \ + rm -f $(HACKDIR)/$$program ; \ + done + +uninstall-man: + @men="$(MEN)" ; \ + for man in $$men; do \ + instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ + echo rm -f $(man1dir)/$$instname ; \ + rm -f $(man1dir)/$$instname ; \ + done + +clean: + -rm -f *.o a.out core $(EXES) + +distclean: clean + -rm -f Makefile *~ "#"* + +# Adds all current dependencies to Makefile +depend: + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SRCS) + +# Adds some dependencies to Makefile.in -- not totally accurate, but pretty +# 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: + @echo updating dependencies in `pwd`/Makefile.in... ; \ + $(DEPEND) -w 0 -f - \ + -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SRCS) | \ + ( \ + awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@\.\./\.\./utils@$$(UTILS_SRC)@g' \ + -e 's@\.\./glx/@@g' \ + -e 's@ \.\./@ $$(HACK_SRC)/@g' \ + -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +TAGS: tags +tags: + find $(srcdir) -name '*.[chly]' -print | xargs etags -a + +echo_tarfiles: + @echo $(TARFILES) + + +# 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... +# +$(UTILS_BIN)/colors.o: $(UTILS_SRC)/colors.c +$(UTILS_BIN)/hsv.o: $(UTILS_SRC)/hsv.c +$(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c +$(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c +$(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c +$(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c + +$(UTIL_OBJS): + cd $(UTILS_BIN) ; \ + $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +$(HACK_BIN)/xlockmore.o: $(HACK_SRC)/xlockmore.c + cd $(HACK_BIN) ; $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" + + +# How we build object files in this directory. +.c.o: + $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< + +# These hacks use a slightly-differently-compiled variant of screenhack.c. +# This is how to make the the other .o file from it. +# +screenhack-gl.o: $(HACK_SRC)/screenhack.c + $(CC) -o $@ -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) \ + -DXLOCKMORE -DUSE_GL $(HACK_SRC)/screenhack.c + +CC_HACK = $(CC) $(LDFLAGS) + +gears: gears.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) + +superquadrics: superquadrics.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) + +escher: escher.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) + +pipes: pipes.o $(HACK_OBJS) pipeobjs.o buildlwo.o + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) pipeobjs.o buildlwo.o \ + $(HACK_LIBS) + +morph3d: morph3d.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) + +rubik: rubik.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) + +SPROINGIES = sproingiewrap.o buildlwo.o \ + s1_1.o s1_2.o s1_3.o s1_4.o s1_5.o s1_6.o s1_b.o +sproingies: sproingies.o $(HACK_OBJS) $(SPROINGIES) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(SPROINGIES) $(HACK_LIBS) + + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +buildlwo.o: $(srcdir)/buildlwo.h +escher.o: $(HACK_SRC)/xlockmore.h +escher.o: $(HACK_SRC)/../config.h +escher.o: $(HACK_SRC)/xlockmoreI.h +escher.o: $(HACK_SRC)/screenhack.h +escher.o: $(UTILS_SRC)/yarandom.h +escher.o: $(UTILS_SRC)/usleep.h +escher.o: $(UTILS_SRC)/resources.h +escher.o: $(UTILS_SRC)/hsv.h +escher.o: $(UTILS_SRC)/colors.h +escher.o: $(UTILS_SRC)/grabscreen.h +escher.o: $(UTILS_SRC)/visual.h +escher.o: $(srcdir)/e_textures.h +gears.o: $(HACK_SRC)/xlockmore.h +gears.o: $(HACK_SRC)/../config.h +gears.o: $(HACK_SRC)/xlockmoreI.h +gears.o: $(HACK_SRC)/screenhack.h +gears.o: $(UTILS_SRC)/yarandom.h +gears.o: $(UTILS_SRC)/usleep.h +gears.o: $(UTILS_SRC)/resources.h +gears.o: $(UTILS_SRC)/hsv.h +gears.o: $(UTILS_SRC)/colors.h +gears.o: $(UTILS_SRC)/grabscreen.h +gears.o: $(UTILS_SRC)/visual.h +morph3d.o: $(HACK_SRC)/xlockmore.h +morph3d.o: $(HACK_SRC)/../config.h +morph3d.o: $(HACK_SRC)/xlockmoreI.h +morph3d.o: $(HACK_SRC)/screenhack.h +morph3d.o: $(UTILS_SRC)/yarandom.h +morph3d.o: $(UTILS_SRC)/usleep.h +morph3d.o: $(UTILS_SRC)/resources.h +morph3d.o: $(UTILS_SRC)/hsv.h +morph3d.o: $(UTILS_SRC)/colors.h +morph3d.o: $(UTILS_SRC)/grabscreen.h +morph3d.o: $(UTILS_SRC)/visual.h +pipeobjs.o: $(srcdir)/buildlwo.h +pipes.o: $(HACK_SRC)/xlockmore.h +pipes.o: $(HACK_SRC)/../config.h +pipes.o: $(HACK_SRC)/xlockmoreI.h +pipes.o: $(HACK_SRC)/screenhack.h +pipes.o: $(UTILS_SRC)/yarandom.h +pipes.o: $(UTILS_SRC)/usleep.h +pipes.o: $(UTILS_SRC)/resources.h +pipes.o: $(UTILS_SRC)/hsv.h +pipes.o: $(UTILS_SRC)/colors.h +pipes.o: $(UTILS_SRC)/grabscreen.h +pipes.o: $(UTILS_SRC)/visual.h +pipes.o: $(srcdir)/buildlwo.h +s1_1.o: $(srcdir)/buildlwo.h +s1_2.o: $(srcdir)/buildlwo.h +s1_3.o: $(srcdir)/buildlwo.h +s1_4.o: $(srcdir)/buildlwo.h +s1_5.o: $(srcdir)/buildlwo.h +s1_6.o: $(srcdir)/buildlwo.h +s1_b.o: $(srcdir)/buildlwo.h +sproingies.o: $(HACK_SRC)/xlockmoreI.h +sproingies.o: $(HACK_SRC)/screenhack.h +sproingies.o: $(HACK_SRC)/../config.h +sproingies.o: $(UTILS_SRC)/yarandom.h +sproingies.o: $(UTILS_SRC)/usleep.h +sproingies.o: $(UTILS_SRC)/resources.h +sproingies.o: $(UTILS_SRC)/hsv.h +sproingies.o: $(UTILS_SRC)/colors.h +sproingies.o: $(UTILS_SRC)/grabscreen.h +sproingies.o: $(UTILS_SRC)/visual.h +sproingies.o: $(srcdir)/buildlwo.h +sproingiewrap.o: $(HACK_SRC)/xlockmore.h +sproingiewrap.o: $(HACK_SRC)/../config.h +sproingiewrap.o: $(HACK_SRC)/xlockmoreI.h +sproingiewrap.o: $(HACK_SRC)/screenhack.h +sproingiewrap.o: $(UTILS_SRC)/yarandom.h +sproingiewrap.o: $(UTILS_SRC)/usleep.h +sproingiewrap.o: $(UTILS_SRC)/resources.h +sproingiewrap.o: $(UTILS_SRC)/hsv.h +sproingiewrap.o: $(UTILS_SRC)/colors.h +sproingiewrap.o: $(UTILS_SRC)/grabscreen.h +sproingiewrap.o: $(UTILS_SRC)/visual.h +superquadrics.o: $(HACK_SRC)/xlockmore.h +superquadrics.o: $(HACK_SRC)/../config.h +superquadrics.o: $(HACK_SRC)/xlockmoreI.h +superquadrics.o: $(HACK_SRC)/screenhack.h +superquadrics.o: $(UTILS_SRC)/yarandom.h +superquadrics.o: $(UTILS_SRC)/usleep.h +superquadrics.o: $(UTILS_SRC)/resources.h +superquadrics.o: $(UTILS_SRC)/hsv.h +superquadrics.o: $(UTILS_SRC)/colors.h +superquadrics.o: $(UTILS_SRC)/grabscreen.h +superquadrics.o: $(UTILS_SRC)/visual.h +rubik.o: $(HACK_SRC)/xlockmore.h +rubik.o: $(HACK_SRC)/../config.h +rubik.o: $(HACK_SRC)/xlockmoreI.h +rubik.o: $(HACK_SRC)/screenhack.h +rubik.o: $(UTILS_SRC)/yarandom.h +rubik.o: $(UTILS_SRC)/usleep.h +rubik.o: $(UTILS_SRC)/resources.h +rubik.o: $(UTILS_SRC)/hsv.h +rubik.o: $(UTILS_SRC)/colors.h +rubik.o: $(UTILS_SRC)/grabscreen.h +rubik.o: $(UTILS_SRC)/visual.h +xlock-gl.o: $(HACK_SRC)/screenhack.h +xlock-gl.o: $(HACK_SRC)/../config.h +xlock-gl.o: $(UTILS_SRC)/yarandom.h +xlock-gl.o: $(UTILS_SRC)/usleep.h +xlock-gl.o: $(UTILS_SRC)/resources.h +xlock-gl.o: $(UTILS_SRC)/hsv.h +xlock-gl.o: $(UTILS_SRC)/colors.h +xlock-gl.o: $(UTILS_SRC)/grabscreen.h +xlock-gl.o: $(UTILS_SRC)/visual.h +xlock-gl.o: $(HACK_SRC)/xlockmoreI.h + diff --git a/hacks/glx/README b/hacks/glx/README new file mode 100644 index 00000000..83a795b6 --- /dev/null +++ b/hacks/glx/README @@ -0,0 +1,6 @@ + +This directory contains various graphics hacks that requre GL. These are +independent from the xscreensaver program (in the ../../driver/ directory) +but some of them use the utility functions found in the ../../utils/ directory. + +If you have compilation problems, check the parameters in ../../config.h. diff --git a/hacks/glx/buildlwo.c b/hacks/glx/buildlwo.c new file mode 100644 index 00000000..f405730d --- /dev/null +++ b/hacks/glx/buildlwo.c @@ -0,0 +1,101 @@ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)buildlwo.c 4.02 97/04/20 xlockmore"; + +#endif + +/*- + * buildlwo.c: Lightwave Object Display List Builder for OpenGL + * + * This module can be called by any GL mode wishing to use + * objects created in NewTek's Lightwave 3D. The objects must + * first be converted to C source with my converter "lw2ogl". + * If other people are interested in this, I will put up a + * web page for it at http://www.early.com/~emackey/lw2ogl/ + * + * by Ed Mackey, 4/19/97 + * + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include +#include "buildlwo.h" + +GLuint +BuildLWO(int wireframe, struct lwo *object) +{ + GLuint dl_num; + GLfloat *pnts, *normals, three[3], *grab; + unsigned short int *pols; + int p, num_pnts = 0; + + dl_num = glGenLists(1); + if (!dl_num) + return (0); + + pnts = object->pnts; + normals = object->normals; + pols = object->pols; + + glNewList(dl_num, GL_COMPILE); + + if (!pols) { + num_pnts = object->num_pnts; + glBegin(GL_POINTS); + for (p = 0; p < num_pnts; ++p) { + three[0] = *(pnts++); + three[1] = *(pnts++); + three[2] = *(pnts++); + glVertex3fv(three); + } + glEnd(); + } else + for (;;) { + if (num_pnts <= 0) { + num_pnts = *pols + 2; + if (num_pnts < 3) + break; + if (num_pnts == 3) { + glBegin(GL_POINTS); + } else if (num_pnts == 4) { + glBegin(GL_LINES); + } else { + three[0] = *(normals++); + three[1] = *(normals++); + three[2] = *(normals++); + glNormal3fv(three); + if (wireframe) + glBegin(GL_LINE_LOOP); + else + glBegin(GL_POLYGON); + } + } else if (num_pnts == 1) { + glEnd(); + } else { + grab = pnts + ((int) (*pols) * 3); + three[0] = *(grab++); + three[1] = *(grab++); + three[2] = *(grab++); + glVertex3fv(three); + } + --num_pnts; + ++pols; + } + + glEndList(); + + return (dl_num); +} + +#endif /* USE_GL */ + +/* End of buildlwo.c */ diff --git a/hacks/glx/buildlwo.h b/hacks/glx/buildlwo.h new file mode 100644 index 00000000..fd9f027e --- /dev/null +++ b/hacks/glx/buildlwo.h @@ -0,0 +1,24 @@ +/*- + * buildlwo.h: Header file for Lightwave Object Display List Builder + * for OpenGL + * + * by Ed Mackey, 4/19/97 + * + */ + +#ifndef __BUILD_LWO_H__ +#define __BUILD_LWO_H__ + +struct lwo { + int num_pnts; + GLfloat *pnts; + GLfloat *normals; + unsigned short int *pols; + GLfloat *smoothnormals; +}; + +GLuint BuildLWO(int wireframe, struct lwo *object); + +#endif + +/* End of buildlwo.h */ diff --git a/hacks/glx/e_textures.h b/hacks/glx/e_textures.h new file mode 100644 index 00000000..7f9457e3 --- /dev/null +++ b/hacks/glx/e_textures.h @@ -0,0 +1,1478 @@ +static unsigned char WoodTextureWidth = 199; +static unsigned char WoodTextureHeight = 37; +static unsigned char WoodTextureData[] = +{ + 84, 30, 12, 84, 26, 12, 108, 42, 28, 100, 38, 28, 108, 42, 28, + 108, 46, 28, 100, 38, 28, 108, 46, 28, 108, 42, 28, 108, 42, 20, + 108, 42, 28, 108, 38, 20, 108, 42, 20, 108, 42, 28, 116, 42, 28, + 108, 42, 20, 108, 46, 28, 100, 34, 12, 108, 42, 20, 108, 42, 20, + 108, 42, 20, 108, 38, 20, 100, 38, 20, 100, 38, 20, 108, 42, 20, + 108, 42, 20, 108, 38, 20, 100, 38, 20, 108, 38, 20, 100, 38, 20, + 108, 42, 20, 108, 42, 20, 108, 42, 28, 108, 42, 20, 108, 42, 20, + 100, 38, 20, 100, 38, 20, 100, 38, 20, 108, 38, 20, 116, 50, 28, + 108, 42, 28, 108, 42, 20, 100, 38, 20, 108, 42, 20, 108, 42, 20, + 108, 46, 28, 108, 42, 20, 108, 42, 20, 108, 42, 20, 100, 38, 20, + 108, 38, 20, 100, 38, 20, 108, 38, 20, 100, 38, 20, 100, 38, 20, + 108, 38, 20, 100, 38, 20, 108, 38, 20, 100, 42, 20, 108, 42, 20, + 108, 42, 28, 108, 42, 20, 100, 38, 20, 108, 42, 20, 100, 38, 20, + 100, 34, 12, 100, 38, 20, 108, 38, 20, 100, 38, 20, 108, 42, 20, + 108, 42, 20, 108, 42, 20, 100, 38, 20, 108, 38, 20, 100, 38, 20, + 100, 34, 12, 100, 38, 20, 108, 38, 20, 100, 38, 20, 108, 42, 20, + 100, 38, 20, 100, 34, 12, 100, 34, 12, 100, 38, 20, 108, 38, 20, + 100, 38, 20, 108, 38, 20, 108, 42, 20, 100, 38, 20, 108, 42, 20, + 108, 42, 28, 108, 46, 20, 108, 38, 20, 108, 42, 20, 108, 46, 28, + 108, 46, 28, 108, 42, 20, 108, 42, 20, 108, 42, 20, 100, 38, 20, + 108, 42, 20, 100, 38, 20, 108, 38, 20, 100, 38, 20, 108, 38, 20, + 108, 42, 20, 108, 46, 28, 116, 50, 28, 116, 54, 36, 116, 54, 36, + 116, 54, 28, 108, 46, 28, 108, 42, 20, 108, 42, 28, 108, 42, 20, + 108, 42, 20, 108, 46, 28, 116, 50, 28, 116, 50, 28, 116, 50, 28, + 116, 46, 28, 108, 42, 28, 116, 50, 36, 116, 50, 36, 100, 38, 20, + 108, 42, 28, 108, 38, 20, 100, 38, 20, 108, 38, 20, 108, 42, 28, + 108, 46, 28, 116, 46, 28, 108, 42, 28, 108, 42, 28, 108, 42, 20, + 108, 46, 28, 116, 50, 28, 116, 50, 28, 116, 50, 28, 116, 50, 28, + 108, 42, 28, 108, 42, 20, 100, 38, 20, 116, 50, 28, 108, 46, 28, + 108, 42, 20, 108, 42, 20, 108, 46, 28, 116, 46, 28, 108, 46, 28, + 108, 46, 28, 108, 46, 20, 108, 46, 28, 116, 46, 28, 108, 46, 28, + 116, 50, 28, 108, 46, 28, 108, 46, 28, 108, 42, 20, 116, 46, 28, + 108, 46, 28, 108, 42, 20, 108, 42, 28, 108, 46, 28, 116, 50, 28, + 116, 50, 28, 116, 50, 36, 124, 54, 36, 116, 54, 36, 116, 54, 28, + 116, 50, 28, 116, 50, 28, 108, 46, 28, 116, 46, 28, 108, 46, 28, + 116, 50, 28, 116, 46, 28, 116, 50, 28, 116, 50, 28, 116, 50, 28, + 116, 50, 28, 108, 46, 28, 108, 46, 20, 124, 50, 36, 116, 54, 28, + 124, 54, 28, 116, 54, 28, 116, 54, 28, 116, 54, 28, 124, 54, 36, + 124, 58, 36, 124, 50, 36, 116, 46, 28, 116, 46, 28, 116, 42, 28, + 116, 50, 36, 124, 66, 44, 108, 58, 36, 84, 30, 12, 100, 42, 20, + 116, 54, 36, 140, 82, 68, 148, 86, 68, 148, 86, 68, 156, 90, 76, + 148, 86, 68, 156, 86, 76, 156, 86, 68, 148, 86, 68, 156, 86, 68, + 156, 86, 68, 156, 86, 68, 156, 86, 68, 156, 90, 68, 156, 86, 68, + 156, 90, 68, 164, 94, 76, 164, 98, 84, 164, 102, 84, 164, 102, 84, + 164, 98, 76, 156, 94, 68, 164, 94, 76, 156, 94, 76, 164, 98, 84, + 164, 98, 76, 164, 98, 76, 156, 94, 76, 164, 98, 76, 164, 98, 76, + 164, 102, 84, 164, 102, 84, 172, 106, 84, 172, 106, 84, 164, 98, 76, + 164, 94, 68, 164, 94, 68, 164, 98, 76, 172, 106, 84, 164, 98, 76, + 164, 98, 76, 164, 94, 68, 164, 94, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 102, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 94, 68, 164, 98, 76, 164, 98, 76, 164, 102, 76, + 164, 94, 76, 156, 94, 68, 172, 102, 84, 172, 106, 84, 172, 102, 84, + 164, 98, 76, 164, 102, 76, 172, 102, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 102, 84, 164, 102, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 172, 102, 76, 164, 98, 76, + 164, 94, 76, 156, 94, 68, 164, 98, 76, 164, 102, 76, 164, 98, 76, + 164, 98, 76, 164, 94, 76, 156, 94, 68, 164, 94, 76, 164, 102, 76, + 172, 106, 84, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 102, 76, 172, 102, 84, + 172, 106, 84, 172, 110, 84, 180, 110, 92, 172, 110, 84, 172, 110, 84, + 180, 114, 92, 188, 122, 100, 188, 122, 100, 188, 122, 100, 188, 118, 92, + 180, 110, 92, 172, 106, 84, 172, 106, 84, 172, 106, 84, 180, 114, 92, + 188, 118, 100, 188, 118, 100, 180, 118, 100, 188, 122, 108, 188, 126, 108, + 188, 118, 100, 196, 130, 108, 204, 134, 116, 188, 126, 108, 196, 122, 108, + 180, 118, 100, 180, 110, 92, 180, 114, 100, 180, 118, 100, 188, 118, 100, + 188, 122, 108, 188, 118, 100, 188, 118, 100, 180, 118, 100, 188, 118, 100, + 180, 118, 100, 180, 118, 100, 180, 118, 100, 180, 114, 92, 180, 114, 92, + 172, 110, 92, 172, 106, 84, 180, 114, 92, 172, 106, 92, 172, 102, 84, + 172, 106, 84, 172, 110, 92, 180, 110, 84, 172, 110, 92, 172, 106, 84, + 172, 102, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 102, 84, + 164, 102, 84, 164, 102, 76, 172, 106, 84, 172, 110, 92, 180, 110, 92, + 172, 110, 84, 172, 114, 92, 180, 114, 92, 180, 110, 92, 172, 110, 92, + 172, 106, 92, 172, 106, 84, 172, 106, 84, 164, 102, 84, 180, 114, 100, + 180, 114, 92, 180, 118, 100, 180, 118, 100, 180, 114, 92, 172, 110, 92, + 172, 106, 84, 172, 106, 84, 180, 110, 92, 180, 114, 92, 180, 114, 92, + 172, 110, 92, 172, 110, 84, 172, 110, 92, 180, 114, 92, 180, 118, 100, + 196, 126, 100, 196, 122, 108, 196, 126, 108, 196, 130, 116, 196, 134, 116, + 204, 142, 124, 164, 106, 84, 100, 42, 20, 84, 26, 4, 132, 78, 68, + 188, 122, 108, 188, 122, 108, 188, 126, 116, 196, 134, 116, 188, 122, 108, + 188, 126, 108, 188, 126, 108, 188, 122, 108, 196, 126, 108, 196, 130, 108, + 188, 126, 108, 188, 122, 100, 196, 126, 108, 196, 126, 108, 188, 126, 108, + 196, 130, 108, 196, 130, 108, 196, 134, 116, 196, 130, 108, 196, 130, 108, + 188, 126, 108, 196, 126, 108, 188, 126, 108, 196, 130, 108, 188, 126, 108, + 188, 126, 108, 196, 126, 108, 188, 126, 108, 196, 130, 108, 196, 130, 108, + 196, 134, 116, 204, 142, 116, 204, 134, 116, 196, 130, 108, 196, 130, 108, + 188, 126, 108, 196, 126, 100, 196, 134, 108, 196, 130, 108, 188, 126, 100, + 188, 122, 100, 188, 126, 108, 196, 126, 100, 188, 126, 108, 196, 126, 100, + 188, 126, 100, 196, 130, 108, 204, 134, 108, 196, 134, 116, 196, 134, 108, + 196, 130, 108, 196, 126, 108, 196, 130, 108, 196, 130, 108, 196, 130, 108, + 188, 126, 108, 196, 126, 108, 196, 134, 108, 196, 130, 108, 196, 130, 108, + 188, 122, 100, 196, 130, 108, 196, 130, 108, 196, 134, 108, 196, 130, 108, + 188, 126, 100, 196, 130, 108, 196, 134, 108, 204, 134, 116, 204, 138, 116, + 204, 138, 116, 204, 134, 116, 196, 130, 108, 196, 130, 108, 196, 134, 108, + 204, 134, 116, 196, 134, 116, 196, 134, 108, 196, 130, 108, 196, 130, 108, + 204, 134, 116, 204, 138, 116, 204, 138, 116, 196, 130, 108, 196, 130, 108, + 188, 122, 100, 180, 118, 92, 188, 118, 100, 196, 130, 108, 196, 130, 108, + 188, 126, 100, 188, 122, 100, 188, 122, 100, 204, 134, 108, 196, 134, 116, + 204, 134, 116, 196, 134, 108, 196, 130, 108, 204, 134, 108, 204, 138, 116, + 204, 138, 116, 212, 142, 124, 204, 142, 116, 204, 134, 116, 204, 138, 116, + 204, 138, 116, 204, 138, 116, 204, 134, 108, 188, 126, 108, 196, 130, 108, + 196, 126, 100, 188, 122, 100, 196, 130, 108, 204, 138, 116, 212, 146, 124, + 204, 142, 116, 204, 138, 116, 212, 146, 124, 212, 142, 124, 204, 138, 124, + 204, 138, 124, 204, 138, 124, 204, 138, 116, 212, 142, 124, 204, 138, 124, + 196, 130, 116, 204, 134, 116, 204, 138, 116, 204, 138, 124, 204, 138, 116, + 204, 138, 124, 204, 134, 116, 204, 138, 124, 212, 142, 124, 204, 138, 116, + 196, 134, 116, 196, 130, 108, 196, 134, 116, 204, 138, 116, 204, 142, 124, + 212, 142, 124, 204, 138, 116, 204, 138, 116, 204, 138, 116, 204, 138, 116, + 204, 138, 124, 204, 142, 124, 204, 142, 116, 204, 138, 124, 196, 134, 108, + 196, 134, 116, 196, 134, 116, 196, 130, 116, 196, 130, 108, 188, 126, 108, + 196, 126, 108, 188, 130, 108, 188, 126, 108, 188, 122, 100, 180, 118, 100, + 188, 118, 100, 188, 126, 108, 196, 130, 108, 196, 126, 108, 188, 126, 108, + 188, 122, 100, 188, 122, 108, 188, 126, 108, 196, 126, 108, 196, 130, 108, + 188, 126, 108, 196, 126, 108, 188, 126, 108, 196, 134, 108, 196, 134, 116, + 196, 134, 108, 196, 130, 108, 196, 126, 108, 188, 122, 108, 188, 122, 100, + 188, 122, 100, 196, 130, 108, 196, 130, 100, 196, 130, 108, 196, 130, 100, + 188, 130, 108, 196, 130, 108, 196, 134, 108, 204, 138, 116, 204, 130, 108, + 204, 134, 116, 204, 134, 116, 204, 134, 116, 204, 138, 124, 204, 146, 124, + 156, 102, 84, 84, 26, 4, 84, 26, 4, 116, 58, 36, 164, 106, 92, + 164, 102, 84, 164, 106, 92, 172, 110, 92, 156, 98, 84, 172, 102, 84, + 172, 102, 84, 180, 110, 92, 180, 118, 100, 180, 118, 100, 180, 110, 92, + 180, 110, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 172, 106, 92, + 172, 106, 84, 172, 106, 84, 172, 106, 92, 172, 110, 92, 172, 110, 92, + 172, 106, 84, 172, 106, 84, 164, 102, 84, 164, 102, 84, 172, 102, 76, + 164, 102, 84, 172, 106, 84, 172, 106, 84, 172, 110, 92, 172, 110, 84, + 180, 110, 92, 172, 110, 84, 180, 110, 92, 172, 110, 84, 172, 106, 84, + 172, 110, 84, 180, 110, 92, 172, 106, 84, 172, 102, 84, 164, 102, 84, + 172, 102, 76, 172, 102, 84, 172, 102, 84, 164, 102, 76, 164, 94, 76, + 172, 102, 84, 172, 110, 92, 172, 110, 84, 172, 102, 84, 164, 98, 76, + 172, 102, 76, 172, 106, 84, 172, 110, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 180, 114, 92, 180, 114, 92, 172, 110, 84, 172, 106, 84, + 172, 102, 76, 172, 110, 84, 172, 110, 84, 172, 102, 84, 172, 102, 84, + 172, 106, 84, 180, 110, 92, 172, 110, 84, 180, 118, 92, 180, 114, 92, + 180, 110, 92, 172, 110, 84, 180, 110, 92, 180, 114, 92, 180, 118, 92, + 188, 122, 100, 188, 118, 100, 180, 114, 92, 180, 118, 92, 180, 114, 92, + 180, 118, 92, 188, 118, 100, 180, 118, 92, 180, 114, 92, 180, 118, 92, + 180, 110, 84, 180, 110, 92, 180, 118, 92, 188, 122, 100, 188, 114, 100, + 180, 114, 92, 180, 114, 92, 196, 126, 108, 188, 126, 100, 188, 122, 100, + 188, 118, 100, 180, 118, 100, 180, 114, 92, 188, 118, 100, 188, 122, 100, + 180, 110, 92, 172, 110, 84, 180, 110, 92, 180, 114, 92, 188, 122, 100, + 188, 126, 100, 188, 118, 100, 180, 114, 92, 172, 110, 84, 172, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 118, 92, 188, 118, 100, 188, 122, 100, + 188, 122, 100, 180, 106, 92, 172, 110, 92, 172, 102, 84, 172, 102, 84, + 164, 94, 76, 164, 94, 76, 164, 98, 76, 164, 102, 84, 172, 102, 84, + 172, 106, 84, 180, 110, 92, 180, 110, 92, 180, 110, 92, 172, 106, 92, + 172, 106, 84, 172, 106, 92, 172, 110, 84, 164, 102, 84, 164, 98, 76, + 164, 94, 76, 164, 98, 76, 172, 110, 92, 180, 114, 92, 180, 118, 100, + 180, 118, 100, 188, 122, 100, 180, 122, 108, 188, 122, 100, 188, 122, 100, + 188, 122, 100, 188, 122, 100, 188, 126, 108, 188, 122, 100, 188, 126, 108, + 188, 122, 100, 188, 122, 100, 180, 118, 100, 180, 114, 92, 180, 114, 92, + 180, 118, 100, 180, 110, 92, 172, 110, 92, 172, 106, 84, 180, 110, 92, + 180, 118, 92, 180, 118, 100, 180, 114, 92, 180, 110, 92, 172, 110, 84, + 172, 110, 92, 180, 114, 92, 180, 114, 92, 180, 118, 92, 180, 118, 92, + 180, 114, 92, 180, 118, 92, 180, 110, 92, 180, 110, 92, 180, 114, 92, + 172, 110, 92, 172, 106, 84, 172, 106, 84, 172, 106, 92, 172, 110, 84, + 180, 110, 92, 180, 114, 92, 180, 118, 92, 180, 118, 92, 180, 118, 92, + 180, 118, 92, 188, 118, 100, 188, 122, 100, 180, 114, 100, 180, 110, 92, + 188, 114, 100, 180, 110, 92, 172, 110, 92, 180, 126, 108, 148, 98, 76, + 84, 26, 4, 84, 26, 12, 108, 50, 36, 164, 102, 84, 164, 98, 84, + 156, 94, 76, 164, 98, 84, 148, 86, 68, 156, 90, 76, 156, 94, 84, + 164, 90, 76, 164, 98, 84, 172, 102, 84, 164, 94, 76, 156, 90, 68, + 164, 94, 76, 164, 98, 84, 164, 94, 76, 164, 98, 76, 164, 98, 84, + 164, 98, 76, 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 164, 102, 84, 164, 94, 68, 164, 94, 76, 156, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 84, 164, 102, 84, 172, 102, 84, 164, 98, 76, + 164, 98, 76, 172, 102, 84, 172, 106, 84, 172, 106, 84, 180, 106, 84, + 172, 110, 84, 172, 106, 84, 164, 102, 76, 164, 98, 76, 164, 98, 76, + 164, 102, 76, 164, 102, 76, 164, 98, 76, 164, 98, 76, 172, 106, 84, + 180, 110, 84, 172, 106, 84, 164, 98, 76, 164, 98, 76, 172, 106, 84, + 180, 114, 92, 172, 106, 84, 164, 102, 76, 164, 98, 76, 172, 106, 84, + 180, 110, 92, 180, 114, 92, 180, 110, 92, 172, 106, 84, 172, 106, 84, + 180, 114, 92, 188, 118, 100, 180, 114, 92, 172, 110, 84, 180, 114, 92, + 180, 114, 92, 180, 114, 92, 172, 110, 92, 172, 106, 84, 164, 102, 76, + 172, 102, 76, 164, 102, 84, 180, 110, 84, 180, 118, 92, 188, 118, 100, + 188, 122, 100, 180, 118, 92, 180, 110, 92, 180, 110, 84, 172, 106, 92, + 180, 114, 84, 180, 114, 100, 188, 122, 100, 188, 122, 100, 180, 114, 92, + 172, 110, 92, 180, 114, 92, 188, 118, 92, 180, 114, 92, 180, 114, 92, + 180, 118, 92, 164, 102, 84, 172, 102, 84, 172, 106, 84, 172, 102, 76, + 164, 102, 76, 172, 102, 84, 172, 110, 84, 180, 114, 92, 172, 110, 84, + 172, 102, 84, 172, 106, 84, 180, 110, 84, 180, 118, 100, 188, 118, 92, + 180, 110, 92, 172, 106, 84, 172, 106, 84, 180, 110, 92, 188, 118, 92, + 180, 118, 100, 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 118, 100, + 180, 114, 92, 188, 122, 100, 188, 126, 108, 188, 118, 100, 172, 110, 92, + 172, 102, 84, 172, 106, 84, 180, 106, 92, 164, 98, 76, 172, 102, 84, + 172, 106, 92, 172, 106, 84, 172, 106, 84, 172, 102, 84, 172, 102, 84, + 172, 102, 84, 172, 106, 84, 164, 102, 84, 164, 98, 76, 164, 98, 76, + 172, 106, 84, 172, 110, 92, 180, 114, 92, 180, 114, 92, 180, 118, 100, + 188, 122, 100, 188, 122, 100, 188, 126, 108, 188, 122, 100, 188, 122, 100, + 188, 122, 108, 196, 126, 108, 180, 118, 92, 188, 118, 100, 180, 118, 100, + 180, 118, 100, 180, 114, 92, 180, 110, 92, 180, 114, 92, 180, 118, 100, + 180, 110, 92, 172, 110, 84, 172, 106, 92, 172, 110, 92, 188, 118, 100, + 180, 118, 100, 180, 114, 92, 172, 106, 84, 180, 110, 92, 180, 114, 92, + 172, 110, 92, 180, 114, 92, 180, 114, 100, 180, 114, 92, 172, 110, 92, + 172, 110, 92, 180, 114, 92, 180, 114, 92, 180, 114, 100, 180, 110, 92, + 172, 110, 92, 172, 110, 92, 180, 114, 92, 180, 118, 92, 172, 106, 84, + 180, 110, 84, 180, 118, 92, 188, 122, 100, 180, 118, 100, 180, 118, 92, + 180, 118, 92, 180, 114, 92, 180, 110, 92, 180, 110, 92, 188, 118, 108, + 188, 118, 100, 188, 122, 100, 188, 130, 108, 156, 102, 84, 84, 26, 12, + 84, 30, 12, 108, 46, 28, 140, 82, 68, 156, 90, 76, 156, 94, 84, + 156, 94, 84, 156, 94, 76, 164, 94, 76, 156, 90, 76, 164, 94, 76, + 156, 94, 76, 156, 90, 68, 156, 90, 68, 164, 90, 76, 156, 90, 68, + 148, 82, 60, 148, 78, 60, 164, 98, 76, 164, 94, 76, 156, 90, 68, + 156, 90, 68, 156, 94, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 156, 90, 68, 148, 86, 68, 156, 90, 68, 156, 90, 68, 156, 90, 76, + 164, 94, 68, 156, 94, 76, 156, 94, 68, 156, 90, 68, 156, 90, 68, + 172, 102, 76, 180, 114, 92, 188, 118, 92, 172, 106, 84, 180, 106, 84, + 172, 106, 84, 164, 98, 76, 164, 94, 68, 164, 98, 76, 172, 102, 84, + 172, 106, 84, 172, 102, 76, 164, 98, 76, 172, 106, 84, 180, 110, 92, + 172, 110, 84, 172, 98, 76, 164, 98, 76, 172, 106, 84, 180, 118, 92, + 180, 106, 84, 180, 106, 84, 172, 106, 84, 172, 110, 84, 180, 110, 92, + 180, 110, 84, 172, 102, 76, 164, 98, 76, 164, 94, 68, 172, 106, 84, + 180, 114, 92, 172, 106, 84, 164, 98, 76, 172, 98, 76, 172, 106, 84, + 172, 106, 84, 180, 106, 84, 180, 110, 84, 172, 110, 84, 180, 110, 92, + 180, 110, 84, 180, 110, 92, 180, 110, 84, 172, 106, 84, 188, 118, 92, + 188, 114, 92, 172, 106, 84, 172, 102, 76, 172, 106, 84, 188, 118, 92, + 188, 122, 100, 188, 118, 100, 188, 118, 92, 180, 110, 92, 180, 114, 84, + 180, 114, 92, 180, 110, 92, 172, 106, 84, 164, 98, 76, 172, 102, 76, + 180, 106, 84, 180, 114, 84, 172, 102, 76, 164, 94, 76, 172, 106, 84, + 180, 110, 84, 172, 106, 84, 172, 106, 84, 188, 122, 100, 188, 118, 92, + 180, 118, 92, 188, 118, 100, 196, 122, 100, 188, 122, 100, 180, 118, 92, + 180, 110, 84, 188, 114, 92, 172, 110, 84, 172, 106, 84, 180, 114, 92, + 188, 114, 92, 180, 114, 92, 180, 114, 84, 180, 114, 92, 180, 110, 92, + 180, 110, 92, 180, 110, 92, 172, 106, 84, 164, 98, 76, 172, 110, 92, + 188, 118, 100, 180, 118, 92, 180, 110, 92, 180, 114, 100, 180, 118, 100, + 172, 106, 84, 164, 94, 76, 164, 98, 76, 172, 102, 76, 164, 102, 84, + 164, 102, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 172, 106, 92, 180, 118, 92, 180, 118, 100, + 180, 114, 92, 180, 110, 92, 180, 114, 92, 180, 114, 100, 180, 118, 92, + 180, 118, 100, 188, 122, 108, 188, 122, 100, 188, 118, 100, 180, 114, 92, + 180, 114, 92, 172, 110, 92, 172, 110, 92, 172, 106, 84, 188, 122, 100, + 180, 114, 100, 172, 106, 84, 172, 110, 84, 180, 114, 92, 180, 114, 92, + 180, 110, 92, 172, 110, 92, 172, 106, 84, 172, 110, 92, 180, 114, 92, + 180, 118, 100, 180, 114, 92, 172, 110, 92, 172, 110, 92, 180, 110, 92, + 164, 106, 84, 172, 106, 84, 172, 110, 84, 172, 110, 92, 172, 110, 92, + 180, 110, 84, 172, 110, 92, 172, 110, 84, 180, 110, 92, 180, 110, 92, + 180, 114, 92, 180, 118, 92, 180, 118, 92, 180, 118, 100, 188, 118, 92, + 188, 118, 100, 180, 110, 92, 180, 110, 92, 188, 118, 100, 188, 118, 100, + 180, 118, 100, 180, 122, 108, 148, 90, 68, 84, 30, 12, 92, 34, 12, + 116, 58, 44, 156, 90, 76, 156, 94, 76, 156, 94, 76, 156, 90, 76, + 148, 86, 68, 156, 90, 76, 148, 86, 68, 156, 86, 68, 156, 86, 68, + 156, 90, 68, 156, 90, 76, 156, 90, 68, 156, 86, 68, 148, 78, 60, + 140, 74, 52, 148, 82, 68, 148, 82, 60, 148, 86, 68, 156, 90, 68, + 156, 94, 76, 164, 98, 76, 164, 98, 84, 164, 98, 76, 148, 86, 68, + 156, 86, 68, 156, 90, 68, 156, 90, 76, 156, 94, 68, 156, 94, 76, + 164, 94, 76, 164, 98, 76, 172, 102, 76, 164, 98, 76, 172, 102, 76, + 172, 106, 84, 180, 110, 92, 172, 106, 84, 164, 98, 76, 172, 102, 76, + 172, 102, 84, 164, 94, 68, 164, 94, 76, 172, 102, 76, 180, 110, 84, + 180, 110, 92, 164, 98, 76, 172, 102, 76, 172, 106, 84, 172, 102, 76, + 164, 98, 76, 164, 98, 76, 172, 102, 76, 180, 110, 92, 180, 110, 92, + 172, 110, 84, 172, 106, 84, 180, 106, 84, 180, 114, 84, 180, 110, 92, + 172, 102, 84, 164, 98, 76, 156, 94, 68, 172, 106, 84, 188, 114, 92, + 180, 110, 84, 172, 106, 84, 172, 102, 76, 172, 106, 84, 180, 110, 84, + 172, 106, 84, 172, 106, 84, 180, 110, 84, 180, 110, 92, 180, 114, 84, + 172, 110, 84, 172, 106, 84, 172, 106, 84, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 90, 68, 164, 98, 76, 172, 102, 84, 172, 106, 76, + 172, 102, 76, 172, 106, 84, 172, 106, 84, 180, 110, 84, 180, 114, 92, + 188, 114, 92, 180, 110, 84, 180, 110, 92, 180, 114, 92, 172, 106, 84, + 180, 114, 92, 172, 106, 84, 164, 94, 68, 172, 106, 84, 180, 114, 92, + 188, 118, 92, 196, 126, 100, 188, 122, 100, 188, 122, 100, 188, 118, 92, + 180, 118, 92, 188, 118, 100, 188, 118, 92, 180, 114, 92, 172, 106, 84, + 180, 114, 92, 180, 106, 84, 172, 102, 76, 172, 102, 76, 172, 106, 84, + 172, 102, 84, 172, 106, 84, 180, 110, 84, 172, 102, 84, 164, 102, 84, + 172, 102, 84, 164, 94, 76, 156, 90, 68, 164, 94, 76, 180, 106, 92, + 172, 102, 84, 164, 98, 84, 180, 110, 84, 180, 110, 92, 164, 98, 84, + 164, 94, 76, 164, 98, 76, 164, 98, 84, 172, 98, 76, 164, 102, 84, + 164, 102, 84, 172, 102, 84, 164, 106, 84, 172, 106, 92, 172, 106, 92, + 172, 110, 92, 180, 110, 84, 180, 118, 100, 188, 118, 100, 180, 118, 100, + 180, 114, 92, 172, 114, 92, 180, 110, 92, 180, 110, 92, 180, 114, 92, + 180, 118, 100, 180, 118, 92, 180, 114, 100, 180, 114, 92, 180, 110, 92, + 172, 110, 92, 180, 110, 92, 172, 114, 92, 188, 118, 100, 180, 114, 92, + 172, 110, 92, 172, 106, 84, 172, 110, 92, 172, 110, 92, 172, 110, 84, + 164, 102, 84, 172, 102, 84, 172, 110, 92, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 110, 92, 172, 106, 84, 172, 106, 84, 172, 110, 92, + 180, 110, 92, 180, 114, 92, 180, 114, 92, 180, 118, 100, 180, 114, 92, + 180, 114, 100, 180, 114, 92, 180, 114, 92, 180, 118, 92, 188, 118, 92, + 188, 122, 92, 180, 122, 100, 188, 122, 100, 180, 122, 100, 188, 118, 100, + 196, 122, 100, 188, 118, 100, 196, 122, 108, 180, 114, 100, 180, 114, 100, + 180, 126, 108, 148, 98, 76, 92, 34, 12, 84, 26, 12, 116, 58, 36, + 148, 90, 76, 148, 90, 76, 140, 82, 68, 148, 82, 68, 140, 78, 60, + 156, 86, 68, 148, 86, 68, 156, 90, 68, 156, 90, 76, 164, 94, 76, + 156, 90, 76, 156, 90, 68, 148, 82, 68, 148, 78, 60, 140, 78, 60, + 156, 86, 68, 148, 86, 68, 156, 86, 68, 156, 90, 68, 156, 94, 76, + 164, 94, 76, 156, 94, 76, 148, 86, 68, 148, 82, 60, 148, 86, 68, + 156, 90, 68, 156, 90, 76, 156, 90, 68, 156, 90, 68, 156, 94, 76, + 164, 102, 76, 172, 102, 84, 172, 102, 76, 172, 106, 84, 180, 110, 84, + 180, 114, 84, 180, 110, 84, 172, 102, 76, 180, 106, 84, 172, 106, 76, + 172, 98, 76, 164, 98, 68, 172, 106, 76, 172, 106, 84, 180, 110, 84, + 172, 98, 76, 180, 106, 84, 180, 110, 84, 180, 110, 84, 172, 98, 76, + 172, 98, 76, 180, 106, 84, 180, 114, 84, 188, 114, 92, 180, 110, 84, + 180, 110, 84, 180, 110, 84, 180, 114, 92, 180, 110, 84, 172, 106, 84, + 164, 98, 68, 164, 94, 68, 180, 106, 84, 188, 118, 92, 180, 114, 92, + 180, 110, 84, 180, 110, 84, 180, 110, 92, 180, 110, 84, 172, 106, 76, + 180, 106, 84, 180, 110, 84, 180, 114, 92, 188, 114, 92, 180, 110, 84, + 180, 106, 84, 172, 106, 76, 180, 106, 84, 188, 114, 92, 180, 114, 84, + 180, 110, 84, 180, 114, 92, 188, 118, 92, 188, 118, 92, 180, 110, 84, + 180, 106, 84, 172, 106, 76, 180, 106, 84, 188, 114, 92, 188, 118, 92, + 180, 118, 92, 188, 118, 92, 196, 122, 100, 172, 106, 84, 188, 114, 84, + 172, 106, 84, 164, 98, 68, 172, 102, 76, 180, 106, 84, 180, 110, 84, + 188, 118, 92, 188, 122, 92, 188, 114, 92, 180, 110, 92, 180, 114, 84, + 188, 118, 92, 188, 118, 92, 180, 110, 84, 172, 102, 84, 188, 122, 92, + 180, 110, 84, 164, 102, 76, 172, 102, 76, 172, 98, 76, 172, 102, 76, + 172, 102, 76, 180, 106, 84, 180, 110, 92, 180, 106, 84, 180, 106, 84, + 172, 102, 76, 164, 90, 76, 172, 98, 76, 180, 110, 92, 172, 102, 76, + 172, 102, 84, 180, 106, 84, 180, 110, 84, 172, 102, 84, 172, 98, 76, + 164, 94, 76, 164, 98, 76, 164, 98, 76, 172, 98, 84, 164, 98, 76, + 164, 102, 84, 172, 106, 84, 172, 106, 84, 172, 110, 92, 180, 114, 92, + 180, 114, 92, 188, 122, 100, 188, 122, 100, 188, 122, 100, 180, 118, 100, + 172, 106, 92, 172, 106, 84, 164, 106, 84, 172, 106, 84, 180, 114, 92, + 180, 110, 92, 172, 110, 84, 172, 110, 92, 180, 110, 92, 172, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 118, 92, 172, 110, 92, 172, 106, 84, + 172, 106, 84, 172, 110, 92, 172, 106, 84, 164, 102, 84, 164, 94, 76, + 164, 98, 76, 172, 110, 92, 180, 114, 92, 172, 106, 92, 172, 106, 92, + 172, 110, 84, 172, 106, 92, 164, 102, 84, 172, 110, 92, 180, 110, 92, + 172, 110, 92, 180, 114, 92, 180, 114, 92, 180, 118, 100, 180, 114, 92, + 180, 118, 92, 180, 114, 92, 188, 114, 92, 180, 118, 92, 180, 118, 100, + 180, 118, 92, 180, 118, 100, 188, 118, 92, 180, 118, 92, 180, 110, 92, + 180, 106, 92, 180, 110, 92, 172, 106, 92, 172, 106, 84, 172, 114, 92, + 140, 90, 68, 84, 26, 12, 84, 30, 12, 116, 58, 44, 156, 90, 76, + 156, 90, 76, 148, 86, 68, 148, 86, 76, 148, 86, 68, 156, 90, 76, + 156, 90, 76, 164, 94, 84, 164, 98, 76, 164, 94, 76, 156, 90, 68, + 156, 86, 68, 156, 86, 60, 156, 90, 68, 156, 90, 76, 164, 94, 76, + 156, 94, 68, 156, 94, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 156, 94, 76, 156, 94, 68, 148, 78, 60, 148, 86, 68, 156, 90, 68, + 156, 90, 68, 148, 86, 68, 156, 86, 68, 156, 90, 68, 164, 98, 76, + 164, 94, 68, 172, 98, 76, 180, 106, 84, 188, 118, 92, 188, 118, 92, + 188, 118, 100, 180, 114, 92, 180, 114, 84, 180, 106, 84, 172, 102, 76, + 172, 98, 76, 172, 106, 84, 180, 106, 84, 164, 98, 68, 172, 102, 76, + 180, 114, 84, 196, 122, 100, 188, 118, 92, 172, 106, 76, 172, 102, 76, + 180, 110, 84, 188, 122, 92, 188, 118, 92, 188, 114, 92, 180, 110, 84, + 188, 114, 84, 188, 114, 92, 180, 114, 84, 180, 106, 84, 172, 102, 76, + 164, 94, 68, 180, 110, 84, 188, 118, 92, 188, 118, 92, 188, 114, 92, + 180, 114, 92, 188, 114, 84, 180, 114, 92, 180, 106, 84, 180, 110, 84, + 180, 114, 84, 188, 114, 92, 180, 114, 84, 180, 110, 92, 180, 110, 84, + 180, 106, 84, 180, 114, 84, 188, 114, 92, 188, 114, 92, 180, 114, 92, + 188, 118, 92, 196, 122, 100, 188, 122, 92, 180, 114, 92, 188, 114, 92, + 180, 110, 84, 180, 114, 84, 188, 118, 92, 188, 122, 92, 188, 118, 92, + 188, 118, 92, 188, 122, 92, 188, 118, 92, 196, 122, 100, 188, 118, 92, + 188, 114, 92, 188, 122, 100, 196, 126, 100, 188, 118, 92, 188, 114, 92, + 188, 114, 92, 180, 114, 84, 180, 110, 84, 180, 110, 84, 188, 118, 92, + 188, 118, 92, 188, 118, 92, 180, 114, 84, 196, 126, 100, 188, 114, 92, + 180, 106, 84, 172, 106, 76, 172, 102, 76, 172, 102, 76, 172, 106, 76, + 180, 110, 84, 188, 118, 92, 180, 110, 92, 180, 114, 92, 180, 106, 92, + 164, 98, 76, 180, 106, 84, 188, 114, 100, 180, 106, 84, 180, 110, 92, + 180, 110, 92, 188, 114, 92, 180, 110, 92, 172, 106, 84, 172, 98, 76, + 172, 98, 76, 164, 98, 76, 164, 102, 76, 164, 102, 84, 172, 102, 84, + 172, 106, 84, 172, 110, 92, 180, 118, 92, 180, 114, 100, 180, 118, 100, + 188, 122, 108, 188, 126, 100, 188, 118, 100, 180, 114, 92, 172, 106, 84, + 164, 102, 84, 172, 102, 84, 172, 110, 92, 172, 110, 92, 172, 110, 84, + 172, 106, 92, 172, 106, 84, 172, 110, 84, 172, 110, 92, 180, 110, 92, + 180, 114, 92, 180, 110, 92, 172, 110, 92, 172, 110, 92, 180, 110, 92, + 172, 110, 92, 180, 110, 84, 164, 102, 84, 164, 98, 76, 156, 94, 76, + 172, 106, 84, 180, 114, 92, 172, 106, 84, 164, 102, 84, 172, 110, 84, + 172, 106, 84, 164, 98, 76, 172, 102, 84, 164, 106, 84, 172, 106, 84, + 172, 106, 92, 172, 110, 92, 180, 110, 92, 180, 110, 92, 172, 110, 92, + 180, 106, 84, 172, 110, 84, 172, 110, 84, 180, 110, 84, 172, 110, 84, + 172, 110, 84, 172, 106, 84, 172, 106, 84, 180, 106, 92, 180, 106, 84, + 188, 114, 100, 188, 118, 100, 180, 114, 100, 180, 126, 108, 148, 90, 68, + 84, 30, 12, 92, 34, 12, 124, 66, 44, 156, 98, 84, 164, 102, 84, + 164, 98, 84, 164, 98, 84, 156, 94, 76, 164, 98, 84, 164, 98, 76, + 156, 90, 76, 156, 94, 76, 164, 94, 76, 156, 90, 76, 156, 90, 68, + 156, 86, 68, 156, 86, 68, 164, 94, 68, 156, 90, 76, 156, 94, 68, + 156, 90, 76, 164, 98, 76, 164, 102, 84, 172, 106, 84, 172, 106, 84, + 172, 102, 84, 148, 82, 60, 148, 86, 68, 156, 90, 68, 156, 90, 68, + 148, 86, 68, 148, 82, 60, 156, 86, 68, 156, 94, 68, 156, 86, 68, + 164, 98, 68, 180, 110, 84, 188, 118, 92, 196, 122, 92, 196, 122, 100, + 188, 118, 92, 188, 118, 92, 180, 110, 92, 172, 106, 76, 172, 106, 76, + 180, 106, 84, 180, 106, 84, 172, 102, 76, 180, 110, 84, 188, 118, 92, + 196, 126, 100, 188, 118, 100, 180, 110, 84, 172, 106, 84, 188, 114, 84, + 188, 122, 100, 196, 122, 100, 188, 118, 92, 180, 114, 84, 180, 114, 92, + 188, 118, 92, 188, 118, 92, 180, 110, 84, 180, 106, 84, 172, 102, 76, + 180, 110, 84, 196, 122, 100, 188, 122, 92, 188, 118, 92, 188, 118, 92, + 188, 122, 92, 188, 114, 92, 188, 114, 84, 180, 114, 92, 188, 114, 84, + 180, 110, 92, 180, 114, 84, 188, 114, 92, 180, 114, 84, 188, 114, 92, + 180, 114, 92, 188, 114, 92, 180, 114, 84, 180, 110, 84, 180, 110, 84, + 188, 118, 92, 188, 114, 92, 180, 114, 84, 188, 118, 92, 180, 114, 92, + 188, 114, 92, 188, 122, 92, 188, 118, 100, 188, 118, 92, 188, 118, 92, + 196, 122, 100, 180, 114, 92, 188, 118, 92, 180, 110, 84, 180, 110, 84, + 196, 130, 100, 204, 134, 108, 196, 126, 100, 188, 118, 100, 188, 122, 92, + 188, 114, 92, 188, 114, 92, 188, 114, 92, 188, 122, 100, 196, 122, 100, + 196, 122, 100, 188, 118, 92, 188, 118, 100, 188, 118, 92, 180, 110, 84, + 180, 110, 84, 180, 110, 84, 172, 102, 76, 172, 102, 76, 180, 110, 84, + 180, 110, 92, 172, 106, 84, 180, 106, 84, 172, 98, 76, 164, 94, 68, + 172, 106, 84, 180, 110, 92, 172, 106, 84, 180, 110, 84, 180, 110, 84, + 180, 114, 92, 180, 110, 92, 180, 110, 92, 172, 106, 84, 180, 106, 84, + 172, 106, 84, 172, 102, 84, 172, 102, 76, 164, 102, 84, 172, 110, 92, + 180, 114, 92, 188, 118, 100, 188, 122, 100, 188, 118, 92, 188, 126, 108, + 188, 122, 100, 180, 118, 100, 172, 110, 92, 164, 106, 84, 172, 102, 84, + 172, 106, 84, 180, 114, 92, 180, 110, 92, 172, 110, 92, 172, 106, 84, + 172, 106, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 110, 92, + 172, 110, 92, 172, 110, 92, 172, 110, 84, 180, 110, 92, 172, 114, 92, + 180, 110, 92, 172, 106, 92, 172, 106, 84, 156, 94, 68, 172, 106, 92, + 180, 114, 92, 172, 102, 84, 164, 102, 84, 180, 110, 92, 172, 106, 92, + 164, 98, 76, 164, 102, 84, 172, 102, 84, 164, 102, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 110, 84, 172, 102, 84, + 172, 106, 84, 172, 106, 84, 172, 110, 84, 172, 106, 84, 164, 106, 84, + 172, 106, 84, 172, 102, 84, 172, 102, 84, 172, 102, 84, 180, 114, 100, + 188, 118, 100, 180, 118, 100, 188, 126, 100, 148, 94, 76, 92, 34, 12, + 92, 34, 12, 116, 62, 44, 156, 94, 76, 164, 94, 84, 156, 94, 76, + 156, 94, 76, 148, 86, 68, 148, 86, 76, 148, 82, 68, 148, 78, 60, + 148, 82, 68, 156, 90, 68, 156, 94, 76, 164, 90, 76, 156, 90, 68, + 148, 82, 68, 148, 82, 60, 164, 94, 76, 156, 94, 76, 156, 94, 68, + 164, 94, 76, 164, 102, 84, 164, 102, 84, 172, 102, 84, 164, 102, 84, + 156, 90, 68, 156, 90, 68, 156, 94, 76, 156, 90, 68, 148, 86, 68, + 148, 86, 68, 156, 90, 68, 156, 90, 68, 164, 98, 76, 172, 106, 84, + 180, 110, 84, 180, 110, 84, 180, 114, 92, 188, 118, 92, 180, 110, 84, + 188, 118, 92, 188, 118, 92, 180, 110, 84, 180, 106, 84, 180, 114, 84, + 180, 114, 84, 180, 114, 92, 188, 114, 84, 180, 114, 92, 188, 114, 84, + 188, 118, 92, 188, 114, 92, 180, 114, 92, 188, 114, 84, 180, 110, 84, + 196, 122, 100, 188, 118, 92, 188, 114, 92, 188, 114, 92, 188, 118, 92, + 188, 118, 92, 188, 118, 92, 180, 110, 84, 172, 106, 84, 188, 114, 92, + 196, 122, 100, 188, 122, 100, 196, 122, 92, 196, 122, 100, 188, 122, 100, + 188, 118, 92, 188, 122, 100, 188, 118, 92, 188, 118, 92, 188, 114, 92, + 188, 118, 92, 188, 114, 92, 188, 118, 92, 188, 122, 92, 196, 122, 100, + 188, 126, 100, 188, 118, 92, 180, 110, 84, 188, 114, 92, 188, 122, 100, + 196, 126, 100, 188, 118, 100, 196, 122, 92, 188, 114, 92, 180, 114, 92, + 196, 122, 92, 188, 122, 100, 188, 118, 92, 196, 122, 100, 196, 126, 100, + 188, 118, 92, 188, 118, 92, 172, 98, 76, 164, 94, 68, 180, 110, 92, + 188, 122, 92, 188, 114, 92, 180, 114, 84, 204, 130, 108, 196, 126, 100, + 188, 118, 92, 188, 122, 92, 196, 122, 100, 188, 122, 92, 188, 122, 92, + 188, 114, 92, 180, 114, 84, 180, 110, 84, 180, 110, 84, 180, 114, 92, + 180, 110, 84, 172, 102, 76, 172, 102, 76, 180, 106, 84, 180, 110, 92, + 180, 106, 84, 172, 102, 76, 172, 98, 76, 164, 94, 76, 180, 106, 84, + 180, 110, 92, 180, 106, 84, 172, 102, 76, 172, 98, 84, 172, 102, 76, + 180, 110, 84, 180, 110, 84, 180, 106, 84, 180, 110, 92, 180, 114, 92, + 172, 110, 92, 172, 106, 92, 172, 106, 84, 180, 110, 92, 180, 118, 100, + 188, 122, 100, 180, 122, 100, 188, 118, 100, 188, 126, 108, 188, 118, 100, + 180, 114, 92, 172, 106, 84, 172, 106, 84, 172, 110, 92, 180, 114, 92, + 180, 114, 92, 172, 114, 92, 180, 110, 92, 172, 106, 84, 164, 102, 84, + 164, 102, 84, 172, 106, 84, 172, 106, 84, 172, 106, 92, 180, 110, 84, + 172, 110, 92, 180, 110, 92, 172, 110, 92, 180, 110, 92, 180, 114, 92, + 172, 114, 92, 180, 110, 92, 164, 98, 76, 172, 110, 92, 180, 114, 92, + 172, 106, 84, 172, 106, 84, 172, 110, 92, 172, 106, 84, 164, 102, 84, + 172, 106, 84, 172, 110, 84, 172, 106, 92, 172, 106, 84, 172, 106, 84, + 172, 110, 92, 172, 110, 92, 180, 110, 84, 172, 106, 84, 172, 106, 84, + 180, 110, 84, 172, 110, 84, 172, 114, 92, 172, 110, 92, 172, 110, 84, + 172, 110, 84, 180, 106, 92, 172, 102, 84, 180, 106, 92, 172, 106, 92, + 172, 106, 92, 180, 122, 100, 148, 98, 76, 92, 34, 12, 100, 42, 28, + 116, 54, 36, 148, 86, 68, 148, 90, 76, 148, 86, 76, 148, 86, 76, + 140, 78, 60, 148, 78, 60, 140, 78, 60, 148, 78, 60, 148, 78, 60, + 148, 82, 60, 156, 86, 68, 156, 90, 68, 156, 90, 68, 156, 90, 68, + 148, 86, 68, 172, 102, 84, 164, 102, 84, 172, 102, 84, 164, 102, 84, + 172, 106, 84, 172, 106, 84, 164, 102, 84, 164, 98, 76, 156, 94, 76, + 164, 98, 76, 156, 94, 76, 164, 98, 76, 164, 94, 76, 164, 94, 76, + 156, 94, 76, 164, 98, 76, 180, 110, 84, 188, 114, 84, 188, 114, 92, + 180, 106, 84, 188, 114, 84, 188, 118, 92, 188, 114, 92, 188, 118, 92, + 188, 118, 92, 188, 114, 92, 180, 110, 84, 188, 114, 92, 188, 118, 92, + 188, 114, 92, 188, 118, 92, 188, 118, 92, 188, 114, 92, 188, 118, 92, + 188, 118, 92, 188, 118, 92, 188, 114, 92, 180, 110, 84, 196, 122, 100, + 188, 118, 92, 180, 114, 84, 188, 114, 92, 188, 122, 92, 196, 122, 100, + 188, 118, 92, 188, 114, 92, 180, 110, 84, 188, 118, 92, 196, 122, 100, + 196, 122, 92, 188, 118, 92, 188, 118, 100, 196, 122, 92, 188, 118, 92, + 196, 122, 100, 196, 122, 92, 196, 122, 100, 188, 122, 92, 196, 122, 100, + 188, 122, 92, 196, 122, 100, 196, 122, 100, 196, 122, 100, 196, 122, 92, + 188, 114, 92, 180, 110, 84, 188, 114, 84, 188, 118, 92, 196, 122, 92, + 188, 118, 92, 188, 122, 92, 188, 118, 92, 188, 114, 92, 188, 118, 92, + 196, 122, 92, 188, 118, 92, 188, 118, 92, 196, 126, 100, 204, 130, 108, + 204, 134, 108, 188, 122, 92, 180, 106, 84, 188, 114, 92, 188, 118, 92, + 188, 118, 92, 196, 122, 100, 204, 134, 108, 196, 130, 100, 196, 122, 100, + 188, 122, 92, 196, 122, 100, 196, 122, 100, 188, 118, 92, 188, 114, 92, + 188, 114, 84, 180, 110, 84, 180, 110, 84, 188, 114, 92, 180, 110, 84, + 180, 106, 84, 180, 106, 84, 188, 114, 92, 188, 118, 92, 188, 114, 92, + 180, 110, 92, 180, 106, 84, 172, 102, 84, 180, 110, 84, 188, 118, 92, + 180, 106, 84, 180, 106, 84, 172, 106, 84, 180, 106, 84, 180, 106, 92, + 188, 114, 92, 180, 110, 92, 180, 110, 84, 188, 114, 92, 188, 114, 100, + 180, 114, 92, 172, 110, 92, 180, 114, 92, 188, 122, 100, 188, 122, 108, + 188, 122, 100, 180, 118, 100, 188, 122, 100, 180, 118, 100, 180, 114, 92, + 180, 110, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 172, 110, 92, + 180, 110, 92, 172, 110, 84, 172, 106, 84, 164, 102, 84, 172, 102, 84, + 164, 106, 84, 172, 106, 84, 180, 110, 92, 172, 114, 92, 180, 110, 92, + 172, 110, 92, 180, 110, 92, 172, 110, 84, 172, 110, 92, 172, 110, 84, + 180, 110, 92, 164, 102, 84, 172, 110, 92, 180, 114, 92, 180, 114, 92, + 180, 110, 92, 172, 110, 84, 172, 110, 92, 172, 106, 84, 180, 114, 92, + 180, 110, 92, 180, 110, 92, 172, 110, 92, 172, 110, 92, 172, 110, 84, + 172, 110, 92, 180, 110, 92, 172, 110, 92, 180, 110, 84, 180, 114, 92, + 180, 114, 92, 180, 114, 92, 180, 118, 92, 180, 114, 92, 180, 114, 92, + 188, 118, 100, 188, 114, 92, 196, 122, 108, 188, 118, 100, 180, 118, 100, + 188, 130, 108, 156, 106, 84, 100, 42, 28, 84, 30, 12, 116, 54, 36, + 156, 90, 76, 156, 90, 76, 156, 90, 68, 156, 94, 76, 148, 86, 68, + 164, 94, 84, 156, 94, 76, 156, 90, 76, 148, 86, 68, 148, 78, 60, + 148, 78, 60, 148, 86, 68, 164, 94, 76, 164, 94, 76, 172, 98, 84, + 164, 98, 76, 164, 102, 76, 172, 106, 84, 180, 110, 92, 180, 118, 100, + 180, 118, 100, 180, 110, 92, 172, 110, 92, 164, 98, 76, 164, 94, 76, + 164, 98, 76, 164, 98, 84, 164, 102, 76, 164, 102, 84, 172, 102, 84, + 164, 102, 76, 188, 118, 92, 188, 122, 100, 196, 122, 100, 188, 114, 92, + 180, 114, 92, 188, 114, 92, 196, 122, 100, 196, 122, 100, 188, 118, 92, + 188, 114, 92, 188, 118, 92, 188, 118, 92, 188, 118, 92, 180, 110, 84, + 196, 122, 100, 196, 122, 100, 188, 122, 92, 196, 122, 100, 196, 126, 100, + 196, 122, 100, 188, 118, 92, 188, 118, 92, 196, 122, 100, 188, 118, 92, + 188, 114, 92, 188, 118, 92, 196, 122, 100, 196, 126, 100, 196, 122, 100, + 188, 118, 92, 188, 114, 84, 188, 122, 92, 196, 122, 100, 188, 122, 92, + 188, 118, 92, 196, 122, 100, 196, 122, 92, 188, 118, 92, 196, 122, 100, + 196, 126, 100, 196, 122, 100, 196, 126, 100, 196, 126, 100, 196, 126, 100, + 196, 122, 100, 196, 126, 100, 196, 122, 100, 196, 126, 100, 196, 122, 100, + 188, 118, 92, 188, 118, 100, 196, 126, 100, 196, 126, 100, 196, 122, 100, + 196, 126, 100, 196, 122, 100, 188, 118, 92, 188, 122, 100, 196, 122, 92, + 188, 114, 92, 188, 114, 92, 188, 122, 92, 188, 114, 92, 204, 130, 108, + 196, 126, 100, 188, 118, 92, 188, 118, 92, 188, 118, 92, 196, 122, 100, + 196, 126, 100, 204, 130, 108, 196, 126, 100, 196, 122, 100, 188, 118, 92, + 196, 122, 100, 196, 126, 100, 196, 122, 100, 188, 118, 92, 188, 114, 92, + 188, 114, 92, 188, 118, 92, 188, 118, 92, 188, 118, 92, 180, 114, 84, + 188, 114, 92, 196, 126, 100, 196, 122, 100, 188, 114, 92, 180, 110, 84, + 180, 106, 84, 172, 98, 76, 180, 110, 92, 188, 114, 92, 172, 102, 84, + 196, 126, 100, 188, 114, 92, 188, 114, 92, 188, 114, 92, 188, 114, 92, + 180, 110, 84, 188, 114, 92, 188, 114, 92, 188, 122, 100, 180, 118, 100, + 180, 114, 92, 180, 118, 100, 188, 122, 100, 188, 126, 108, 188, 122, 100, + 180, 118, 100, 188, 122, 100, 180, 118, 100, 180, 110, 92, 180, 114, 100, + 180, 118, 100, 188, 118, 100, 172, 114, 92, 172, 106, 84, 172, 110, 92, + 172, 106, 92, 172, 102, 84, 164, 102, 84, 172, 102, 76, 172, 106, 84, + 172, 106, 92, 180, 114, 92, 180, 110, 92, 180, 114, 92, 172, 110, 92, + 172, 110, 84, 172, 106, 84, 172, 106, 84, 172, 106, 92, 172, 110, 84, + 172, 106, 84, 180, 110, 92, 180, 114, 92, 180, 118, 100, 180, 118, 100, + 180, 110, 92, 172, 110, 92, 180, 110, 92, 180, 114, 92, 172, 114, 92, + 172, 110, 92, 172, 106, 84, 172, 106, 84, 172, 106, 92, 172, 110, 84, + 172, 106, 84, 180, 110, 84, 172, 110, 92, 180, 114, 92, 180, 114, 92, + 180, 118, 92, 180, 118, 92, 180, 114, 92, 180, 118, 92, 188, 114, 100, + 180, 110, 92, 188, 122, 108, 188, 122, 100, 180, 118, 108, 188, 126, 108, + 148, 90, 76, 84, 30, 12, 92, 38, 28, 140, 78, 60, 156, 90, 68, + 156, 90, 76, 156, 90, 68, 156, 94, 76, 164, 98, 76, 156, 94, 76, + 164, 94, 76, 156, 94, 68, 156, 94, 76, 156, 90, 68, 156, 86, 68, + 148, 86, 68, 156, 86, 68, 156, 94, 76, 164, 102, 76, 180, 110, 92, + 172, 102, 84, 172, 98, 84, 172, 106, 84, 180, 114, 92, 188, 122, 100, + 188, 114, 92, 172, 110, 92, 172, 102, 84, 164, 98, 76, 156, 90, 68, + 156, 86, 68, 164, 94, 76, 172, 102, 84, 172, 106, 84, 180, 110, 92, + 188, 114, 92, 196, 126, 100, 196, 126, 100, 188, 118, 92, 180, 110, 92, + 188, 118, 92, 196, 130, 108, 196, 126, 100, 196, 122, 100, 188, 126, 100, + 196, 126, 108, 196, 126, 100, 196, 122, 100, 180, 118, 92, 188, 114, 92, + 188, 118, 92, 196, 122, 100, 188, 122, 100, 188, 122, 100, 188, 118, 92, + 188, 118, 92, 188, 118, 92, 196, 126, 100, 188, 122, 100, 196, 122, 100, + 188, 122, 100, 196, 126, 100, 196, 130, 100, 196, 126, 108, 196, 130, 100, + 196, 122, 100, 188, 122, 100, 196, 126, 108, 196, 126, 100, 204, 130, 108, + 196, 130, 100, 196, 130, 108, 196, 130, 108, 188, 122, 100, 196, 126, 100, + 188, 122, 100, 196, 122, 100, 188, 122, 100, 196, 126, 100, 196, 126, 100, + 196, 130, 100, 196, 130, 108, 196, 130, 100, 196, 126, 100, 196, 126, 100, + 204, 130, 108, 196, 130, 100, 196, 126, 108, 188, 126, 100, 196, 122, 100, + 196, 126, 100, 196, 130, 108, 204, 130, 108, 196, 126, 108, 196, 130, 100, + 196, 122, 100, 188, 122, 100, 196, 126, 100, 204, 134, 108, 204, 134, 108, + 196, 126, 100, 188, 114, 92, 188, 118, 92, 188, 122, 100, 196, 126, 100, + 196, 130, 108, 196, 126, 108, 196, 126, 100, 196, 126, 100, 196, 126, 100, + 188, 122, 92, 188, 122, 100, 188, 122, 100, 196, 122, 100, 188, 122, 100, + 196, 122, 100, 188, 122, 100, 196, 122, 100, 188, 122, 100, 188, 118, 92, + 188, 118, 100, 196, 126, 100, 188, 122, 100, 188, 122, 100, 188, 118, 100, + 188, 118, 92, 188, 118, 92, 188, 114, 92, 188, 118, 92, 188, 122, 100, + 188, 114, 92, 180, 114, 92, 180, 114, 84, 172, 102, 84, 172, 106, 84, + 188, 118, 92, 188, 118, 100, 188, 122, 100, 188, 122, 100, 180, 118, 100, + 188, 118, 100, 188, 122, 100, 188, 122, 100, 188, 118, 100, 180, 118, 100, + 196, 130, 108, 180, 114, 92, 172, 106, 84, 172, 110, 92, 180, 114, 92, + 172, 110, 92, 172, 106, 84, 172, 106, 84, 180, 110, 92, 180, 114, 92, + 180, 114, 92, 180, 110, 92, 164, 102, 84, 164, 98, 84, 172, 102, 84, + 172, 106, 84, 172, 106, 92, 172, 106, 84, 172, 106, 84, 180, 106, 92, + 172, 106, 92, 180, 110, 92, 180, 110, 92, 172, 110, 92, 172, 102, 84, + 172, 110, 92, 180, 114, 92, 180, 114, 100, 180, 114, 92, 172, 110, 92, + 180, 114, 92, 172, 110, 92, 180, 114, 92, 180, 114, 92, 180, 110, 92, + 180, 110, 92, 172, 110, 92, 180, 110, 84, 172, 110, 92, 172, 110, 92, + 180, 110, 92, 180, 110, 92, 180, 114, 92, 180, 114, 92, 180, 118, 100, + 180, 118, 100, 180, 114, 92, 180, 114, 92, 172, 102, 84, 172, 102, 84, + 180, 106, 92, 164, 94, 84, 156, 94, 76, 172, 110, 100, 140, 82, 68, + 92, 38, 28, 92, 34, 20, 124, 58, 44, 140, 78, 60, 148, 86, 68, + 156, 90, 68, 156, 94, 76, 164, 94, 76, 148, 90, 68, 156, 90, 68, + 164, 94, 76, 156, 94, 76, 156, 94, 76, 156, 90, 68, 148, 86, 60, + 148, 86, 68, 156, 90, 68, 164, 94, 76, 164, 98, 76, 156, 94, 76, + 156, 94, 76, 172, 98, 84, 180, 110, 92, 180, 118, 100, 188, 114, 100, + 180, 114, 92, 172, 102, 84, 164, 98, 84, 164, 94, 76, 156, 94, 76, + 156, 90, 68, 164, 94, 76, 164, 94, 76, 164, 94, 76, 164, 98, 76, + 180, 110, 92, 196, 126, 100, 196, 126, 108, 204, 130, 100, 196, 126, 108, + 196, 130, 108, 196, 126, 100, 188, 122, 100, 196, 122, 100, 196, 126, 100, + 196, 126, 100, 188, 122, 100, 188, 118, 92, 196, 130, 108, 196, 134, 108, + 204, 134, 108, 204, 134, 108, 196, 130, 108, 196, 130, 108, 196, 126, 108, + 196, 130, 108, 196, 126, 100, 188, 126, 100, 188, 122, 100, 196, 126, 100, + 196, 126, 100, 196, 126, 108, 196, 126, 100, 188, 126, 100, 188, 122, 100, + 196, 126, 100, 188, 122, 100, 188, 122, 100, 188, 122, 100, 196, 122, 100, + 196, 126, 100, 196, 126, 108, 204, 130, 108, 196, 130, 108, 196, 130, 108, + 196, 130, 108, 196, 130, 108, 204, 130, 108, 196, 130, 108, 204, 130, 108, + 196, 130, 108, 196, 126, 100, 188, 126, 108, 196, 126, 100, 196, 126, 108, + 196, 130, 108, 196, 126, 100, 196, 126, 100, 196, 126, 100, 188, 126, 100, + 196, 126, 100, 196, 126, 108, 196, 130, 100, 196, 126, 108, 188, 126, 100, + 196, 122, 100, 188, 126, 100, 196, 130, 108, 196, 130, 108, 188, 122, 100, + 180, 114, 92, 188, 118, 92, 188, 122, 100, 188, 122, 100, 188, 118, 92, + 188, 122, 100, 188, 118, 100, 188, 122, 100, 188, 118, 92, 188, 118, 100, + 188, 118, 92, 188, 122, 100, 188, 118, 92, 188, 122, 92, 188, 118, 100, + 188, 118, 92, 188, 118, 92, 188, 118, 92, 188, 118, 100, 180, 118, 92, + 188, 122, 100, 188, 122, 100, 188, 118, 92, 188, 118, 92, 180, 114, 92, + 180, 114, 92, 180, 114, 92, 188, 118, 92, 196, 126, 100, 188, 118, 100, + 188, 122, 100, 188, 118, 92, 180, 110, 84, 180, 114, 92, 188, 122, 100, + 188, 122, 100, 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, + 180, 118, 100, 180, 118, 100, 180, 114, 92, 172, 110, 92, 172, 106, 84, + 164, 94, 76, 164, 102, 84, 180, 114, 92, 180, 118, 100, 172, 106, 84, + 164, 98, 76, 164, 98, 84, 164, 98, 76, 164, 98, 84, 172, 102, 84, + 172, 102, 84, 164, 98, 76, 172, 102, 84, 172, 106, 84, 180, 110, 92, + 180, 110, 92, 180, 110, 92, 180, 110, 92, 180, 110, 92, 180, 110, 92, + 180, 110, 92, 172, 110, 92, 180, 110, 92, 172, 106, 84, 172, 110, 92, + 180, 118, 92, 188, 118, 100, 180, 114, 92, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 118, 100, 180, 118, 100, 180, 118, 100, 180, 118, 100, + 188, 118, 92, 180, 118, 100, 180, 118, 100, 188, 118, 100, 180, 110, 92, + 172, 110, 100, 180, 114, 100, 180, 118, 100, 180, 118, 100, 180, 118, 100, + 188, 122, 100, 188, 118, 100, 180, 106, 84, 172, 102, 84, 188, 114, 100, + 164, 98, 76, 164, 98, 84, 172, 110, 100, 132, 78, 68, 92, 34, 20, + 92, 34, 20, 132, 70, 52, 156, 90, 68, 164, 102, 76, 164, 98, 76, + 164, 98, 84, 164, 98, 76, 156, 90, 68, 156, 94, 76, 148, 82, 60, + 148, 86, 68, 148, 82, 60, 148, 82, 60, 148, 82, 60, 148, 78, 60, + 148, 82, 60, 148, 86, 68, 148, 82, 68, 148, 82, 60, 156, 82, 68, + 156, 90, 68, 164, 98, 76, 172, 102, 84, 172, 106, 84, 172, 106, 84, + 164, 102, 76, 172, 98, 84, 164, 98, 76, 156, 90, 76, 156, 82, 60, + 140, 78, 60, 140, 70, 52, 132, 70, 52, 156, 82, 60, 172, 98, 76, + 188, 114, 92, 196, 122, 100, 196, 126, 100, 196, 126, 108, 196, 130, 108, + 196, 130, 108, 196, 126, 100, 188, 126, 100, 196, 126, 100, 188, 126, 100, + 196, 126, 100, 188, 122, 100, 196, 130, 108, 204, 130, 108, 196, 130, 108, + 196, 130, 108, 196, 122, 100, 188, 122, 100, 196, 122, 100, 188, 126, 100, + 196, 126, 100, 196, 122, 100, 188, 122, 100, 188, 122, 100, 196, 122, 100, + 188, 126, 100, 188, 122, 100, 188, 122, 100, 196, 122, 100, 188, 122, 100, + 196, 126, 100, 188, 122, 100, 188, 118, 100, 188, 118, 92, 188, 122, 100, + 188, 126, 100, 196, 126, 100, 196, 126, 100, 196, 130, 108, 196, 126, 100, + 196, 126, 100, 196, 126, 108, 196, 126, 100, 188, 122, 100, 196, 130, 108, + 196, 130, 100, 196, 126, 108, 196, 126, 100, 196, 130, 108, 204, 130, 108, + 196, 130, 108, 196, 126, 108, 196, 130, 108, 204, 134, 108, 196, 130, 108, + 196, 130, 108, 196, 130, 108, 196, 130, 108, 204, 130, 108, 196, 134, 108, + 204, 130, 108, 204, 134, 116, 196, 130, 108, 196, 122, 100, 188, 122, 100, + 196, 126, 108, 196, 126, 100, 196, 126, 100, 188, 118, 100, 188, 118, 92, + 188, 118, 92, 188, 122, 92, 188, 118, 100, 188, 122, 100, 188, 122, 100, + 188, 122, 100, 188, 122, 100, 188, 118, 100, 188, 122, 92, 188, 118, 100, + 188, 122, 100, 188, 122, 100, 188, 122, 100, 188, 122, 100, 188, 118, 92, + 188, 122, 100, 188, 122, 100, 188, 118, 100, 188, 118, 92, 188, 114, 92, + 188, 122, 100, 188, 122, 100, 188, 122, 100, 188, 118, 92, 188, 122, 100, + 188, 122, 100, 180, 110, 92, 180, 114, 92, 188, 122, 100, 188, 122, 100, + 188, 118, 100, 180, 118, 100, 180, 118, 100, 188, 122, 100, 188, 122, 100, + 188, 122, 100, 180, 114, 92, 180, 110, 92, 172, 110, 92, 164, 102, 76, + 164, 102, 84, 188, 118, 100, 180, 118, 100, 172, 106, 84, 164, 102, 84, + 172, 110, 92, 180, 110, 92, 180, 110, 92, 180, 110, 92, 180, 110, 92, + 172, 106, 84, 180, 110, 92, 172, 110, 92, 180, 110, 92, 180, 110, 92, + 180, 114, 92, 180, 110, 92, 180, 114, 92, 172, 110, 92, 180, 110, 84, + 180, 110, 92, 180, 110, 92, 172, 102, 84, 172, 106, 84, 172, 110, 92, + 180, 110, 92, 172, 110, 92, 172, 110, 92, 172, 106, 92, 172, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 100, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 110, 100, 180, 114, 92, + 180, 114, 92, 180, 114, 100, 180, 118, 92, 180, 122, 100, 188, 122, 100, + 188, 122, 100, 188, 118, 100, 180, 110, 92, 188, 114, 100, 172, 102, 92, + 172, 106, 92, 180, 118, 100, 132, 78, 68, 92, 34, 20, 92, 34, 20, + 132, 74, 60, 156, 90, 68, 164, 94, 76, 148, 90, 68, 156, 86, 68, + 156, 90, 68, 156, 90, 68, 164, 98, 84, 156, 90, 68, 156, 90, 68, + 156, 90, 76, 156, 94, 76, 164, 98, 76, 164, 98, 84, 164, 102, 76, + 172, 102, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, 180, 110, 92, + 180, 110, 92, 180, 110, 92, 180, 114, 100, 180, 114, 92, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 110, 92, 164, 98, 84, 164, 94, 76, + 156, 90, 68, 156, 90, 68, 172, 102, 84, 180, 110, 92, 188, 118, 92, + 196, 122, 100, 196, 122, 100, 188, 122, 100, 188, 122, 100, 188, 118, 92, + 188, 118, 100, 188, 118, 100, 180, 114, 92, 188, 114, 92, 188, 118, 100, + 188, 118, 92, 196, 126, 100, 188, 126, 100, 196, 122, 100, 188, 122, 100, + 180, 118, 92, 188, 118, 92, 188, 122, 100, 196, 122, 100, 196, 126, 108, + 188, 126, 100, 188, 122, 100, 196, 122, 100, 188, 126, 100, 196, 122, 100, + 188, 122, 100, 188, 118, 92, 180, 110, 92, 180, 114, 92, 188, 118, 92, + 180, 114, 92, 180, 110, 84, 172, 110, 84, 180, 114, 92, 188, 114, 92, + 188, 126, 100, 196, 126, 108, 196, 126, 100, 196, 130, 108, 196, 126, 108, + 188, 126, 100, 188, 126, 100, 196, 122, 100, 188, 122, 100, 188, 122, 100, + 188, 118, 92, 188, 122, 100, 188, 122, 100, 188, 126, 100, 188, 122, 100, + 188, 118, 92, 196, 130, 108, 196, 130, 108, 196, 126, 108, 196, 126, 100, + 196, 130, 108, 196, 130, 108, 196, 130, 108, 204, 130, 108, 196, 130, 108, + 196, 130, 100, 196, 122, 100, 180, 118, 92, 188, 118, 92, 188, 122, 100, + 196, 126, 100, 180, 118, 100, 188, 118, 92, 180, 118, 92, 180, 114, 92, + 188, 118, 92, 180, 114, 92, 188, 118, 92, 180, 114, 92, 188, 114, 92, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 188, 118, 92, + 180, 114, 92, 188, 118, 92, 188, 118, 92, 180, 110, 92, 188, 114, 92, + 188, 122, 92, 180, 118, 92, 180, 110, 92, 180, 110, 92, 180, 118, 92, + 196, 122, 100, 188, 118, 100, 180, 114, 92, 188, 122, 100, 188, 118, 92, + 180, 110, 92, 180, 114, 84, 188, 118, 100, 180, 118, 92, 188, 118, 100, + 188, 122, 100, 188, 122, 100, 188, 122, 108, 188, 122, 100, 188, 122, 100, + 180, 114, 92, 172, 106, 84, 164, 98, 84, 156, 94, 76, 164, 94, 76, + 164, 102, 76, 172, 102, 84, 164, 98, 76, 172, 106, 84, 188, 122, 100, + 188, 118, 100, 188, 118, 100, 180, 114, 92, 180, 114, 92, 180, 110, 92, + 180, 110, 92, 180, 110, 92, 172, 110, 92, 180, 110, 92, 172, 110, 92, + 180, 110, 84, 172, 110, 92, 180, 110, 92, 172, 106, 92, 172, 110, 84, + 172, 106, 92, 172, 102, 84, 172, 106, 84, 172, 110, 92, 172, 110, 84, + 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 102, 84, + 164, 102, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 92, + 172, 106, 84, 172, 106, 92, 180, 110, 92, 172, 110, 92, 180, 106, 92, + 172, 110, 92, 172, 110, 92, 180, 114, 92, 180, 118, 92, 180, 118, 92, + 188, 118, 100, 188, 114, 100, 188, 118, 100, 180, 110, 92, 180, 118, 108, + 180, 122, 108, 132, 78, 68, 92, 34, 20, 92, 34, 20, 108, 50, 28, + 132, 66, 52, 140, 74, 52, 132, 70, 52, 140, 74, 52, 140, 78, 60, + 148, 86, 60, 164, 94, 76, 156, 94, 68, 156, 94, 76, 164, 98, 76, + 164, 102, 84, 172, 106, 84, 172, 106, 84, 172, 110, 92, 172, 106, 84, + 180, 110, 92, 180, 110, 92, 180, 114, 92, 180, 110, 92, 180, 110, 92, + 180, 114, 92, 180, 110, 92, 180, 114, 92, 172, 106, 92, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 110, 92, 180, 114, 92, 188, 114, 100, + 188, 122, 100, 180, 110, 84, 188, 114, 92, 180, 114, 92, 188, 114, 92, + 180, 110, 92, 180, 110, 92, 180, 110, 92, 180, 114, 92, 180, 114, 84, + 180, 114, 92, 180, 110, 84, 180, 110, 92, 172, 110, 84, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 110, 92, 180, 110, 84, + 180, 110, 92, 188, 118, 92, 188, 122, 100, 180, 114, 84, 180, 110, 92, + 180, 110, 84, 180, 110, 84, 180, 110, 92, 180, 114, 92, 180, 106, 84, + 172, 106, 84, 164, 102, 76, 172, 102, 84, 180, 110, 84, 180, 110, 84, + 172, 110, 92, 180, 106, 84, 180, 110, 84, 180, 110, 92, 180, 118, 92, + 188, 118, 92, 188, 118, 100, 188, 122, 100, 188, 122, 92, 188, 118, 100, + 188, 118, 92, 180, 114, 92, 188, 118, 92, 180, 114, 92, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 188, 114, 92, 180, 114, 92, 180, 114, 92, + 188, 114, 92, 188, 118, 92, 188, 122, 92, 188, 118, 100, 196, 122, 92, + 188, 122, 100, 188, 118, 100, 188, 122, 92, 188, 118, 100, 188, 118, 92, + 180, 114, 92, 172, 106, 84, 180, 110, 92, 180, 118, 92, 188, 114, 92, + 172, 110, 84, 180, 110, 84, 180, 110, 92, 180, 110, 92, 180, 110, 84, + 172, 110, 84, 180, 106, 84, 172, 106, 84, 172, 106, 84, 172, 102, 84, + 172, 106, 76, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 180, 110, 84, 172, 106, 84, 172, 102, 76, 172, 106, 84, 180, 110, 84, + 172, 106, 84, 172, 102, 84, 172, 102, 76, 180, 106, 84, 180, 114, 92, + 188, 118, 92, 180, 114, 92, 188, 118, 92, 188, 122, 100, 180, 110, 84, + 180, 110, 92, 188, 118, 92, 180, 114, 92, 180, 114, 92, 172, 114, 92, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 172, 110, 84, 164, 98, 84, + 156, 94, 76, 140, 74, 52, 140, 78, 60, 148, 86, 68, 156, 90, 68, + 156, 94, 76, 156, 98, 76, 172, 102, 84, 172, 110, 92, 172, 106, 92, + 172, 106, 84, 172, 106, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 180, 106, 84, 172, 106, 84, 172, 102, 84, 172, 106, 84, + 172, 102, 84, 172, 106, 84, 180, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 110, 92, 180, 110, 92, 180, 110, 92, 172, 106, 92, + 172, 106, 84, 172, 106, 84, 172, 110, 92, 164, 102, 84, 172, 102, 84, + 164, 106, 84, 172, 106, 84, 172, 106, 92, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 92, 172, 106, 92, 164, 102, 84, 172, 102, 84, + 164, 106, 84, 164, 102, 84, 172, 106, 84, 172, 106, 84, 180, 110, 92, + 180, 106, 92, 180, 110, 92, 172, 102, 92, 172, 114, 100, 180, 118, 100, + 132, 74, 60, 92, 34, 20, 92, 34, 12, 124, 58, 44, 148, 78, 60, + 148, 90, 68, 156, 86, 68, 156, 94, 76, 156, 94, 76, 156, 90, 68, + 164, 98, 76, 156, 94, 76, 164, 94, 76, 156, 94, 68, 164, 94, 76, + 164, 98, 76, 164, 98, 84, 164, 98, 76, 156, 98, 76, 164, 94, 76, + 164, 98, 76, 164, 98, 84, 164, 98, 84, 172, 102, 76, 164, 102, 84, + 172, 102, 84, 172, 102, 84, 172, 106, 84, 172, 106, 92, 180, 106, 84, + 172, 106, 92, 172, 106, 84, 180, 110, 92, 180, 110, 92, 180, 114, 92, + 180, 110, 92, 180, 106, 84, 180, 114, 92, 188, 118, 92, 188, 118, 92, + 188, 114, 92, 188, 118, 92, 188, 118, 92, 188, 118, 100, 188, 118, 92, + 188, 122, 100, 188, 122, 100, 188, 118, 92, 180, 118, 92, 188, 118, 92, + 188, 118, 100, 188, 118, 92, 180, 118, 92, 188, 114, 92, 180, 118, 92, + 188, 122, 100, 196, 130, 108, 188, 114, 92, 180, 114, 92, 180, 118, 92, + 188, 118, 92, 188, 118, 100, 188, 118, 92, 180, 114, 92, 180, 110, 84, + 180, 110, 92, 180, 114, 84, 180, 114, 92, 180, 114, 92, 188, 118, 92, + 188, 118, 100, 188, 118, 92, 188, 118, 100, 188, 118, 92, 188, 118, 100, + 188, 122, 92, 188, 122, 100, 188, 122, 100, 188, 122, 100, 188, 122, 100, + 196, 122, 100, 188, 126, 100, 188, 122, 100, 188, 122, 92, 188, 122, 100, + 196, 122, 100, 188, 126, 100, 196, 122, 100, 188, 118, 92, 180, 118, 92, + 188, 118, 100, 188, 118, 92, 188, 122, 100, 188, 122, 100, 188, 122, 100, + 188, 122, 100, 188, 122, 100, 188, 118, 92, 188, 118, 100, 180, 114, 92, + 180, 110, 84, 180, 110, 92, 188, 118, 92, 180, 114, 92, 180, 110, 92, + 188, 118, 92, 180, 118, 92, 188, 114, 92, 180, 114, 92, 180, 110, 92, + 180, 110, 84, 180, 110, 84, 180, 110, 84, 180, 110, 84, 180, 110, 84, + 180, 106, 84, 180, 110, 84, 180, 110, 92, 180, 110, 84, 180, 110, 92, + 180, 110, 92, 172, 106, 84, 180, 110, 84, 180, 114, 92, 180, 110, 92, + 172, 110, 84, 172, 110, 84, 180, 110, 92, 188, 118, 92, 188, 118, 92, + 180, 114, 92, 188, 118, 100, 188, 118, 92, 180, 110, 92, 180, 114, 84, + 188, 118, 100, 180, 114, 92, 180, 110, 92, 172, 110, 92, 172, 110, 92, + 172, 110, 92, 172, 110, 92, 172, 102, 84, 164, 98, 76, 156, 94, 76, + 156, 94, 68, 172, 102, 76, 172, 110, 92, 172, 110, 84, 172, 106, 92, + 172, 110, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 180, 106, 92, + 172, 106, 84, 172, 106, 92, 172, 102, 84, 172, 102, 84, 172, 106, 92, + 172, 106, 84, 172, 102, 84, 172, 102, 84, 172, 102, 84, 172, 102, 84, + 172, 106, 84, 172, 102, 84, 172, 106, 92, 172, 102, 84, 164, 98, 76, + 164, 102, 84, 164, 102, 84, 164, 102, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 84, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 102, 84, + 172, 102, 84, 164, 102, 84, 164, 102, 84, 164, 102, 84, 164, 98, 76, + 172, 102, 84, 172, 102, 84, 172, 102, 84, 164, 98, 84, 164, 102, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 172, 98, 84, 172, 98, 76, + 172, 98, 84, 164, 94, 84, 172, 110, 92, 172, 110, 100, 116, 62, 52, + 92, 34, 12, 92, 34, 20, 148, 90, 68, 172, 106, 84, 172, 110, 92, + 172, 106, 84, 172, 110, 84, 180, 110, 92, 164, 102, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 164, 102, 84, 172, 106, 84, 172, 106, 84, + 172, 110, 92, 172, 106, 84, 172, 106, 92, 172, 106, 84, 172, 102, 84, + 172, 106, 84, 172, 106, 84, 180, 110, 92, 180, 110, 92, 180, 110, 92, + 180, 110, 92, 188, 118, 100, 188, 114, 100, 180, 114, 92, 180, 110, 92, + 180, 110, 92, 172, 110, 92, 180, 110, 92, 172, 106, 84, 188, 118, 100, + 188, 118, 92, 196, 122, 100, 196, 126, 108, 204, 130, 108, 188, 122, 100, + 188, 118, 100, 180, 118, 92, 180, 114, 92, 188, 122, 100, 196, 122, 100, + 188, 122, 100, 188, 118, 92, 180, 110, 92, 196, 122, 100, 188, 126, 100, + 196, 126, 100, 188, 122, 100, 188, 122, 100, 196, 126, 100, 196, 126, 108, + 196, 130, 108, 196, 130, 108, 196, 126, 100, 196, 126, 108, 196, 130, 108, + 196, 134, 108, 204, 134, 108, 196, 130, 108, 188, 126, 108, 188, 118, 92, + 180, 114, 92, 180, 106, 84, 180, 110, 84, 180, 114, 92, 180, 118, 92, + 188, 118, 92, 180, 118, 92, 188, 126, 100, 188, 122, 100, 196, 126, 100, + 196, 126, 100, 196, 126, 100, 196, 130, 108, 204, 130, 108, 196, 130, 108, + 196, 122, 100, 188, 122, 100, 188, 118, 100, 188, 118, 92, 188, 122, 100, + 188, 122, 100, 188, 122, 100, 188, 118, 100, 180, 118, 100, 188, 118, 92, + 180, 114, 92, 188, 118, 92, 188, 118, 100, 188, 122, 92, 188, 122, 100, + 196, 122, 100, 180, 118, 92, 188, 118, 92, 180, 114, 92, 172, 110, 84, + 180, 110, 84, 180, 114, 92, 188, 118, 92, 180, 114, 92, 180, 118, 92, + 188, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 110, 92, 180, 114, 92, 180, 110, 92, 180, 114, 92, + 180, 110, 92, 180, 114, 84, 180, 110, 92, 180, 110, 84, 180, 114, 84, + 180, 110, 92, 180, 114, 92, 180, 114, 92, 180, 110, 84, 180, 110, 92, + 180, 114, 84, 180, 114, 92, 180, 118, 92, 180, 110, 92, 172, 106, 84, + 180, 110, 84, 180, 110, 84, 164, 102, 76, 172, 102, 84, 180, 110, 84, + 172, 110, 84, 172, 106, 84, 172, 106, 84, 172, 102, 84, 172, 106, 84, + 172, 110, 84, 172, 106, 92, 172, 106, 84, 164, 98, 76, 180, 118, 100, + 188, 122, 100, 188, 118, 100, 188, 118, 100, 180, 114, 92, 172, 106, 92, + 172, 106, 84, 164, 102, 84, 180, 106, 84, 172, 106, 92, 180, 110, 92, + 172, 106, 84, 172, 102, 84, 172, 102, 84, 172, 102, 84, 172, 106, 92, + 172, 98, 84, 164, 102, 84, 172, 102, 84, 172, 102, 84, 172, 106, 92, + 180, 106, 84, 172, 110, 92, 180, 106, 92, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 156, 94, 76, 156, 94, 76, 156, 94, 76, + 164, 98, 76, 164, 98, 84, 164, 98, 76, 172, 102, 84, 164, 102, 84, + 172, 102, 84, 164, 102, 84, 164, 98, 76, 156, 94, 76, 172, 102, 84, + 172, 102, 92, 164, 102, 84, 172, 102, 84, 164, 106, 84, 164, 106, 84, + 164, 102, 76, 172, 102, 84, 164, 98, 76, 172, 102, 84, 172, 102, 84, + 164, 94, 84, 172, 106, 92, 164, 106, 92, 116, 62, 52, 92, 34, 20, + 100, 46, 28, 148, 86, 76, 164, 98, 76, 164, 98, 76, 156, 90, 76, + 164, 98, 76, 164, 102, 84, 172, 102, 84, 172, 106, 84, 164, 102, 84, + 164, 102, 84, 164, 98, 76, 164, 98, 84, 172, 106, 84, 172, 110, 92, + 180, 110, 92, 172, 110, 84, 180, 110, 92, 180, 106, 92, 172, 106, 84, + 180, 110, 92, 180, 110, 92, 180, 114, 92, 180, 110, 92, 172, 110, 92, + 172, 106, 84, 172, 102, 84, 164, 102, 84, 172, 106, 84, 180, 106, 92, + 180, 110, 84, 172, 106, 84, 172, 102, 84, 180, 110, 92, 172, 102, 76, + 172, 98, 76, 172, 106, 84, 180, 106, 84, 172, 98, 76, 164, 98, 76, + 164, 94, 76, 164, 98, 76, 172, 102, 76, 172, 110, 84, 172, 106, 84, + 172, 98, 76, 156, 94, 68, 164, 94, 68, 164, 94, 76, 164, 98, 76, + 164, 94, 68, 164, 94, 68, 156, 90, 68, 164, 94, 68, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 172, 102, 76, 172, 106, 84, + 172, 106, 84, 172, 102, 76, 164, 98, 76, 172, 106, 84, 164, 98, 76, + 148, 86, 60, 148, 82, 60, 156, 90, 68, 164, 94, 76, 164, 98, 76, + 164, 94, 76, 172, 98, 76, 164, 98, 76, 164, 98, 76, 172, 102, 84, + 172, 102, 76, 172, 106, 84, 172, 106, 84, 180, 110, 84, 172, 106, 84, + 172, 102, 76, 172, 102, 76, 172, 102, 76, 172, 106, 84, 172, 106, 84, + 172, 102, 76, 172, 102, 76, 172, 106, 84, 172, 102, 84, 172, 102, 76, + 164, 102, 84, 172, 102, 76, 172, 106, 84, 180, 110, 84, 180, 114, 92, + 172, 102, 76, 172, 106, 84, 172, 102, 84, 164, 94, 76, 164, 98, 76, + 172, 102, 76, 172, 102, 84, 172, 102, 76, 164, 98, 76, 172, 98, 76, + 164, 102, 76, 172, 102, 76, 164, 98, 76, 172, 102, 76, 164, 102, 76, + 172, 102, 76, 172, 102, 76, 164, 102, 76, 172, 102, 76, 164, 102, 76, + 172, 98, 76, 164, 98, 76, 164, 102, 76, 164, 98, 76, 172, 102, 84, + 172, 102, 76, 172, 102, 76, 164, 98, 76, 172, 102, 76, 172, 102, 84, + 172, 102, 76, 172, 102, 84, 172, 102, 76, 164, 98, 76, 164, 98, 76, + 164, 102, 76, 156, 90, 68, 164, 94, 68, 164, 98, 76, 164, 98, 76, + 164, 94, 76, 156, 94, 76, 156, 94, 76, 164, 94, 76, 164, 98, 76, + 164, 102, 84, 164, 102, 76, 164, 98, 84, 164, 94, 76, 156, 90, 68, + 156, 90, 76, 156, 94, 68, 156, 94, 76, 156, 90, 68, 156, 90, 68, + 156, 94, 76, 156, 86, 68, 156, 90, 68, 164, 98, 76, 164, 94, 76, + 164, 94, 76, 164, 98, 76, 172, 102, 84, 180, 114, 92, 164, 102, 76, + 172, 102, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, 180, 110, 92, + 180, 110, 92, 180, 114, 92, 172, 106, 92, 180, 110, 92, 172, 110, 92, + 180, 110, 92, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 110, 92, + 172, 110, 84, 172, 110, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, + 172, 110, 92, 172, 110, 84, 172, 106, 84, 172, 102, 92, 172, 106, 84, + 172, 106, 92, 172, 110, 92, 172, 110, 92, 172, 110, 92, 180, 106, 84, + 172, 106, 84, 180, 106, 92, 180, 110, 92, 180, 110, 100, 172, 102, 84, + 180, 114, 100, 172, 110, 100, 124, 66, 52, 100, 46, 28, 100, 42, 28, + 148, 78, 68, 156, 90, 68, 156, 94, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 156, 90, 68, 148, 82, 60, 148, 82, 68, 148, 86, 60, + 148, 82, 68, 148, 86, 60, 148, 86, 68, 156, 90, 68, 148, 86, 68, + 156, 90, 68, 156, 90, 68, 164, 94, 76, 164, 98, 84, 164, 98, 76, + 156, 94, 76, 164, 94, 76, 164, 98, 76, 164, 98, 76, 172, 102, 84, + 156, 90, 68, 164, 94, 76, 164, 98, 76, 164, 94, 76, 156, 86, 68, + 156, 94, 76, 180, 110, 92, 172, 98, 76, 172, 102, 76, 172, 102, 84, + 164, 98, 76, 172, 98, 76, 180, 110, 84, 188, 122, 100, 188, 118, 92, + 180, 114, 92, 188, 118, 100, 188, 118, 92, 188, 122, 100, 180, 114, 92, + 180, 110, 92, 172, 102, 76, 172, 106, 84, 188, 118, 92, 188, 122, 100, + 188, 122, 100, 188, 118, 92, 188, 118, 100, 188, 118, 92, 172, 102, 76, + 172, 102, 76, 180, 106, 84, 180, 110, 92, 180, 114, 92, 188, 118, 92, + 188, 114, 92, 180, 114, 92, 188, 114, 92, 188, 118, 100, 188, 118, 92, + 180, 114, 92, 172, 102, 76, 164, 98, 76, 172, 102, 76, 172, 106, 84, + 180, 110, 84, 172, 110, 84, 172, 102, 84, 172, 102, 76, 164, 98, 76, + 172, 102, 76, 172, 106, 76, 172, 102, 84, 172, 102, 76, 172, 106, 84, + 180, 110, 92, 180, 114, 92, 180, 110, 84, 172, 110, 84, 180, 106, 84, + 180, 110, 92, 172, 106, 76, 172, 110, 84, 180, 110, 92, 180, 110, 84, + 180, 106, 84, 172, 106, 84, 180, 106, 84, 172, 110, 84, 180, 110, 84, + 172, 102, 84, 172, 102, 76, 172, 102, 76, 164, 94, 68, 164, 98, 76, + 172, 102, 76, 164, 94, 76, 172, 102, 76, 164, 98, 76, 164, 94, 76, + 164, 98, 76, 172, 102, 76, 172, 102, 84, 172, 102, 76, 164, 98, 76, + 164, 102, 84, 172, 98, 76, 164, 98, 76, 172, 102, 76, 164, 98, 76, + 156, 90, 68, 156, 90, 68, 164, 94, 76, 172, 102, 76, 172, 106, 84, + 172, 106, 84, 164, 98, 76, 164, 98, 76, 172, 102, 76, 172, 102, 76, + 164, 98, 76, 164, 102, 76, 164, 98, 76, 172, 102, 76, 172, 102, 84, + 164, 94, 68, 164, 94, 76, 172, 102, 76, 164, 98, 76, 164, 102, 76, + 164, 94, 76, 156, 90, 68, 156, 94, 76, 164, 98, 76, 156, 94, 76, + 156, 90, 68, 156, 94, 76, 156, 90, 68, 156, 94, 76, 164, 98, 76, + 164, 98, 76, 156, 94, 76, 156, 86, 68, 148, 86, 68, 148, 82, 60, + 156, 86, 68, 156, 86, 68, 156, 86, 68, 156, 86, 68, 156, 82, 60, + 148, 86, 68, 156, 86, 68, 156, 90, 76, 156, 90, 68, 156, 86, 68, + 148, 78, 60, 148, 82, 60, 156, 86, 68, 156, 90, 76, 156, 90, 68, + 156, 86, 68, 148, 86, 60, 156, 86, 68, 148, 86, 68, 148, 86, 68, + 156, 90, 68, 156, 90, 68, 164, 94, 76, 156, 94, 76, 156, 86, 68, + 156, 90, 68, 156, 90, 68, 156, 90, 76, 156, 90, 68, 156, 90, 68, + 156, 86, 68, 148, 86, 68, 156, 86, 68, 156, 86, 68, 156, 90, 68, + 156, 90, 76, 164, 98, 76, 164, 102, 76, 164, 102, 84, 172, 106, 84, + 172, 102, 84, 164, 90, 76, 172, 102, 84, 172, 102, 84, 164, 102, 92, + 164, 102, 92, 124, 70, 60, 100, 42, 28, 84, 30, 12, 132, 70, 52, + 140, 74, 60, 148, 78, 60, 140, 74, 52, 140, 74, 60, 140, 78, 60, + 140, 78, 60, 140, 74, 52, 148, 78, 60, 148, 82, 60, 148, 82, 60, + 148, 82, 68, 156, 86, 60, 156, 90, 68, 156, 90, 68, 156, 90, 76, + 148, 82, 68, 156, 90, 68, 156, 90, 68, 164, 90, 68, 156, 90, 68, + 156, 86, 68, 156, 90, 68, 164, 90, 76, 172, 102, 84, 156, 94, 76, + 156, 90, 68, 172, 98, 84, 164, 102, 84, 164, 94, 76, 164, 94, 76, + 172, 102, 84, 180, 110, 84, 180, 110, 92, 188, 114, 92, 180, 110, 84, + 180, 110, 92, 188, 114, 92, 188, 118, 92, 188, 118, 92, 180, 118, 92, + 188, 114, 92, 188, 118, 92, 180, 118, 92, 180, 114, 92, 180, 110, 84, + 180, 114, 92, 180, 118, 92, 188, 118, 100, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 188, 118, 92, 188, 122, 100, 180, 114, 92, 180, 114, 92, + 180, 110, 84, 180, 114, 92, 180, 114, 92, 180, 114, 92, 172, 110, 84, + 172, 102, 84, 172, 106, 76, 180, 110, 92, 188, 118, 92, 188, 118, 100, + 188, 118, 92, 180, 114, 92, 180, 110, 92, 180, 114, 92, 180, 110, 84, + 180, 106, 84, 180, 110, 92, 180, 114, 92, 180, 114, 92, 180, 110, 92, + 180, 110, 84, 172, 110, 84, 172, 102, 84, 172, 106, 84, 180, 110, 84, + 180, 114, 92, 180, 110, 92, 180, 114, 92, 180, 110, 84, 180, 110, 92, + 172, 106, 84, 180, 106, 84, 180, 110, 84, 172, 110, 84, 172, 106, 84, + 172, 106, 84, 180, 106, 84, 180, 110, 92, 180, 110, 92, 172, 106, 76, + 172, 106, 84, 172, 106, 84, 164, 94, 76, 164, 98, 76, 172, 106, 84, + 172, 102, 76, 172, 102, 76, 164, 102, 76, 172, 98, 76, 164, 102, 76, + 172, 102, 84, 172, 106, 76, 172, 102, 84, 172, 102, 76, 172, 102, 76, + 164, 102, 84, 172, 102, 76, 172, 102, 84, 172, 102, 76, 164, 94, 68, + 164, 94, 76, 172, 102, 76, 172, 106, 84, 180, 106, 84, 172, 106, 84, + 172, 102, 76, 172, 102, 76, 172, 106, 84, 172, 106, 84, 172, 102, 76, + 172, 102, 76, 164, 98, 76, 172, 102, 84, 172, 106, 76, 164, 94, 76, + 164, 98, 76, 172, 102, 76, 164, 98, 76, 172, 102, 84, 164, 98, 76, + 156, 94, 76, 164, 102, 84, 172, 102, 84, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 156, 94, 76, 164, 94, 76, 164, 98, 76, 164, 102, 84, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 102, 84, 164, 94, 76, + 156, 94, 76, 164, 94, 76, 156, 94, 76, 156, 90, 68, 156, 86, 68, + 156, 90, 68, 164, 94, 76, 164, 94, 76, 156, 90, 68, 156, 86, 68, + 156, 86, 68, 156, 94, 76, 164, 98, 76, 164, 94, 76, 156, 90, 76, + 156, 86, 68, 148, 90, 68, 156, 90, 68, 156, 94, 68, 156, 94, 76, + 156, 94, 76, 156, 94, 76, 156, 94, 68, 156, 94, 76, 156, 94, 76, + 164, 94, 76, 156, 98, 76, 164, 94, 76, 156, 94, 76, 156, 90, 68, + 156, 90, 68, 164, 94, 84, 156, 94, 76, 164, 98, 84, 164, 98, 76, + 164, 102, 76, 156, 98, 76, 164, 98, 76, 164, 94, 68, 156, 82, 68, + 132, 66, 44, 140, 70, 52, 148, 78, 68, 156, 90, 76, 156, 102, 84, + 124, 66, 52, 84, 30, 12, 92, 38, 28, 132, 66, 52, 140, 74, 52, + 132, 74, 60, 132, 66, 44, 124, 66, 44, 140, 70, 52, 140, 78, 60, + 148, 82, 60, 148, 82, 68, 148, 86, 60, 148, 86, 68, 156, 86, 68, + 148, 90, 68, 156, 90, 76, 156, 94, 68, 156, 94, 76, 164, 90, 68, + 164, 94, 76, 164, 98, 76, 164, 98, 84, 172, 98, 84, 164, 98, 84, + 172, 98, 76, 164, 102, 84, 172, 102, 84, 172, 98, 84, 164, 98, 76, + 172, 102, 84, 180, 110, 84, 180, 110, 92, 172, 110, 92, 172, 102, 76, + 180, 106, 92, 180, 110, 84, 180, 110, 84, 180, 110, 92, 180, 106, 84, + 172, 102, 84, 180, 118, 92, 188, 114, 92, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 188, 114, 92, 180, 110, 92, 172, 110, 84, 188, 118, 100, + 188, 118, 92, 188, 114, 92, 180, 114, 92, 180, 110, 84, 180, 110, 92, + 180, 114, 92, 188, 118, 92, 188, 114, 92, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 114, 92, 180, 110, 84, 172, 102, 84, 172, 102, 76, + 172, 102, 76, 172, 110, 84, 188, 118, 100, 188, 122, 100, 188, 118, 92, + 188, 118, 100, 188, 122, 92, 188, 122, 100, 172, 110, 84, 180, 110, 92, + 180, 114, 84, 180, 114, 92, 188, 114, 92, 180, 118, 92, 188, 114, 92, + 180, 118, 92, 180, 106, 84, 172, 106, 84, 180, 106, 84, 180, 114, 84, + 180, 114, 92, 188, 114, 92, 180, 114, 92, 180, 114, 84, 172, 106, 84, + 180, 106, 84, 172, 110, 92, 180, 110, 84, 180, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 110, 84, 180, 110, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 164, 94, 68, 164, 98, 76, 180, 106, 84, 172, 110, 84, + 172, 102, 84, 172, 102, 84, 164, 102, 76, 172, 102, 76, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 172, 102, 84, 172, 102, 84, 172, 102, 76, + 172, 106, 84, 172, 106, 84, 172, 102, 84, 164, 98, 76, 172, 102, 76, + 172, 106, 84, 180, 110, 84, 180, 114, 92, 180, 110, 84, 172, 106, 84, + 172, 106, 84, 180, 110, 92, 180, 110, 84, 172, 110, 84, 172, 102, 84, + 172, 102, 76, 172, 106, 84, 180, 110, 84, 164, 98, 76, 164, 98, 76, + 172, 106, 84, 164, 102, 76, 172, 102, 84, 164, 98, 84, 164, 98, 76, + 172, 106, 84, 172, 110, 84, 172, 102, 84, 164, 102, 84, 164, 102, 84, + 172, 106, 84, 164, 102, 84, 164, 102, 84, 172, 102, 84, 164, 102, 84, + 156, 94, 76, 164, 98, 76, 172, 106, 84, 172, 102, 76, 164, 98, 84, + 172, 102, 84, 164, 98, 76, 164, 94, 76, 164, 94, 76, 164, 98, 76, + 164, 98, 84, 164, 98, 76, 164, 94, 76, 156, 94, 76, 164, 94, 76, + 172, 102, 84, 172, 102, 84, 164, 98, 76, 164, 94, 76, 156, 86, 68, + 156, 90, 68, 164, 94, 76, 164, 98, 84, 164, 98, 76, 164, 98, 76, + 164, 94, 76, 164, 94, 76, 164, 98, 84, 164, 102, 76, 164, 98, 76, + 164, 102, 84, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 94, 76, + 164, 98, 84, 172, 102, 84, 172, 102, 84, 172, 106, 92, 164, 102, 84, + 164, 98, 76, 156, 94, 68, 156, 90, 68, 156, 86, 68, 132, 62, 44, + 140, 66, 52, 140, 74, 60, 156, 94, 84, 172, 110, 100, 132, 74, 60, + 92, 38, 28, 116, 58, 44, 164, 106, 84, 180, 114, 92, 180, 114, 92, + 172, 106, 84, 172, 106, 84, 172, 110, 92, 188, 122, 100, 188, 126, 100, + 180, 114, 92, 180, 114, 100, 180, 114, 92, 180, 114, 92, 180, 114, 92, + 180, 110, 92, 172, 110, 92, 180, 110, 92, 164, 102, 84, 172, 106, 84, + 180, 106, 92, 180, 110, 92, 180, 114, 92, 180, 110, 92, 180, 114, 92, + 180, 110, 92, 172, 110, 84, 180, 114, 92, 180, 114, 100, 180, 114, 92, + 180, 114, 100, 188, 122, 100, 188, 122, 100, 188, 114, 92, 180, 114, 92, + 188, 114, 92, 188, 114, 92, 188, 122, 100, 188, 114, 92, 180, 110, 84, + 180, 110, 92, 180, 110, 84, 180, 110, 92, 180, 114, 92, 180, 114, 92, + 180, 110, 84, 180, 110, 92, 180, 110, 84, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 114, 92, 180, 110, 84, 180, 110, 92, 180, 110, 84, + 180, 110, 92, 172, 110, 84, 172, 106, 84, 180, 106, 84, 180, 110, 84, + 180, 110, 84, 180, 110, 84, 172, 106, 84, 172, 102, 76, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 110, 84, 180, 114, 92, + 188, 118, 92, 188, 122, 100, 188, 114, 92, 180, 110, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 180, 110, 84, 180, 114, 92, 188, 118, 92, + 180, 110, 92, 180, 114, 84, 180, 110, 92, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 110, 84, 172, 106, 84, 172, 102, 84, 172, 106, 76, + 172, 106, 84, 172, 106, 84, 172, 102, 76, 172, 102, 76, 172, 106, 84, + 180, 106, 84, 172, 110, 84, 172, 102, 84, 180, 110, 84, 172, 106, 84, + 164, 94, 68, 164, 98, 76, 172, 106, 84, 180, 110, 84, 172, 106, 84, + 172, 102, 76, 172, 102, 76, 172, 102, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 76, 172, 102, 76, 172, 102, 84, 164, 102, 76, 172, 102, 84, + 172, 106, 84, 172, 106, 84, 172, 102, 76, 172, 102, 84, 180, 110, 84, + 180, 110, 92, 180, 114, 84, 180, 110, 92, 172, 106, 84, 180, 106, 84, + 172, 110, 84, 180, 106, 84, 172, 110, 92, 180, 106, 84, 172, 106, 84, + 180, 110, 84, 172, 106, 84, 164, 98, 76, 172, 98, 76, 180, 110, 84, + 172, 106, 84, 172, 102, 84, 164, 98, 76, 164, 102, 84, 172, 106, 84, + 172, 110, 92, 172, 106, 84, 172, 102, 84, 164, 102, 84, 172, 106, 84, + 164, 98, 76, 164, 98, 76, 164, 102, 84, 164, 98, 76, 156, 90, 68, + 156, 90, 68, 164, 98, 84, 164, 98, 84, 172, 102, 76, 172, 102, 84, + 164, 102, 84, 164, 98, 76, 164, 98, 84, 172, 102, 84, 172, 106, 84, + 172, 98, 84, 164, 98, 76, 164, 98, 76, 172, 98, 84, 172, 106, 84, + 172, 106, 84, 164, 98, 84, 164, 94, 76, 156, 94, 76, 164, 98, 76, + 164, 98, 76, 164, 102, 76, 164, 102, 84, 164, 98, 76, 164, 98, 76, + 156, 94, 76, 164, 102, 76, 172, 102, 84, 164, 102, 84, 164, 102, 76, + 164, 102, 84, 164, 98, 84, 164, 98, 76, 164, 98, 84, 164, 98, 84, + 164, 98, 84, 172, 102, 84, 164, 102, 84, 172, 106, 84, 164, 102, 84, + 164, 98, 76, 164, 98, 76, 172, 102, 84, 164, 90, 68, 164, 90, 76, + 164, 94, 76, 164, 102, 92, 172, 114, 100, 140, 82, 68, 116, 58, 44, + 116, 62, 52, 148, 86, 68, 164, 98, 76, 164, 102, 84, 164, 98, 76, + 156, 94, 76, 164, 98, 76, 164, 102, 84, 172, 102, 84, 164, 102, 84, + 164, 102, 76, 164, 102, 84, 164, 98, 84, 164, 98, 76, 164, 102, 84, + 164, 98, 76, 164, 98, 76, 172, 102, 84, 172, 102, 84, 172, 106, 84, + 180, 110, 84, 172, 110, 92, 180, 110, 84, 172, 106, 92, 172, 106, 84, + 164, 90, 76, 172, 106, 84, 180, 110, 92, 172, 98, 84, 164, 98, 76, + 172, 106, 84, 180, 110, 92, 180, 114, 92, 180, 110, 92, 180, 110, 84, + 188, 114, 92, 188, 118, 100, 188, 114, 92, 180, 110, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 180, 110, 84, 180, 110, 84, 180, 114, 92, + 180, 110, 84, 180, 114, 92, 180, 106, 84, 172, 110, 84, 180, 106, 84, + 172, 106, 84, 180, 110, 84, 172, 110, 84, 180, 110, 84, 172, 110, 84, + 172, 102, 76, 172, 102, 76, 172, 102, 76, 172, 102, 84, 172, 110, 92, + 180, 110, 84, 172, 106, 84, 172, 102, 84, 172, 110, 84, 180, 110, 84, + 180, 110, 84, 180, 110, 84, 172, 106, 84, 172, 106, 84, 180, 110, 84, + 180, 110, 92, 180, 114, 92, 180, 114, 92, 172, 106, 84, 172, 102, 84, + 172, 102, 76, 172, 106, 84, 180, 106, 84, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 110, 84, 180, 110, 84, 180, 110, 92, 180, 114, 84, + 172, 106, 84, 172, 106, 84, 172, 102, 76, 172, 102, 76, 172, 102, 84, + 172, 102, 76, 164, 98, 76, 164, 98, 76, 172, 102, 76, 172, 106, 84, + 172, 102, 84, 172, 102, 76, 172, 106, 84, 172, 102, 76, 156, 90, 68, + 164, 94, 68, 172, 106, 84, 172, 106, 84, 172, 102, 76, 172, 98, 76, + 164, 98, 76, 164, 98, 76, 172, 102, 76, 172, 102, 76, 172, 102, 84, + 164, 102, 76, 172, 102, 76, 164, 98, 76, 172, 102, 76, 180, 106, 84, + 172, 106, 84, 164, 102, 76, 172, 102, 76, 172, 110, 92, 180, 110, 84, + 172, 110, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 180, 114, 84, 172, 106, 84, 180, 106, 84, + 172, 106, 84, 164, 94, 68, 164, 98, 76, 180, 110, 84, 180, 114, 92, + 164, 98, 84, 156, 98, 76, 164, 98, 76, 172, 106, 84, 172, 110, 92, + 172, 106, 84, 164, 102, 76, 164, 102, 84, 156, 90, 68, 156, 90, 68, + 156, 94, 76, 164, 102, 76, 164, 98, 76, 156, 94, 76, 164, 98, 76, + 164, 102, 84, 164, 98, 76, 164, 98, 76, 164, 98, 84, 172, 98, 76, + 164, 98, 84, 172, 98, 76, 172, 102, 84, 172, 106, 92, 164, 98, 76, + 164, 94, 76, 164, 98, 76, 164, 98, 84, 172, 106, 84, 172, 102, 84, + 164, 98, 76, 156, 90, 68, 164, 98, 76, 164, 98, 76, 164, 98, 84, + 164, 98, 76, 164, 98, 84, 164, 102, 76, 164, 98, 84, 164, 102, 76, + 172, 102, 84, 164, 102, 84, 164, 98, 76, 164, 98, 84, 164, 98, 76, + 164, 98, 76, 164, 102, 76, 164, 98, 76, 164, 98, 84, 172, 98, 84, + 164, 102, 84, 164, 102, 84, 164, 102, 84, 164, 106, 84, 172, 102, 84, + 172, 106, 84, 172, 102, 84, 172, 102, 84, 172, 102, 92, 164, 98, 84, + 164, 102, 92, 156, 98, 84, 132, 74, 60, 116, 62, 52, 116, 58, 44, + 148, 86, 68, 164, 94, 76, 164, 102, 84, 164, 102, 76, 164, 98, 76, + 164, 98, 76, 164, 102, 84, 164, 98, 76, 172, 106, 84, 172, 106, 84, + 172, 106, 92, 172, 110, 84, 172, 110, 92, 180, 110, 92, 180, 114, 92, + 180, 114, 92, 164, 102, 84, 172, 102, 84, 172, 106, 84, 172, 106, 92, + 180, 110, 92, 180, 110, 92, 172, 106, 84, 172, 102, 84, 164, 98, 84, + 180, 114, 92, 188, 122, 100, 180, 114, 92, 172, 102, 84, 180, 106, 92, + 188, 118, 100, 188, 122, 100, 172, 102, 84, 172, 106, 84, 180, 106, 84, + 180, 110, 84, 180, 110, 84, 180, 106, 92, 172, 102, 76, 172, 102, 84, + 180, 110, 84, 180, 110, 84, 180, 110, 92, 180, 110, 84, 180, 114, 92, + 180, 114, 92, 180, 110, 84, 172, 106, 84, 172, 102, 76, 164, 98, 76, + 172, 102, 84, 172, 106, 84, 180, 110, 92, 180, 114, 92, 172, 102, 84, + 172, 102, 84, 172, 106, 84, 172, 106, 84, 180, 106, 84, 172, 106, 84, + 172, 102, 76, 164, 98, 76, 172, 102, 76, 172, 102, 84, 172, 106, 84, + 180, 110, 92, 180, 110, 84, 180, 110, 84, 172, 106, 84, 172, 106, 84, + 180, 110, 84, 180, 114, 92, 180, 114, 92, 188, 114, 92, 180, 114, 92, + 180, 110, 92, 172, 110, 84, 172, 106, 84, 180, 114, 92, 180, 110, 92, + 180, 110, 84, 172, 110, 84, 180, 110, 84, 172, 106, 84, 172, 106, 84, + 172, 102, 76, 172, 102, 84, 172, 102, 84, 172, 106, 76, 164, 98, 76, + 164, 98, 76, 172, 98, 76, 172, 102, 84, 172, 106, 84, 172, 106, 76, + 164, 98, 76, 172, 106, 84, 172, 102, 84, 164, 94, 68, 164, 94, 76, + 172, 102, 76, 172, 102, 76, 164, 102, 84, 172, 102, 76, 164, 98, 76, + 172, 102, 76, 172, 102, 84, 172, 106, 84, 172, 102, 76, 172, 102, 84, + 164, 102, 76, 172, 98, 76, 164, 102, 76, 172, 106, 84, 172, 102, 76, + 172, 102, 76, 172, 102, 84, 180, 110, 84, 180, 110, 84, 172, 102, 84, + 172, 102, 76, 172, 106, 84, 172, 106, 76, 172, 102, 76, 172, 102, 84, + 172, 106, 84, 180, 110, 84, 172, 106, 84, 180, 110, 84, 172, 102, 84, + 156, 90, 68, 164, 94, 68, 172, 110, 84, 180, 114, 92, 172, 102, 76, + 164, 94, 76, 164, 98, 76, 164, 102, 84, 172, 106, 84, 164, 102, 84, + 164, 98, 76, 164, 98, 84, 156, 94, 76, 164, 98, 76, 164, 98, 84, + 164, 102, 84, 164, 98, 76, 164, 98, 84, 164, 102, 76, 164, 102, 84, + 164, 94, 76, 164, 94, 76, 164, 98, 76, 164, 98, 84, 164, 98, 76, + 164, 98, 76, 172, 102, 84, 172, 106, 84, 164, 98, 76, 164, 98, 76, + 164, 94, 76, 164, 98, 76, 172, 102, 84, 172, 102, 84, 164, 94, 76, + 156, 90, 68, 164, 98, 84, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 84, 164, 102, 84, 172, 102, 84, 164, 102, 84, + 164, 98, 76, 164, 98, 84, 164, 98, 76, 164, 98, 76, 164, 98, 84, + 164, 98, 76, 164, 98, 84, 172, 102, 84, 164, 102, 84, 172, 102, 84, + 164, 98, 84, 164, 102, 76, 164, 98, 76, 164, 102, 76, 164, 98, 76, + 172, 98, 84, 164, 98, 76, 172, 98, 84, 164, 94, 76, 164, 98, 84, + 156, 98, 84, 124, 70, 60, 116, 58, 44, 116, 62, 44, 164, 98, 76, + 164, 102, 84, 172, 106, 84, 164, 98, 84, 164, 102, 84, 172, 102, 84, + 172, 106, 84, 164, 102, 84, 164, 98, 84, 164, 98, 76, 164, 102, 84, + 172, 102, 84, 172, 106, 84, 172, 110, 84, 172, 110, 92, 180, 110, 92, + 172, 110, 92, 180, 110, 92, 180, 110, 92, 180, 114, 92, 180, 114, 92, + 180, 114, 92, 180, 106, 92, 164, 102, 84, 180, 106, 84, 180, 114, 100, + 188, 118, 100, 188, 118, 100, 180, 114, 92, 180, 110, 92, 180, 118, 100, + 188, 118, 100, 188, 114, 92, 188, 118, 100, 188, 118, 92, 188, 118, 100, + 188, 114, 92, 188, 122, 100, 172, 106, 84, 172, 106, 84, 180, 110, 84, + 172, 110, 92, 180, 110, 84, 172, 106, 84, 172, 110, 84, 180, 110, 84, + 180, 114, 92, 172, 106, 84, 172, 102, 84, 172, 102, 76, 172, 106, 84, + 180, 110, 84, 180, 114, 92, 180, 114, 92, 180, 110, 84, 172, 110, 84, + 172, 106, 84, 180, 110, 84, 180, 114, 92, 180, 110, 84, 172, 106, 84, + 172, 102, 76, 172, 106, 84, 172, 106, 84, 180, 110, 84, 180, 114, 92, + 180, 114, 92, 180, 114, 92, 180, 106, 84, 172, 106, 84, 172, 106, 84, + 180, 110, 84, 180, 114, 92, 188, 118, 92, 188, 118, 92, 180, 114, 92, + 180, 110, 84, 172, 106, 84, 180, 106, 84, 172, 106, 84, 180, 106, 84, + 172, 106, 84, 172, 106, 84, 172, 102, 84, 172, 102, 76, 172, 106, 84, + 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 102, 76, 172, 102, 84, + 172, 102, 76, 172, 106, 84, 180, 110, 84, 180, 106, 84, 172, 102, 76, + 172, 106, 84, 172, 106, 84, 164, 98, 76, 164, 98, 76, 172, 102, 84, + 164, 98, 76, 172, 106, 76, 172, 102, 84, 164, 98, 76, 172, 102, 76, + 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 102, 76, 172, 102, 84, + 172, 102, 76, 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 98, 76, + 164, 102, 84, 180, 110, 84, 172, 110, 84, 172, 102, 84, 172, 102, 76, + 172, 106, 84, 172, 106, 84, 172, 98, 76, 172, 102, 76, 172, 106, 84, + 172, 106, 84, 172, 102, 84, 180, 110, 84, 172, 106, 84, 156, 94, 68, + 164, 90, 68, 172, 106, 84, 180, 110, 84, 164, 102, 84, 164, 98, 76, + 164, 98, 76, 164, 102, 84, 172, 106, 84, 164, 98, 84, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 172, 106, 84, 172, 106, 84, 164, 98, 76, + 164, 94, 76, 164, 98, 76, 164, 98, 84, 164, 98, 76, 164, 98, 76, + 164, 98, 84, 172, 102, 84, 172, 98, 76, 164, 98, 76, 164, 94, 76, + 164, 98, 76, 172, 102, 84, 164, 98, 84, 164, 94, 76, 164, 94, 76, + 164, 94, 76, 164, 98, 84, 164, 98, 76, 164, 94, 76, 156, 86, 68, + 164, 94, 76, 156, 94, 76, 164, 98, 76, 164, 98, 76, 164, 102, 84, + 172, 102, 76, 164, 102, 84, 164, 102, 76, 172, 102, 84, 164, 102, 76, + 164, 102, 84, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 84, + 164, 102, 76, 164, 102, 84, 172, 98, 84, 164, 102, 84, 164, 98, 76, + 164, 102, 84, 156, 98, 76, 164, 98, 76, 164, 94, 76, 164, 98, 76, + 172, 98, 84, 172, 98, 84, 164, 90, 76, 172, 106, 92, 164, 106, 92, + 132, 70, 60, 116, 62, 44, 116, 58, 44, 164, 98, 84, 164, 98, 76, + 164, 98, 76, 156, 90, 68, 156, 90, 68, 164, 98, 76, 164, 102, 84, + 164, 98, 76, 172, 106, 84, 172, 102, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 92, 172, 106, 84, 172, 110, 92, 172, 106, 84, 180, 110, 92, + 172, 106, 84, 180, 110, 92, 180, 110, 92, 180, 114, 100, 180, 110, 92, + 172, 106, 84, 164, 98, 76, 180, 110, 92, 180, 110, 92, 180, 114, 92, + 188, 118, 100, 188, 118, 100, 180, 114, 92, 180, 110, 92, 180, 110, 92, + 180, 114, 92, 188, 118, 92, 188, 118, 100, 180, 110, 84, 180, 110, 92, + 188, 118, 92, 172, 106, 84, 180, 110, 84, 180, 114, 92, 180, 110, 92, + 180, 110, 84, 172, 106, 84, 172, 106, 84, 180, 106, 84, 180, 110, 92, + 172, 106, 84, 180, 110, 84, 180, 110, 92, 180, 114, 92, 180, 114, 92, + 180, 110, 92, 180, 106, 84, 172, 110, 84, 180, 106, 84, 180, 110, 92, + 180, 110, 84, 180, 118, 100, 188, 114, 92, 180, 114, 92, 180, 110, 92, + 188, 122, 100, 188, 118, 92, 180, 114, 100, 180, 114, 84, 180, 110, 92, + 180, 110, 84, 180, 110, 92, 180, 110, 84, 172, 106, 84, 172, 110, 84, + 180, 110, 84, 180, 110, 92, 180, 110, 84, 180, 110, 92, 180, 110, 84, + 180, 110, 92, 164, 98, 76, 172, 102, 76, 172, 106, 84, 172, 102, 76, + 172, 102, 76, 172, 102, 76, 172, 106, 84, 180, 106, 84, 180, 110, 84, + 180, 110, 84, 180, 110, 92, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 110, 84, 180, 114, 92, 180, 110, 92, 172, 106, 84, 180, 106, 84, + 180, 110, 84, 172, 102, 76, 172, 102, 76, 172, 102, 76, 164, 94, 76, + 172, 106, 84, 172, 102, 84, 172, 106, 84, 172, 102, 84, 172, 106, 84, + 180, 110, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 180, 110, 84, 172, 106, 84, 172, 102, 76, 172, 102, 84, + 180, 110, 84, 180, 110, 92, 172, 106, 76, 172, 102, 84, 172, 106, 84, + 172, 106, 84, 172, 102, 76, 164, 102, 76, 180, 106, 84, 164, 98, 76, + 164, 102, 76, 180, 110, 84, 172, 110, 84, 164, 94, 76, 156, 94, 68, + 172, 102, 84, 172, 106, 84, 172, 106, 92, 164, 102, 84, 164, 98, 76, + 164, 102, 84, 172, 102, 84, 164, 98, 76, 164, 98, 84, 164, 102, 84, + 156, 90, 68, 164, 102, 84, 164, 102, 84, 156, 86, 68, 148, 86, 68, + 172, 102, 84, 172, 110, 84, 172, 102, 84, 172, 102, 84, 172, 102, 84, + 172, 102, 84, 164, 98, 76, 164, 94, 76, 156, 94, 76, 164, 94, 76, + 164, 98, 76, 172, 98, 84, 164, 98, 76, 156, 90, 76, 164, 94, 76, + 172, 98, 76, 164, 98, 84, 164, 94, 76, 156, 90, 68, 148, 90, 68, + 156, 94, 76, 164, 94, 76, 164, 102, 84, 164, 102, 84, 164, 102, 84, + 164, 98, 76, 164, 98, 84, 172, 106, 84, 164, 102, 84, 172, 102, 84, + 164, 98, 76, 164, 98, 84, 164, 98, 76, 164, 102, 76, 164, 98, 84, + 164, 94, 76, 164, 94, 76, 164, 98, 84, 164, 102, 84, 164, 102, 84, + 164, 98, 76, 164, 94, 76, 156, 94, 76, 164, 98, 76, 164, 94, 84, + 164, 98, 84, 156, 94, 76, 164, 106, 92, 164, 102, 92, 124, 66, 52, + 116, 58, 44, 116, 58, 36, 164, 106, 92, 172, 106, 84, 164, 106, 84, + 172, 102, 84, 164, 102, 84, 164, 102, 84, 164, 102, 76, 164, 98, 84, + 172, 106, 84, 172, 106, 84, 172, 110, 92, 172, 110, 84, 172, 106, 92, + 172, 106, 84, 172, 110, 92, 180, 114, 92, 180, 110, 92, 180, 110, 92, + 172, 110, 92, 180, 110, 92, 188, 118, 92, 188, 118, 100, 180, 114, 100, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 188, 118, 100, 180, 114, 100, + 180, 114, 92, 180, 114, 92, 180, 110, 92, 172, 106, 84, 188, 118, 100, + 188, 118, 92, 188, 118, 100, 188, 118, 92, 188, 118, 92, 180, 114, 92, + 180, 106, 92, 180, 114, 92, 188, 118, 100, 180, 114, 100, 180, 110, 92, + 172, 106, 84, 180, 110, 92, 180, 114, 92, 180, 114, 92, 180, 110, 92, + 172, 106, 84, 172, 106, 84, 180, 114, 92, 188, 122, 100, 188, 118, 100, + 180, 118, 92, 188, 114, 100, 180, 118, 92, 188, 118, 100, 188, 118, 100, + 188, 118, 100, 180, 114, 92, 180, 118, 92, 188, 118, 100, 188, 122, 100, + 188, 118, 100, 180, 114, 92, 188, 114, 92, 180, 114, 100, 180, 114, 92, + 180, 110, 92, 172, 106, 84, 188, 118, 92, 180, 114, 92, 172, 110, 84, + 172, 110, 84, 172, 110, 84, 172, 110, 84, 180, 110, 84, 172, 106, 84, + 172, 110, 84, 172, 106, 84, 180, 106, 84, 172, 106, 84, 180, 106, 84, + 172, 102, 84, 180, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 180, 110, 84, 180, 114, 84, 180, 110, 92, 180, 110, 84, 180, 110, 92, + 180, 110, 84, 172, 106, 84, 172, 106, 76, 172, 102, 84, 164, 102, 76, + 164, 102, 76, 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 102, 76, + 172, 102, 84, 172, 106, 84, 180, 110, 84, 180, 110, 92, 172, 106, 84, + 172, 106, 84, 172, 102, 84, 180, 106, 84, 172, 106, 84, 180, 106, 92, + 172, 106, 84, 180, 106, 92, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 172, 110, 84, 180, 110, 84, 172, 110, 84, 172, 98, 76, + 164, 102, 76, 172, 110, 84, 180, 118, 92, 172, 106, 84, 172, 110, 84, + 172, 102, 84, 172, 102, 76, 164, 102, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 68, 164, 102, 84, 164, 102, 76, 164, 98, 84, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 102, 76, 164, 102, 84, 164, 98, 76, + 164, 98, 76, 156, 98, 76, 164, 94, 76, 156, 94, 76, 164, 98, 76, + 164, 98, 84, 164, 106, 84, 164, 98, 76, 164, 98, 76, 156, 94, 76, + 156, 94, 76, 164, 94, 76, 164, 98, 76, 172, 102, 84, 164, 102, 84, + 164, 94, 76, 156, 98, 76, 164, 94, 76, 164, 98, 76, 164, 98, 76, + 164, 102, 76, 164, 94, 76, 156, 94, 76, 148, 86, 68, 164, 94, 76, + 164, 102, 84, 164, 102, 76, 164, 94, 76, 156, 94, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 84, 164, 98, 76, 164, 98, 76, 164, 98, 84, + 164, 94, 84, 164, 90, 76, 164, 94, 76, 164, 98, 84, 164, 98, 84, + 164, 94, 76, 164, 94, 76, 172, 102, 84, 164, 98, 76, 172, 98, 84, + 164, 98, 84, 172, 110, 92, 164, 102, 84, 124, 66, 52, 116, 58, 36, + 108, 46, 28, 180, 110, 92, 180, 110, 92, 172, 110, 92, 172, 110, 84, + 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 110, 92, + 172, 110, 92, 180, 110, 92, 172, 110, 92, 172, 110, 84, 172, 110, 92, + 180, 114, 92, 180, 118, 100, 180, 110, 92, 172, 106, 84, 180, 110, 92, + 180, 110, 92, 180, 114, 100, 188, 118, 100, 180, 114, 92, 180, 114, 92, + 180, 114, 100, 180, 114, 92, 180, 114, 100, 180, 114, 92, 180, 110, 92, + 180, 110, 92, 172, 106, 92, 180, 106, 84, 180, 114, 92, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 172, 110, 92, + 180, 110, 92, 188, 118, 100, 180, 114, 92, 180, 110, 92, 172, 106, 84, + 180, 106, 92, 180, 110, 92, 180, 114, 92, 172, 106, 92, 172, 106, 84, + 180, 106, 92, 180, 114, 92, 188, 118, 100, 188, 118, 100, 180, 114, 92, + 180, 110, 92, 180, 114, 100, 188, 118, 100, 188, 118, 100, 180, 118, 100, + 188, 118, 100, 188, 118, 100, 188, 118, 100, 196, 126, 108, 188, 122, 100, + 188, 118, 100, 188, 118, 100, 188, 122, 100, 188, 118, 100, 180, 118, 100, + 180, 114, 92, 188, 118, 100, 180, 118, 92, 180, 110, 84, 180, 110, 92, + 180, 114, 84, 180, 114, 92, 180, 110, 92, 180, 110, 84, 180, 110, 92, + 180, 110, 84, 180, 110, 92, 180, 110, 92, 188, 114, 84, 180, 110, 92, + 180, 110, 84, 188, 114, 92, 188, 114, 92, 180, 118, 92, 188, 118, 100, + 188, 118, 92, 188, 122, 100, 188, 118, 92, 188, 118, 100, 180, 118, 92, + 180, 106, 84, 172, 106, 84, 172, 102, 76, 172, 102, 76, 172, 102, 84, + 172, 102, 76, 172, 106, 84, 172, 106, 84, 172, 102, 84, 164, 102, 84, + 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 102, 84, 172, 102, 84, + 164, 98, 84, 172, 106, 84, 172, 110, 92, 172, 106, 84, 180, 110, 92, + 172, 106, 84, 172, 110, 92, 180, 106, 92, 172, 110, 92, 180, 110, 84, + 172, 114, 92, 180, 114, 92, 172, 110, 84, 172, 106, 84, 172, 106, 84, + 180, 114, 84, 180, 118, 92, 180, 110, 84, 172, 110, 84, 172, 110, 84, + 172, 106, 84, 164, 102, 76, 172, 102, 76, 164, 102, 76, 164, 102, 84, + 172, 102, 76, 164, 102, 84, 164, 98, 76, 164, 98, 84, 164, 98, 76, + 164, 102, 84, 164, 102, 84, 172, 98, 76, 164, 98, 84, 164, 98, 76, + 164, 94, 76, 156, 94, 68, 164, 94, 76, 164, 98, 76, 164, 98, 76, + 164, 102, 84, 172, 102, 84, 164, 102, 84, 164, 98, 76, 164, 98, 76, + 156, 94, 76, 164, 98, 76, 164, 98, 76, 164, 102, 76, 164, 98, 76, + 164, 98, 76, 156, 94, 76, 164, 98, 76, 164, 102, 84, 164, 98, 84, + 164, 98, 76, 164, 94, 76, 156, 94, 68, 164, 102, 84, 172, 106, 84, + 172, 110, 92, 172, 102, 84, 164, 102, 76, 172, 102, 84, 164, 106, 84, + 164, 98, 84, 164, 98, 76, 164, 98, 84, 156, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 84, 164, 98, 84, 164, 94, 76, + 164, 94, 76, 164, 94, 76, 164, 98, 84, 164, 98, 84, 164, 98, 84, + 164, 94, 76, 156, 94, 84, 156, 94, 76, 156, 94, 76, 156, 90, 76, + 164, 98, 84, 156, 90, 76, 116, 54, 36, 108, 46, 28, 116, 54, 36, + 172, 110, 92, 172, 110, 92, 180, 110, 92, 172, 110, 92, 172, 106, 84, + 172, 106, 92, 164, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 172, 110, 84, 172, 106, 92, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 180, 110, 92, 172, 106, 84, 172, 106, 84, 172, 106, 84, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 188, 114, 100, 180, 114, 92, 180, 110, 92, + 180, 110, 92, 180, 110, 92, 180, 110, 92, 172, 106, 84, 180, 106, 92, + 172, 110, 84, 172, 106, 92, 180, 110, 84, 180, 110, 92, 180, 110, 92, + 180, 110, 84, 180, 110, 92, 180, 106, 84, 180, 106, 84, 180, 114, 92, + 180, 114, 100, 180, 114, 92, 172, 106, 92, 172, 106, 84, 172, 106, 84, + 172, 106, 92, 180, 110, 92, 172, 106, 84, 172, 102, 84, 172, 106, 84, + 180, 114, 92, 180, 114, 100, 180, 114, 92, 180, 114, 92, 180, 110, 92, + 180, 114, 92, 188, 122, 100, 188, 118, 100, 188, 118, 100, 180, 114, 92, + 180, 114, 92, 180, 114, 92, 180, 110, 92, 172, 106, 92, 172, 106, 84, + 172, 106, 84, 172, 106, 92, 172, 106, 84, 180, 110, 92, 172, 110, 84, + 180, 114, 92, 180, 114, 92, 172, 110, 84, 172, 110, 84, 172, 110, 84, + 180, 110, 92, 180, 114, 84, 172, 110, 84, 172, 102, 84, 172, 106, 76, + 172, 106, 84, 180, 106, 84, 172, 106, 84, 180, 106, 84, 180, 106, 84, + 172, 106, 84, 180, 106, 84, 180, 110, 84, 172, 110, 92, 180, 110, 84, + 180, 110, 92, 172, 110, 84, 180, 110, 84, 172, 106, 84, 172, 106, 84, + 172, 106, 84, 164, 102, 84, 172, 102, 76, 164, 102, 76, 172, 102, 84, + 172, 106, 76, 172, 106, 84, 172, 102, 84, 172, 102, 84, 172, 106, 84, + 180, 106, 84, 172, 106, 92, 172, 106, 84, 172, 102, 84, 172, 102, 84, + 172, 102, 84, 172, 106, 84, 172, 102, 84, 172, 106, 84, 172, 106, 92, + 180, 106, 84, 172, 106, 92, 172, 110, 84, 180, 110, 92, 180, 110, 92, + 172, 114, 92, 180, 110, 84, 172, 114, 92, 180, 110, 84, 172, 114, 92, + 180, 110, 92, 172, 114, 92, 180, 110, 92, 172, 106, 84, 172, 106, 84, + 164, 106, 84, 172, 106, 84, 164, 102, 84, 172, 106, 84, 164, 98, 76, + 164, 98, 76, 164, 98, 84, 164, 102, 76, 164, 102, 84, 164, 98, 76, + 164, 98, 84, 164, 98, 76, 164, 98, 76, 164, 98, 76, 156, 94, 76, + 156, 90, 76, 156, 94, 68, 156, 94, 76, 156, 94, 76, 164, 98, 76, + 164, 102, 84, 164, 102, 76, 164, 98, 76, 156, 94, 76, 156, 94, 76, + 156, 94, 68, 156, 90, 76, 156, 94, 76, 164, 98, 76, 164, 98, 76, + 156, 94, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 156, 94, 76, 156, 86, 68, 156, 94, 68, 164, 98, 76, 164, 98, 76, + 156, 94, 76, 156, 90, 68, 156, 94, 76, 164, 94, 76, 156, 98, 76, + 164, 94, 76, 156, 98, 76, 164, 94, 76, 164, 98, 76, 156, 94, 76, + 164, 98, 76, 156, 94, 76, 164, 94, 76, 156, 90, 76, 156, 90, 76, + 156, 90, 76, 156, 94, 76, 164, 94, 76, 156, 90, 76, 156, 94, 76, + 164, 98, 84, 164, 94, 76, 164, 98, 84, 156, 94, 76, 164, 102, 84, + 156, 94, 76, 116, 58, 36, 116, 54, 36, 116, 58, 36, 180, 114, 100, + 180, 118, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, + 180, 110, 92, 172, 110, 92, 180, 114, 92, 180, 114, 100, 180, 114, 92, + 180, 114, 92, 172, 110, 92, 172, 110, 92, 180, 114, 92, 180, 118, 100, + 180, 114, 92, 180, 114, 100, 188, 118, 100, 188, 118, 100, 188, 122, 100, + 196, 126, 108, 188, 122, 108, 196, 126, 100, 188, 122, 108, 188, 122, 100, + 188, 118, 100, 180, 118, 100, 188, 114, 100, 180, 118, 100, 188, 118, 100, + 188, 118, 100, 196, 126, 108, 188, 126, 100, 196, 126, 108, 188, 122, 100, + 180, 114, 100, 180, 114, 92, 188, 122, 100, 196, 122, 108, 196, 126, 108, + 196, 126, 100, 188, 118, 100, 180, 114, 100, 188, 114, 92, 180, 118, 100, + 188, 122, 100, 188, 118, 100, 188, 114, 100, 188, 118, 100, 188, 122, 100, + 196, 122, 108, 188, 126, 108, 188, 122, 100, 196, 126, 108, 196, 130, 108, + 196, 130, 116, 196, 130, 108, 196, 126, 108, 188, 118, 100, 180, 114, 100, + 180, 110, 92, 172, 106, 84, 172, 106, 84, 172, 102, 84, 172, 102, 84, + 172, 106, 84, 180, 106, 92, 180, 114, 92, 180, 114, 92, 180, 118, 92, + 180, 118, 92, 180, 118, 92, 180, 118, 92, 188, 118, 92, 180, 118, 92, + 180, 118, 92, 188, 118, 100, 180, 114, 84, 180, 110, 92, 188, 114, 92, + 180, 110, 92, 188, 114, 92, 188, 118, 92, 188, 118, 100, 188, 118, 92, + 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 114, 92, 180, 110, 84, + 180, 110, 92, 180, 110, 84, 180, 110, 84, 188, 118, 92, 180, 114, 92, + 180, 114, 92, 180, 110, 84, 180, 110, 92, 180, 114, 92, 180, 114, 92, + 188, 118, 92, 188, 118, 100, 188, 122, 100, 188, 122, 100, 188, 122, 108, + 188, 122, 100, 188, 122, 100, 188, 122, 100, 188, 118, 100, 180, 114, 92, + 180, 114, 92, 180, 114, 100, 188, 114, 92, 180, 118, 100, 188, 118, 100, + 188, 118, 100, 188, 118, 100, 188, 122, 100, 180, 122, 100, 188, 118, 100, + 188, 122, 100, 188, 122, 100, 188, 126, 108, 188, 122, 100, 180, 118, 92, + 172, 106, 84, 172, 110, 84, 172, 106, 84, 164, 102, 84, 172, 102, 76, + 164, 102, 76, 164, 102, 84, 172, 102, 76, 156, 94, 76, 164, 98, 76, + 164, 98, 76, 164, 102, 84, 164, 98, 76, 164, 102, 76, 164, 98, 76, + 156, 98, 76, 164, 98, 84, 164, 98, 76, 156, 94, 76, 164, 94, 68, + 156, 94, 76, 156, 94, 68, 164, 94, 76, 156, 94, 76, 164, 98, 76, + 164, 98, 84, 164, 98, 76, 156, 94, 76, 156, 90, 68, 156, 94, 76, + 156, 90, 68, 156, 94, 76, 164, 94, 76, 156, 94, 76, 164, 94, 76, + 156, 98, 76, 164, 98, 76, 164, 98, 84, 156, 98, 76, 156, 94, 68, + 164, 94, 76, 164, 98, 76, 164, 102, 84, 164, 102, 84, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 156, 94, 76, 156, 94, 68, + 156, 94, 76, 156, 94, 76, 156, 94, 76, 156, 94, 76, 156, 94, 68, + 156, 94, 76, 172, 98, 84, 164, 98, 84, 172, 98, 76, 164, 94, 84, + 172, 98, 84, 164, 98, 84, 164, 98, 84, 172, 98, 84, 164, 98, 84, + 164, 98, 84, 164, 106, 84, 164, 102, 84, 172, 110, 92, 164, 98, 84, + 124, 66, 44, 116, 58, 36, 116, 50, 36, 172, 106, 84, 164, 102, 84, + 172, 102, 84, 164, 102, 84, 172, 102, 84, 164, 102, 84, 164, 102, 84, + 172, 102, 84, 164, 102, 84, 172, 106, 84, 164, 106, 84, 172, 102, 84, + 164, 102, 76, 172, 102, 84, 164, 102, 84, 172, 106, 84, 172, 102, 84, + 180, 106, 84, 172, 110, 92, 180, 114, 92, 180, 110, 92, 180, 114, 92, + 180, 114, 92, 180, 114, 100, 180, 114, 92, 180, 110, 92, 180, 110, 92, + 172, 106, 84, 180, 110, 84, 172, 106, 84, 180, 110, 92, 180, 110, 92, + 180, 118, 92, 180, 114, 100, 180, 110, 92, 180, 110, 92, 180, 106, 92, + 172, 102, 84, 180, 114, 92, 180, 114, 92, 180, 114, 100, 180, 114, 92, + 180, 110, 92, 180, 106, 92, 172, 106, 84, 172, 106, 84, 180, 106, 92, + 172, 110, 92, 172, 106, 84, 180, 110, 92, 180, 110, 92, 180, 114, 92, + 180, 110, 92, 180, 110, 92, 180, 110, 92, 188, 114, 100, 188, 122, 100, + 188, 118, 100, 180, 110, 92, 172, 106, 84, 172, 102, 84, 164, 98, 76, + 172, 102, 84, 172, 102, 84, 164, 102, 84, 172, 98, 76, 164, 98, 84, + 172, 106, 84, 180, 106, 92, 180, 110, 92, 172, 106, 92, 172, 110, 84, + 172, 106, 84, 172, 110, 92, 172, 106, 84, 172, 110, 92, 180, 106, 84, + 172, 110, 92, 180, 110, 84, 172, 110, 92, 180, 110, 84, 180, 110, 92, + 180, 114, 92, 180, 114, 92, 188, 114, 92, 188, 114, 92, 180, 110, 92, + 180, 110, 92, 180, 110, 92, 180, 110, 84, 180, 110, 92, 172, 110, 84, + 172, 106, 84, 172, 106, 92, 172, 106, 84, 180, 106, 84, 172, 106, 84, + 172, 102, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, 172, 106, 84, + 180, 110, 92, 180, 110, 92, 180, 110, 92, 180, 114, 92, 180, 114, 100, + 180, 114, 92, 180, 110, 92, 180, 110, 92, 172, 102, 84, 172, 102, 84, + 172, 106, 84, 172, 106, 84, 172, 106, 92, 180, 110, 84, 172, 110, 92, + 180, 110, 92, 172, 106, 92, 172, 106, 84, 172, 106, 84, 172, 110, 92, + 180, 114, 92, 180, 110, 92, 172, 110, 92, 172, 102, 84, 172, 106, 92, + 164, 102, 84, 172, 102, 84, 164, 102, 84, 164, 98, 84, 164, 102, 76, + 164, 98, 84, 164, 102, 84, 164, 98, 76, 164, 98, 76, 164, 98, 84, + 172, 102, 76, 164, 102, 84, 164, 98, 84, 164, 98, 84, 164, 98, 76, + 172, 102, 76, 164, 102, 84, 164, 102, 76, 164, 98, 84, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 164, 94, 76, 164, 98, 76, 164, 94, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 102, 84, 164, 102, 84, 164, 98, 76, 156, 94, 76, 164, 98, 76, + 164, 98, 84, 172, 102, 84, 164, 102, 76, 164, 98, 84, 164, 98, 76, + 164, 98, 84, 164, 98, 76, 164, 94, 76, 164, 94, 76, 164, 94, 76, + 156, 94, 76, 164, 94, 68, 164, 94, 76, 164, 94, 76, 156, 94, 76, + 164, 94, 76, 164, 90, 76, 156, 94, 76, 164, 94, 76, 164, 94, 76, + 156, 94, 76, 164, 94, 76, 164, 94, 76, 156, 94, 76, 164, 94, 76, + 164, 102, 84, 164, 102, 84, 172, 106, 92, 156, 94, 76, 124, 62, 44, + 116, 50, 36, 108, 50, 28, 156, 86, 68, 156, 90, 68, 148, 86, 68, + 156, 90, 68, 148, 86, 68, 156, 90, 68, 156, 86, 68, 148, 90, 68, + 156, 90, 68, 156, 90, 76, 156, 94, 76, 156, 90, 68, 148, 86, 68, + 156, 86, 68, 156, 90, 68, 156, 90, 76, 148, 86, 68, 156, 86, 68, + 156, 90, 68, 164, 90, 76, 156, 90, 68, 156, 90, 76, 164, 90, 68, + 156, 90, 76, 164, 90, 68, 156, 90, 76, 156, 90, 68, 156, 90, 68, + 156, 90, 76, 156, 90, 68, 156, 90, 68, 156, 90, 68, 156, 86, 76, + 156, 86, 68, 156, 90, 76, 156, 90, 68, 156, 90, 76, 156, 90, 68, + 164, 90, 76, 164, 94, 76, 164, 94, 76, 156, 94, 76, 156, 90, 68, + 156, 90, 68, 156, 86, 68, 156, 86, 68, 156, 86, 68, 156, 86, 68, + 156, 90, 68, 156, 90, 68, 156, 90, 76, 164, 90, 68, 156, 90, 76, + 156, 90, 68, 148, 86, 68, 156, 86, 68, 164, 94, 76, 164, 94, 76, + 156, 90, 68, 156, 90, 68, 156, 86, 68, 156, 86, 68, 156, 86, 68, + 156, 86, 68, 156, 86, 68, 156, 86, 68, 156, 86, 68, 156, 86, 68, + 156, 90, 68, 164, 94, 76, 156, 90, 68, 156, 94, 76, 164, 98, 76, + 164, 94, 76, 156, 94, 68, 156, 90, 68, 156, 94, 68, 164, 94, 68, + 156, 86, 68, 156, 86, 68, 156, 90, 68, 156, 90, 68, 164, 90, 68, + 164, 90, 76, 164, 90, 68, 164, 90, 76, 164, 94, 76, 156, 94, 68, + 164, 94, 68, 156, 90, 68, 156, 90, 68, 164, 90, 68, 164, 94, 76, + 156, 90, 68, 156, 90, 68, 156, 90, 68, 156, 90, 68, 164, 90, 68, + 156, 90, 68, 156, 90, 68, 164, 90, 68, 156, 90, 68, 156, 90, 76, + 156, 90, 68, 156, 90, 76, 164, 90, 68, 156, 90, 68, 156, 90, 76, + 156, 90, 68, 156, 90, 76, 156, 90, 68, 156, 90, 76, 156, 86, 68, + 164, 90, 76, 156, 90, 68, 164, 90, 76, 156, 94, 68, 164, 94, 76, + 156, 90, 68, 156, 90, 76, 156, 90, 68, 156, 90, 76, 156, 94, 76, + 156, 94, 76, 156, 90, 76, 148, 86, 68, 164, 98, 84, 164, 98, 76, + 164, 98, 76, 156, 94, 76, 164, 94, 76, 156, 94, 76, 164, 94, 76, + 156, 94, 76, 164, 94, 76, 156, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 94, 76, 164, 98, 76, 156, 94, 76, 156, 94, 76, 164, 98, 76, + 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, 164, 98, 76, + 164, 98, 76, 156, 94, 76, 156, 94, 76, 156, 90, 68, 156, 94, 76, + 156, 94, 76, 164, 94, 76, 156, 98, 76, 164, 98, 76, 164, 98, 84, + 156, 94, 76, 156, 94, 76, 156, 94, 76, 164, 94, 76, 164, 98, 76, + 164, 98, 76, 164, 94, 76, 156, 90, 76, 156, 90, 68, 156, 90, 68, + 156, 94, 76, 156, 90, 68, 156, 90, 68, 156, 90, 68, 148, 90, 68, + 156, 90, 68, 156, 90, 76, 156, 94, 68, 156, 90, 68, 156, 94, 76, + 156, 90, 68, 156, 94, 76, 156, 90, 68, 156, 94, 68, 156, 82, 68, + 156, 86, 76, 156, 90, 76, 156, 86, 76, 148, 86, 68, 156, 86, 68, + 156, 86, 76, 156, 90, 68, 156, 94, 76, 164, 94, 84, 164, 98, 84, + 156, 94, 76, 156, 98, 76, 148, 86, 68, 116, 54, 36, 108, 50, 28, + 108, 50, 36, 140, 78, 60, 140, 78, 60, 148, 78, 60, 140, 78, 60, + 140, 78, 60, 140, 78, 60, 140, 78, 60, 140, 78, 60, 148, 82, 60, + 148, 82, 60, 148, 82, 60, 148, 78, 60, 140, 74, 52, 140, 74, 52, + 140, 78, 60, 148, 82, 60, 140, 70, 52, 140, 74, 52, 148, 74, 60, + 140, 78, 60, 148, 74, 60, 140, 74, 52, 140, 74, 52, 140, 78, 60, + 140, 74, 52, 148, 78, 60, 140, 74, 60, 148, 78, 60, 148, 74, 60, + 148, 78, 60, 148, 74, 60, 148, 78, 60, 140, 70, 52, 140, 70, 52, + 148, 74, 60, 140, 74, 60, 148, 78, 60, 148, 78, 68, 140, 78, 60, + 148, 78, 60, 140, 78, 60, 148, 78, 60, 148, 78, 60, 148, 74, 60, + 140, 74, 52, 140, 74, 52, 140, 74, 52, 140, 74, 52, 140, 74, 52, + 148, 74, 60, 148, 78, 60, 140, 78, 60, 148, 74, 60, 140, 74, 52, + 140, 70, 52, 140, 74, 52, 140, 78, 60, 148, 78, 60, 148, 78, 60, + 148, 78, 60, 148, 78, 60, 148, 82, 60, 140, 74, 52, 140, 74, 52, + 140, 78, 60, 140, 74, 52, 140, 74, 52, 140, 74, 52, 140, 74, 52, + 140, 78, 60, 140, 82, 60, 148, 82, 60, 148, 86, 68, 148, 86, 60, + 140, 82, 60, 148, 78, 60, 140, 78, 60, 140, 78, 60, 140, 70, 52, + 140, 70, 52, 140, 74, 52, 140, 70, 52, 140, 74, 52, 140, 70, 52, + 140, 74, 52, 140, 74, 52, 140, 78, 60, 148, 74, 60, 140, 74, 52, + 140, 74, 60, 140, 74, 52, 140, 74, 60, 140, 78, 60, 148, 78, 60, + 156, 82, 60, 148, 82, 68, 156, 82, 60, 148, 82, 68, 148, 82, 60, + 156, 82, 68, 148, 82, 60, 148, 82, 68, 148, 82, 60, 148, 82, 60, + 148, 82, 60, 148, 82, 68, 148, 78, 60, 156, 82, 60, 148, 82, 68, + 148, 82, 60, 156, 82, 60, 148, 82, 60, 156, 82, 68, 148, 82, 60, + 156, 86, 68, 148, 82, 60, 156, 82, 68, 148, 82, 60, 148, 82, 68, + 148, 82, 68, 148, 82, 68, 148, 86, 68, 148, 82, 68, 156, 86, 68, + 148, 82, 68, 148, 82, 60, 148, 82, 68, 140, 78, 60, 148, 78, 68, + 140, 78, 60, 148, 78, 60, 140, 78, 60, 148, 78, 60, 140, 78, 60, + 148, 82, 60, 148, 78, 60, 140, 78, 60, 140, 78, 60, 140, 78, 60, + 140, 78, 60, 148, 78, 60, 148, 82, 60, 140, 78, 60, 148, 78, 60, + 140, 78, 60, 148, 78, 60, 140, 78, 60, 140, 78, 60, 148, 78, 60, + 148, 82, 60, 140, 74, 52, 140, 78, 60, 148, 78, 60, 140, 78, 60, + 148, 82, 60, 148, 82, 60, 148, 82, 60, 148, 82, 60, 148, 78, 60, + 148, 78, 60, 140, 78, 60, 140, 78, 60, 148, 82, 60, 148, 82, 60, + 148, 78, 60, 140, 78, 60, 148, 86, 60, 148, 82, 68, 148, 82, 60, + 148, 82, 60, 140, 78, 60, 148, 82, 60, 148, 78, 60, 148, 78, 60, + 140, 78, 60, 140, 78, 60, 140, 78, 60, 140, 78, 60, 140, 78, 60, + 140, 78, 60, 148, 78, 60, 140, 78, 60, 148, 82, 68, 148, 82, 68, + 148, 86, 68, 156, 82, 68, 148, 82, 68, 148, 82, 68, 148, 82, 68, + 148, 86, 68, 148, 82, 68, 148, 78, 60, 140, 82, 60, 140, 74, 60, + 140, 78, 60, 140, 74, 60, 116, 50, 36, 108, 50, 36, 108, 50, 28, + 108, 42, 28, 108, 42, 20, 108, 42, 20, 108, 42, 20, 116, 46, 28, + 108, 42, 20, 116, 46, 28, 108, 42, 20, 108, 46, 28, 108, 46, 28, + 116, 46, 28, 108, 46, 20, 108, 42, 20, 100, 42, 20, 108, 42, 20, + 108, 42, 28, 108, 42, 20, 116, 46, 28, 116, 46, 28, 116, 46, 28, + 108, 42, 20, 108, 38, 20, 108, 42, 28, 116, 42, 28, 108, 42, 20, + 116, 46, 28, 116, 46, 28, 116, 46, 28, 116, 50, 28, 108, 46, 28, + 116, 46, 28, 108, 42, 20, 108, 42, 28, 116, 42, 28, 108, 46, 28, + 116, 46, 28, 116, 46, 28, 108, 46, 28, 116, 42, 28, 108, 42, 20, + 116, 46, 28, 108, 42, 20, 116, 46, 28, 108, 46, 28, 108, 42, 20, + 116, 42, 28, 108, 38, 20, 108, 42, 28, 116, 46, 28, 108, 46, 28, + 116, 46, 28, 108, 42, 20, 108, 42, 20, 116, 42, 28, 116, 46, 28, + 116, 50, 28, 116, 50, 28, 116, 50, 28, 116, 46, 28, 116, 46, 28, + 116, 46, 28, 116, 50, 28, 116, 46, 28, 116, 50, 36, 124, 50, 36, + 116, 50, 28, 116, 46, 28, 116, 46, 28, 116, 46, 28, 116, 46, 28, + 108, 46, 20, 108, 50, 28, 116, 50, 28, 116, 54, 28, 108, 46, 28, + 108, 46, 20, 108, 42, 20, 108, 42, 20, 116, 50, 28, 116, 46, 28, + 116, 46, 28, 116, 46, 28, 116, 46, 28, 108, 46, 28, 116, 46, 28, + 116, 46, 28, 116, 46, 28, 116, 46, 28, 116, 46, 28, 116, 42, 28, + 116, 46, 28, 116, 46, 28, 116, 50, 28, 124, 50, 36, 124, 58, 36, + 124, 58, 36, 124, 58, 36, 124, 58, 36, 124, 58, 44, 124, 58, 36, + 124, 58, 36, 124, 54, 36, 132, 62, 44, 124, 54, 36, 124, 58, 36, + 124, 58, 36, 124, 58, 36, 124, 54, 44, 124, 58, 36, 132, 62, 44, + 124, 54, 36, 124, 58, 36, 124, 58, 36, 124, 58, 36, 124, 58, 36, + 124, 54, 36, 124, 58, 36, 124, 58, 36, 124, 58, 44, 124, 58, 36, + 124, 58, 44, 124, 54, 36, 124, 58, 44, 124, 58, 36, 124, 58, 44, + 124, 58, 44, 132, 62, 44, 124, 62, 44, 132, 62, 44, 124, 58, 44, + 124, 58, 44, 124, 58, 44, 132, 62, 44, 124, 62, 44, 132, 62, 44, + 124, 62, 44, 124, 62, 44, 124, 58, 36, 124, 58, 36, 124, 62, 44, + 124, 62, 44, 132, 62, 44, 116, 58, 36, 124, 58, 36, 124, 58, 44, + 124, 62, 44, 124, 62, 44, 124, 62, 44, 124, 62, 44, 124, 58, 36, + 124, 62, 44, 124, 58, 36, 124, 62, 44, 132, 62, 44, 124, 62, 44, + 132, 62, 44, 124, 66, 44, 132, 62, 44, 124, 62, 44, 124, 58, 36, + 124, 58, 36, 124, 62, 44, 132, 62, 44, 124, 62, 44, 124, 62, 44, + 124, 58, 36, 124, 62, 44, 124, 58, 36, 124, 58, 36, 124, 58, 44, + 124, 58, 36, 124, 58, 36, 116, 58, 36, 124, 58, 36, 124, 58, 36, + 124, 58, 36, 124, 58, 36, 124, 58, 36, 124, 58, 36, 124, 58, 36, + 124, 58, 36, 124, 58, 36, 124, 50, 36, 124, 54, 36, 124, 54, 36, + 124, 54, 36, 116, 54, 36, 116, 50, 36, 124, 54, 36, 124, 54, 44, + 124, 54, 36, 116, 54, 36, 116, 54, 36, 108, 46, 28, 124, 58, 44, + 124, 58, 44, 100, 42, 20, 108, 50, 28 +}; diff --git a/hacks/glx/escher.c b/hacks/glx/escher.c new file mode 100644 index 00000000..b61b2736 --- /dev/null +++ b/hacks/glx/escher.c @@ -0,0 +1,814 @@ +/* -*- Mode: C; tab-width: 4 -*- + * escher.c - Shows some Escher like scenes + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)escher.c 4.04 97/07/28 xlockmore"; +#endif + +#undef DEBUG_LISTS + +/* 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. + * + * The RotateAroundU() routine was adapted from the book + * "Computer Graphics Principles and Practice + * Foley - vanDam - Feiner - Hughes + * Second Edition" Pag. 227, exercise 5.15. + * + * This mode shows some interesting scenes that are impossible OR very + * wierd to build in the real universe. Much of the scenes are inspirated + * on Mauritz Cornelis Escher's works which derivated the mode's name. + * M.C. Escher (1898-1972) was a dutch artist and many people prefer to + * say he was a mathematician. + * + * Thanks goes 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 + * mistake. + * + * My e-mail addresses are + * vianna@cat.cbpf.br + * and + * marcelo@venus.rdc.puc-rio.br + * + * Marcelo F. Vianna (Jun-01-1997) + * + * Revision History: + * 08-Jun-97: New scene implemented: "Impossible Cage" based in a M.C. Escher's + * painting with the same name (quite similar). The first GL mode + * to use texture mapping. + * The "Impossible Cage" scene doesn't use DEPTH BUFFER, the + * wood planks are drawn consistently using GL_CULL_FACE, and + * the painter's algorithm is used to sort the planks. + * Marcelo F. Vianna. + * 07-Jun-97: Speed ups in Moebius Strip using GL_CULL_FACE. + * Marcelo F. Vianna. + * 03-Jun-97: Initial Release (Only one scene: "Moebius Strip") + * The Moebious Strip scene was inspirated in a M.C. Escher's + * painting named Moebius Strip II in wich ants walk across a + * Moebius Strip path, sometimes meeting each other and sometimes + * being in "opposite faces" (note that the moebius strip has + * only one face and one edge). + * Marcelo F. Vianna. + * + */ + +/*- + * Texture mapping is only available on RGBA contexts, Mono and color index + * visuals DO NOT support texture mapping in OpenGL. + * + * BUT Mesa do implements RGBA contexts in pseudo color visuals, so texture + * mapping shuld work on PseudoColor, DirectColor, TrueColor using Mesa. Mono + * is not officially supported for both OpenGL and Mesa, but seems to not crash + * Mesa. + * + * In real OpenGL, PseudoColor DO NOT support texture map (as far as I know). + */ + +#include + +#ifdef STANDALONE +# define PROGCLASS "Escher" +# define HACK_INIT init_escher +# define HACK_DRAW draw_escher +# define escher_opts xlockmore_opts +# define DEFAULTS "*count: 0 \n" \ + "*cycles: 1 \n" \ + "*delay: 100 \n" \ + "*wireframe: False \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + + +#ifdef USE_GL + + +#include +#include "e_textures.h" + +#define DEF_SOLIDMOEBIUS "False" +#define DEF_NOANTS "False" + +static int solidmoebius; +static int noants; + +static XrmOptionDescRec opts[] = +{ + {"-solidmoebius", ".escher.solidmoebius", XrmoptionNoArg, (caddr_t) "on"}, + {"+solidmoebius", ".escher.solidmoebius", XrmoptionNoArg, (caddr_t) "off"}, + {"-noants", ".escher.noants", XrmoptionNoArg, (caddr_t) "on"}, + {"+noants", ".escher.noants", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & solidmoebius, "solidmoebius", "Solidmoebius", DEF_SOLIDMOEBIUS, t_Bool}, + {(caddr_t *) & noants, "noants", "Noants", DEF_NOANTS, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+solidmoebius", "select between a SOLID or a NET Moebius Strip"}, + {"-/+noants", "turn on/off walking ants"} +}; + +ModeSpecOpt escher_opts = +{4, opts, 2, vars, desc}; + +#define Scale4Window 0.3 +#define Scale4Iconic 0.4 + +#define sqr(A) ((A)*(A)) + +#ifndef Pi +#define Pi M_PI +#endif + +/*************************************************************************/ + +typedef struct { + GLint WindH, WindW; + GLfloat step; + GLfloat ant_position; + int scene; + int AreObjectsDefined[3]; + GLXContext glx_context; +} escherstruct; + +static float front_shininess[] = +{60.0}; +static float front_specular[] = +{0.7, 0.7, 0.7, 1.0}; +static float ambient[] = +{0.0, 0.0, 0.0, 1.0}; +static float diffuse[] = +{1.0, 1.0, 1.0, 1.0}; +static float position0[] = +{1.0, 1.0, 1.0, 0.0}; +static float position1[] = +{-1.0, -1.0, 1.0, 0.0}; +static float lmodel_ambient[] = +{0.5, 0.5, 0.5, 1.0}; +static float lmodel_twoside[] = +{GL_TRUE}; + +static float MaterialRed[] = +{0.7, 0.0, 0.0, 1.0}; +static float MaterialGreen[] = +{0.1, 0.5, 0.2, 1.0}; +static float MaterialBlue[] = +{0.0, 0.0, 0.7, 1.0}; +static float MaterialCyan[] = +{0.2, 0.5, 0.7, 1.0}; +static float MaterialYellow[] = +{0.7, 0.7, 0.0, 1.0}; +static float MaterialMagenta[] = +{0.6, 0.2, 0.5, 1.0}; +static float MaterialWhite[] = +{0.7, 0.7, 0.7, 1.0}; +static float MaterialGray[] = +{0.2, 0.2, 0.2, 1.0}; + +static escherstruct *escher = NULL; +static GLuint objects; + +#define NUM_SCENES 2 + +#define ObjMoebiusStrip 0 +#define ObjAntBody 1 +#define ObjWoodPlank 2 + +#define PlankWidth 3.0 +#define PlankHeight 0.35 +#define PlankThickness 0.15 + +static void +mySphere(float radius) +{ + GLUquadricObj *quadObj; + + quadObj = gluNewQuadric(); + gluQuadricDrawStyle(quadObj, (GLenum) GLU_FILL); + gluSphere(quadObj, radius, 16, 16); + gluDeleteQuadric(quadObj); +} + +static void +myCone(float radius) +{ + GLUquadricObj *quadObj; + + quadObj = gluNewQuadric(); + gluQuadricDrawStyle(quadObj, (GLenum) GLU_FILL); + gluCylinder(quadObj, radius, 0, radius * 3, 8, 1); + gluDeleteQuadric(quadObj); +} + +static void +draw_escher_ant(escherstruct * ep, float *Material) +{ + static float ant_step = 0; + float cos1 = cos(ant_step); + float cos2 = cos(ant_step + 2 * Pi / 3); + float cos3 = cos(ant_step + 4 * Pi / 3); + float sin1 = sin(ant_step); + float sin2 = sin(ant_step + 2 * Pi / 3); + float sin3 = sin(ant_step + 4 * Pi / 3); + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Material); + if (!ep->AreObjectsDefined[ObjAntBody]) { + glNewList(objects + ObjAntBody, GL_COMPILE_AND_EXECUTE); + glEnable(GL_CULL_FACE); + glPushMatrix(); + glScalef(1, 1.3, 1); + mySphere(0.18); + glScalef(1, 1 / 1.3, 1); + glTranslatef(0.00, 0.30, 0.00); + mySphere(0.2); + + glTranslatef(-0.05, 0.17, 0.05); + glRotatef(-90, 1, 0, 0); + glRotatef(-25, 0, 1, 0); + myCone(0.05); + glTranslatef(0.00, 0.10, 0.00); + myCone(0.05); + glRotatef(25, 0, 1, 0); + glRotatef(90, 1, 0, 0); + + glScalef(1, 1.3, 1); + glTranslatef(0.15, -0.65, 0.05); + mySphere(0.25); + glScalef(1, 1 / 1.3, 1); + glPopMatrix(); + glDisable(GL_CULL_FACE); + glEndList(); + ep->AreObjectsDefined[ObjAntBody] = 1; +#ifdef DEBUG_LISTS + (void) printf("Ant drawn SLOWLY\n"); +#endif + } else { + glCallList(objects + ObjAntBody); +#ifdef DEBUG_LISTS + (void) printf("Ant drawn quickly\n"); +#endif + } + + glDisable(GL_LIGHTING); + /* ANTENNAS */ + glBegin(GL_LINES); + glColor3fv(Material); + glVertex3f(0.00, 0.30, 0.00); + glColor3fv(MaterialGray); + glVertex3f(0.40, 0.70, 0.40); + glColor3fv(Material); + glVertex3f(0.00, 0.30, 0.00); + glColor3fv(MaterialGray); + glVertex3f(0.40, 0.70, -0.40); + glEnd(); + glBegin(GL_POINTS); + glColor3fv(MaterialRed); + glVertex3f(0.40, 0.70, 0.40); + glVertex3f(0.40, 0.70, -0.40); + glEnd(); + + /* LEFT-FRONT ARM */ + glBegin(GL_LINE_STRIP); + glColor3fv(Material); + glVertex3f(0.00, 0.05, 0.18); + glVertex3f(0.35 + 0.05 * cos1, 0.15, 0.25); + glColor3fv(MaterialGray); + glVertex3f(-0.20 + 0.05 * cos1, 0.25 + 0.1 * sin1, 0.45); + glEnd(); + + /* LEFT-CENTER ARM */ + glBegin(GL_LINE_STRIP); + glColor3fv(Material); + glVertex3f(0.00, 0.00, 0.18); + glVertex3f(0.35 + 0.05 * cos2, 0.00, 0.25); + glColor3fv(MaterialGray); + glVertex3f(-0.20 + 0.05 * cos2, 0.00 + 0.1 * sin2, 0.45); + glEnd(); + + /* LEFT-BACK ARM */ + glBegin(GL_LINE_STRIP); + glColor3fv(Material); + glVertex3f(0.00, -0.05, 0.18); + glVertex3f(0.35 + 0.05 * cos3, -0.15, 0.25); + glColor3fv(MaterialGray); + glVertex3f(-0.20 + 0.05 * cos3, -0.25 + 0.1 * sin3, 0.45); + glEnd(); + + /* RIGHT-FRONT ARM */ + glBegin(GL_LINE_STRIP); + glColor3fv(Material); + glVertex3f(0.00, 0.05, -0.18); + glVertex3f(0.35 - 0.05 * sin1, 0.15, -0.25); + glColor3fv(MaterialGray); + glVertex3f(-0.20 - 0.05 * sin1, 0.25 + 0.1 * cos1, -0.45); + glEnd(); + + /* RIGHT-CENTER ARM */ + glBegin(GL_LINE_STRIP); + glColor3fv(Material); + glVertex3f(0.00, 0.00, -0.18); + glVertex3f(0.35 - 0.05 * sin2, 0.00, -0.25); + glColor3fv(MaterialGray); + glVertex3f(-0.20 - 0.05 * sin2, 0.00 + 0.1 * cos2, -0.45); + glEnd(); + + /* RIGHT-BACK ARM */ + glBegin(GL_LINE_STRIP); + glColor3fv(Material); + glVertex3f(0.00, -0.05, -0.18); + glVertex3f(0.35 - 0.05 * sin3, -0.15, -0.25); + glColor3fv(MaterialGray); + glVertex3f(-0.20 - 0.05 * sin3, -0.25 + 0.1 * cos3, -0.45); + glEnd(); + + glBegin(GL_POINTS); + glColor3fv(MaterialMagenta); + glVertex3f(-0.20 + 0.05 * cos1, 0.25 + 0.1 * sin1, 0.45); + glVertex3f(-0.20 + 0.05 * cos2, 0.00 + 0.1 * sin2, 0.45); + glVertex3f(-0.20 + 0.05 * cos3, -0.25 + 0.1 * sin3, 0.45); + glVertex3f(-0.20 - 0.05 * sin1, 0.25 + 0.1 * cos1, -0.45); + glVertex3f(-0.20 - 0.05 * sin2, 0.00 + 0.1 * cos2, -0.45); + glVertex3f(-0.20 - 0.05 * sin3, -0.25 + 0.1 * cos3, -0.45); + glEnd(); + + glEnable(GL_LIGHTING); + + ant_step += 0.3; +} + +static void +RotateAaroundU(float Ax, float Ay, float Az, + float Ux, float Uy, float Uz, + float *Cx, float *Cy, float *Cz, + float Theta) +{ + float cosO = cos(Theta); + float sinO = sin(Theta); + float one_cosO = 1 - cosO; + float Ux2 = sqr(Ux); + float Uy2 = sqr(Uy); + float Uz2 = sqr(Uz); + float UxUy = Ux * Uy; + float UxUz = Ux * Uz; + float UyUz = Uy * Uz; + + *Cx = (Ux2 + cosO * (1 - Ux2)) * Ax + (UxUy * one_cosO - Uz * sinO) * Ay + (UxUz * one_cosO + Uy * sinO) * Az; + *Cy = (UxUy * one_cosO + Uz * sinO) * Ax + (Uy2 + cosO * (1 - Uy2)) * Ay + (UyUz * one_cosO - Ux * sinO) * Az; + *Cz = (UxUz * one_cosO - Uy * sinO) * Ax + (UyUz * one_cosO + Ux * sinO) * Ay + (Uz2 + cosO * (1 - Uz2)) * Az; +} + +#define MoebiusDivisions 40 +#define MoebiusTransversals 4 +static void +draw_moebius(ModeInfo * mi) +{ + GLfloat Phi, Theta; + GLfloat cPhi, sPhi; + escherstruct *ep = &escher[MI_SCREEN(mi)]; + int i, j; + + float Cx, Cy, Cz; + + if (!ep->AreObjectsDefined[ObjMoebiusStrip]) { + glNewList(objects + ObjMoebiusStrip, GL_COMPILE_AND_EXECUTE); + + if (solidmoebius) { + glBegin(GL_QUAD_STRIP); + Phi = 0; + i = 0; + while (i < (MoebiusDivisions * 2 + 1)) { + Theta = Phi / 2; + cPhi = cos(Phi); + sPhi = sin(Phi); + + i++; + if (i % 2) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + + RotateAaroundU(cPhi, sPhi, 0, -sPhi, cPhi, 0, &Cx, &Cy, &Cz, Theta); + glNormal3f(Cx, Cy, Cz); + RotateAaroundU(0, 0, 1, -sPhi, cPhi, 0, &Cx, &Cy, &Cz, Theta); + glVertex3f(cPhi * 3 + Cx, sPhi * 3 + Cy, +Cz); + glVertex3f(cPhi * 3 - Cx, sPhi * 3 - Cy, -Cz); + + Phi += Pi / MoebiusDivisions; + } + glEnd(); + } else { + for (j = -MoebiusTransversals; j < MoebiusTransversals; j++) { + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + glBegin(GL_QUAD_STRIP); + Phi = 0; + i = 0; + while (i < (MoebiusDivisions * 2 + 1)) { + Theta = Phi / 2; + cPhi = cos(Phi); + sPhi = sin(Phi); + + RotateAaroundU(cPhi, sPhi, 0, -sPhi, cPhi, 0, &Cx, &Cy, &Cz, Theta); + glNormal3f(Cx, Cy, Cz); + RotateAaroundU(0, 0, 1, -sPhi, cPhi, 0, &Cx, &Cy, &Cz, Theta); + j++; + if (j == MoebiusTransversals) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + else if (i % 2) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + glVertex3f(cPhi * 3 + Cx / MoebiusTransversals * j, sPhi * 3 + Cy / MoebiusTransversals * j, +Cz / MoebiusTransversals * j); + j--; + if (j == -MoebiusTransversals) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + else if (i % 2) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + glVertex3f(cPhi * 3 + Cx / MoebiusTransversals * j, sPhi * 3 + Cy / MoebiusTransversals * j, +Cz / MoebiusTransversals * j); + + Phi += Pi / MoebiusDivisions; + i++; + } + glEnd(); + } + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + } + + glEndList(); + ep->AreObjectsDefined[ObjMoebiusStrip] = 1; +#ifdef DEBUG_LISTS + (void) printf("Strip drawn SLOWLY\n"); +#endif + } else { + glCallList(objects + ObjMoebiusStrip); +#ifdef DEBUG_LISTS + (void) printf("Strip drawn quickly\n"); +#endif + } + + if (!noants) { + /* DRAW BLUE ANT */ + glPushMatrix(); + glRotatef(ep->ant_position + 180, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(ep->ant_position / 2 + 90, 0, 1, 0); + glTranslatef(0.28, 0, -0.45); + draw_escher_ant(ep, MaterialYellow); + glPopMatrix(); + + /* DRAW YELLOW ANT */ + glPushMatrix(); + glRotatef(ep->ant_position, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(ep->ant_position / 2, 0, 1, 0); + glTranslatef(0.28, 0, -0.45); + draw_escher_ant(ep, MaterialBlue); + glPopMatrix(); + + /* DRAW GREEN ANT */ + glPushMatrix(); + glRotatef(-ep->ant_position, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(-ep->ant_position / 2, 0, 1, 0); + glTranslatef(0.28, 0, 0.45); + glRotatef(180, 1, 0, 0); + draw_escher_ant(ep, MaterialGreen); + glPopMatrix(); + + /* DRAW CYAN ANT */ + glPushMatrix(); + glRotatef(-ep->ant_position + 180, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(-ep->ant_position / 2 + 90, 0, 1, 0); + glTranslatef(0.28, 0, 0.45); + glRotatef(180, 1, 0, 0); + draw_escher_ant(ep, MaterialCyan); + glPopMatrix(); + } + ep->ant_position += 1; +} +#undef MoebiusDivisions +#undef MoebiusTransversals + +static void +draw_woodplank(escherstruct * ep) +{ + if (!ep->AreObjectsDefined[ObjWoodPlank]) { + glNewList(objects + ObjWoodPlank, GL_COMPILE_AND_EXECUTE); + glBegin(GL_QUADS); + glNormal3f(0, 0, 1); + glTexCoord2f(0, 0); + glVertex3f(-PlankWidth, -PlankHeight, PlankThickness); + glTexCoord2f(1, 0); + glVertex3f(PlankWidth, -PlankHeight, PlankThickness); + glTexCoord2f(1, 1); + glVertex3f(PlankWidth, PlankHeight, PlankThickness); + glTexCoord2f(0, 1); + glVertex3f(-PlankWidth, PlankHeight, PlankThickness); + glNormal3f(0, 0, -1); + glTexCoord2f(0, 0); + glVertex3f(-PlankWidth, PlankHeight, -PlankThickness); + glTexCoord2f(1, 0); + glVertex3f(PlankWidth, PlankHeight, -PlankThickness); + glTexCoord2f(1, 1); + glVertex3f(PlankWidth, -PlankHeight, -PlankThickness); + glTexCoord2f(0, 1); + glVertex3f(-PlankWidth, -PlankHeight, -PlankThickness); + glNormal3f(0, 1, 0); + glTexCoord2f(0, 0); + glVertex3f(-PlankWidth, PlankHeight, PlankThickness); + glTexCoord2f(1, 0); + glVertex3f(PlankWidth, PlankHeight, PlankThickness); + glTexCoord2f(1, 1); + glVertex3f(PlankWidth, PlankHeight, -PlankThickness); + glTexCoord2f(0, 1); + glVertex3f(-PlankWidth, PlankHeight, -PlankThickness); + glNormal3f(0, -1, 0); + glTexCoord2f(0, 0); + glVertex3f(-PlankWidth, -PlankHeight, -PlankThickness); + glTexCoord2f(1, 0); + glVertex3f(PlankWidth, -PlankHeight, -PlankThickness); + glTexCoord2f(1, 1); + glVertex3f(PlankWidth, -PlankHeight, PlankThickness); + glTexCoord2f(0, 1); + glVertex3f(-PlankWidth, -PlankHeight, PlankThickness); + glNormal3f(1, 0, 0); + glTexCoord2f(0, 0); + glVertex3f(PlankWidth, -PlankHeight, PlankThickness); + glTexCoord2f(1, 0); + glVertex3f(PlankWidth, -PlankHeight, -PlankThickness); + glTexCoord2f(1, 1); + glVertex3f(PlankWidth, PlankHeight, -PlankThickness); + glTexCoord2f(0, 1); + glVertex3f(PlankWidth, PlankHeight, PlankThickness); + glNormal3f(-1, 0, 0); + glTexCoord2f(0, 0); + glVertex3f(-PlankWidth, PlankHeight, PlankThickness); + glTexCoord2f(1, 0); + glVertex3f(-PlankWidth, PlankHeight, -PlankThickness); + glTexCoord2f(1, 1); + glVertex3f(-PlankWidth, -PlankHeight, -PlankThickness); + glTexCoord2f(0, 1); + glVertex3f(-PlankWidth, -PlankHeight, PlankThickness); + glEnd(); + glEndList(); + ep->AreObjectsDefined[ObjWoodPlank] = 1; +#ifdef DEBUG_LISTS + (void) printf("WoodPlank drawn SLOWLY\n"); +#endif + } else { + glCallList(objects + ObjWoodPlank); +#ifdef DEBUG_LISTS + (void) printf("WoodPlank drawn quickly\n"); +#endif + } +} + +static void +draw_impossiblecage(escherstruct * ep) +{ + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankHeight - PlankWidth, -PlankThickness - PlankWidth); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankWidth - PlankThickness); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankWidth - PlankHeight, -PlankThickness - PlankWidth); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankWidth - PlankHeight, 3 * PlankThickness - PlankWidth); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankWidth - PlankThickness); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankWidth - 3 * PlankThickness); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankHeight - PlankWidth, 3 * PlankThickness - PlankWidth); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankThickness - PlankWidth); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankWidth - 3 * PlankThickness); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankWidth + PlankThickness); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankThickness - PlankWidth); + draw_woodplank(ep); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankWidth + PlankThickness); + draw_woodplank(ep); + glPopMatrix(); +} + +void +draw_escher(ModeInfo * mi) +{ + escherstruct *ep = &escher[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + glXMakeCurrent(display, window, ep->glx_context); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + glTranslatef(0.0, 0.0, -10.0); + + if (!MI_WIN_IS_ICONIC(mi)) { + glScalef(Scale4Window * ep->WindH / ep->WindW, Scale4Window, Scale4Window); + } else { + glScalef(Scale4Iconic * ep->WindH / ep->WindW, Scale4Iconic, Scale4Iconic); + } + + + switch (ep->scene) { + case 1: + glRotatef(ep->step * 100, 1, 0, 0); + glRotatef(ep->step * 95, 0, 1, 0); + glRotatef(ep->step * 90, 0, 0, 1); + draw_moebius(mi); + break; + case 2: /* 196 - 213 */ + glRotatef(ep->step * 100, 0, 0, 1); + glRotatef(25 + cos(ep->step * 5) * 6, 1, 0, 0); + glRotatef(204.5 - sin(ep->step * 5) * 8, 0, 1, 0); + draw_impossiblecage(ep); + break; + } + + glPopMatrix(); + + glFlush(); + + glXSwapBuffers(display, window); + + ep->step += 0.025; +} + +static void +reshape(ModeInfo * mi, int width, int height) +{ + escherstruct *ep = &escher[MI_SCREEN(mi)]; + + glViewport(0, 0, ep->WindW = (GLint) width, ep->WindH = (GLint) height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); + glMatrixMode(GL_MODELVIEW); + if (width >= 1024) { + glLineWidth(3); + glPointSize(3); + } else if (width >= 512) { + glLineWidth(2); + glPointSize(2); + } else { + glLineWidth(1); + glPointSize(1); + } + ep->AreObjectsDefined[ObjMoebiusStrip] = 0; + ep->AreObjectsDefined[ObjAntBody] = 0; + ep->AreObjectsDefined[ObjWoodPlank] = 0; +} + +static void +pinit(ModeInfo * mi) +{ + escherstruct *ep = &escher[MI_SCREEN(mi)]; + + glClearDepth(1.0); + glClearColor(0.0, 0.0, 0.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_NORMALIZE); + glFrontFace(GL_CCW); + glCullFace(GL_BACK); + + switch (ep->scene) { + case 1: + glShadeModel(GL_SMOOTH); + glEnable(GL_DEPTH_TEST); + glDisable(GL_TEXTURE_2D); + glDisable(GL_CULL_FACE); + break; + case 2: + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + glShadeModel(GL_FLAT); + glDisable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glEnable(GL_CULL_FACE); + break; + } + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + gluBuild2DMipmaps(GL_TEXTURE_2D, 3, WoodTextureWidth, WoodTextureHeight, + GL_RGB, GL_UNSIGNED_BYTE, WoodTextureData); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular); +} + +void +init_escher(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + escherstruct *ep; + + if (escher == NULL) { + if ((escher = (escherstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (escherstruct))) == NULL) + return; + } + ep = &escher[screen]; + ep->step = NRAND(90); + ep->ant_position = NRAND(90); + + ep->glx_context = init_GL(mi); + + reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + ep->scene = MI_BATCHCOUNT(mi); + if (ep->scene <= 0 || ep->scene > NUM_SCENES) + ep->scene = NRAND(NUM_SCENES) + 1; + glDrawBuffer(GL_BACK); + objects = glGenLists(3); + pinit(mi); + +} + +void +change_escher(ModeInfo * mi) +{ + escherstruct *ep = &escher[MI_SCREEN(mi)]; + + ep->scene = (ep->scene) % NUM_SCENES + 1; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), ep->glx_context); + pinit(mi); +} + +void +release_escher(ModeInfo * mi) +{ + if (escher != NULL) { + (void) free((void *) escher); + escher = NULL; + } + glDeleteLists(objects, 3); +} + +#endif diff --git a/hacks/glx/gears.c b/hacks/glx/gears.c new file mode 100644 index 00000000..db13ab46 --- /dev/null +++ b/hacks/glx/gears.c @@ -0,0 +1,481 @@ +/* -*- Mode: C; tab-width: 4 -*- + * gears.c --- 3D gear wheels + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)gears.c 4.02 97/04/01 xlockmore"; +#endif +/* 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: + * 22-Mar-97: Added support for -mono mode, and monochrome X servers. + * Ed Mackey, emackey@early.com + * 13-Mar-97: Memory leak fix by Tom Schmidt + * 1996: "written" by Danny Sung + * Based on 3-D gear wheels by Brian Paul which is in the public domain. + * + * Brian Paul + */ + +/*- + * PURIFY 3.0a on SunOS4 reports an unitialized memory read on each of + * the glCallList() functions below when using MesaGL 2.1. This has + * been fixed in MesaGL 2.2 and later releases. + */ + +/*- + * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock. + * otherwise caddr_t is not defined correctly + */ + +#include + +#ifdef STANDALONE +# define PROGCLASS "Gears" +# define HACK_INIT init_gears +# define HACK_DRAW draw_gears +# define gears_opts xlockmore_opts +# define DEFAULTS "*count: 1 \n" \ + "*cycles: 2 \n" \ + "*delay: 100 \n" \ + "*wireframe: False \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +ModeSpecOpt gears_opts = { + 0, NULL, 0, NULL, NULL }; + +typedef struct { + GLfloat view_rotx, view_roty, view_rotz; + GLuint gear1, gear2, gear3; + GLfloat angle; + int mono; + GLXContext glx_context; +#if 0 + Window win; +#endif +} gearsstruct; + +static gearsstruct *gears = NULL; + +/* + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * Input: inner_radius - radius of hole at center + * outer_radius - radius at center of teeth + * width - width of gear + * teeth - number of teeth + * tooth_depth - depth of tooth + * wire - true for wireframe mode + */ +static void +gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, + GLint teeth, GLfloat tooth_depth, Bool wire) +{ + GLint i; + GLfloat r0, r1, r2; + GLfloat angle, da; + GLfloat u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0; + r2 = outer_radius + tooth_depth / 2.0; + + da = 2.0 * M_PI / teeth / 4.0; + + glShadeModel(GL_FLAT); + + /* This subroutine got kind of messy when I added all the checks + * for wireframe mode. A much cleaner solution that I sometimes + * use is to have a variable hold the value GL_LINE_LOOP when + * in wireframe mode, or hold the value GL_POLYGON otherwise. + * Then I just call glBegin(that_variable), give my polygon + * coordinates, and glEnd(). Pretty neat eh? Too bad I couldn't + * integrate that trick here. + * --Ed. + */ + + if (!wire) + glNormal3f(0.0, 0.0, 1.0); + + /* draw front face */ + if (!wire) + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + if (wire) + glBegin(GL_LINES); + angle = i * 2.0 * M_PI / teeth; + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); + if (!wire) { + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); + } else { + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); + glVertex3f(r1 * cos(angle + 4 * da), r1 * sin(angle + 4 * da), width * 0.5); + glEnd(); + } + } + if (!wire) + glEnd(); + + /* draw front sides of teeth */ + if (!wire) + glBegin(GL_QUADS); + da = 2.0 * M_PI / teeth / 4.0; + for (i = 0; i < teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + + if (wire) + glBegin(GL_LINE_LOOP); + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); + if (wire) + glEnd(); + } + if (!wire) + glEnd(); + + + if (!wire) + glNormal3f(0.0, 0.0, -1.0); + + /* draw back face */ + if (!wire) + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + if (wire) + glBegin(GL_LINES); + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); + if (!wire) { + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); + } else { + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); + glVertex3f(r1 * cos(angle + 4 * da), r1 * sin(angle + 4 * da), -width * 0.5); + glEnd(); + } + } + if (!wire) + glEnd(); + + /* draw back sides of teeth */ + if (!wire) + glBegin(GL_QUADS); + da = 2.0 * M_PI / teeth / 4.0; + for (i = 0; i < teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + + if (wire) + glBegin(GL_LINE_LOOP); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); + if (wire) + glEnd(); + } + if (!wire) + glEnd(); + + + /* draw outward faces of teeth */ + if (!wire) + glBegin(GL_QUAD_STRIP); + for (i = 0; i < teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + + if (wire) + glBegin(GL_LINES); + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); + u = r2 * cos(angle + da) - r1 * cos(angle); + v = r2 * sin(angle + da) - r1 * sin(angle); + len = sqrt(u * u + v * v); + u /= len; + v /= len; + glNormal3f(v, -u, 0.0); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); + glNormal3f(cos(angle), sin(angle), 0.0); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); + u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); + v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); + glNormal3f(v, -u, 0.0); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); + glNormal3f(cos(angle), sin(angle), 0.0); + if (wire) + glEnd(); + } + + if (!wire) { + glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); + glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); + glEnd(); + } + if (!wire) + glShadeModel(GL_SMOOTH); + + /* draw inside radius cylinder */ + if (!wire) + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + if (wire) + glBegin(GL_LINES); + glNormal3f(-cos(angle), -sin(angle), 0.0); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); + if (wire) { + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); + glVertex3f(r0 * cos(angle + 4 * da), r0 * sin(angle + 4 * da), -width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); + glVertex3f(r0 * cos(angle + 4 * da), r0 * sin(angle + 4 * da), width * 0.5); + glEnd(); + } + } + if (!wire) + glEnd(); + +} + +static void +draw(ModeInfo * mi) +{ + gearsstruct *gp = &gears[MI_SCREEN(mi)]; + int wire = MI_WIN_IS_WIREFRAME(mi) || gp->mono; + + if (!wire) { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + } else { + glClear(GL_COLOR_BUFFER_BIT); + } + + glPushMatrix(); + glRotatef(gp->view_rotx, 1.0, 0.0, 0.0); + glRotatef(gp->view_roty, 0.0, 1.0, 0.0); + glRotatef(gp->view_rotz, 0.0, 0.0, 1.0); + + glPushMatrix(); + glTranslatef(-3.0, -2.0, 0.0); + glRotatef(gp->angle, 0.0, 0.0, 1.0); +/* PURIFY 4.0.1 reports an unitialized memory read on the next line when using + * MesaGL 2.2 and -mono. This has been fixed in MesaGL 2.3 and later. */ + glCallList(gp->gear1); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1, -2.0, 0.0); + glRotatef(-2.0 * gp->angle - 9.0, 0.0, 0.0, 1.0); + glCallList(gp->gear2); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1, 4.2, 0.0); + glRotatef(-2.0 * gp->angle - 25.0, 0.0, 0.0, 1.0); + glCallList(gp->gear3); + glPopMatrix(); + + glPopMatrix(); +} + + + +/* new window size or exposure */ +static void +reshape(int width, int height) +{ + GLfloat h = (GLfloat) height / (GLfloat) width; + + glViewport(0, 0, (GLint) width, (GLint) height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0, 0.0, -40.0); + + /* The depth buffer will be cleared, if needed, before the + * next frame. Right now we just want to black the screen. + */ + glClear(GL_COLOR_BUFFER_BIT); + +} + + +static void +pinit(ModeInfo * mi) +{ + gearsstruct *gp = &gears[MI_SCREEN(mi)]; + static GLfloat pos[4] = + {5.0, 5.0, 10.0, 1.0}; + static GLfloat red[4] = + {0.8, 0.1, 0.0, 1.0}; + static GLfloat green[4] = + {0.0, 0.8, 0.2, 1.0}; + static GLfloat blue[4] = + {0.2, 0.2, 1.0, 1.0}; + int wire = MI_WIN_IS_WIREFRAME(mi) || gp->mono; + + if (!wire) { + glLightfv(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + } +#if 0 +/*- + * Messes up on multiscreen Pseudocolor:0 StaticGray(monochrome):1 + * 2nd time mode is run it is Grayscale on PseudoColor. + * The code below forces monochrome on TrueColor. + */ + if (MI_WIN_IS_MONO(mi)) { + red[0] = red[1] = red[2] = 1.0; + green[0] = green[1] = green[2] = 1.0; + blue[0] = blue[1] = blue[2] = 1.0; + } +#endif + + /* make the gears */ + gp->gear1 = glGenLists(1); + glNewList(gp->gear1, GL_COMPILE); + if (!wire) + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + else + glColor4fv(red); + gear(1.0, 4.0, 1.0, 20, 0.7, wire); + glEndList(); + + gp->gear2 = glGenLists(1); + glNewList(gp->gear2, GL_COMPILE); + if (!wire) + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + else + glColor4fv(green); + gear(0.5, 2.0, 2.0, 10, 0.7, wire); + glEndList(); + + gp->gear3 = glGenLists(1); + glNewList(gp->gear3, GL_COMPILE); + if (!wire) + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + else + glColor4fv(blue); + gear(1.3, 2.0, 0.5, 10, 0.7, wire); + glEndList(); + if (!wire) + glEnable(GL_NORMALIZE); +} + +void +init_gears(ModeInfo * mi) +{ +#if 0 + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + +#endif + int screen = MI_SCREEN(mi); + + /*Colormap cmap; */ + /* Boolean rgba, doublebuffer, cmap_installed; */ + gearsstruct *gp; + + if (gears == NULL) { + if ((gears = (gearsstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (gearsstruct))) == NULL) + return; + } + gp = &gears[screen]; + +#if 0 + gp->win = window; +#endif + gp->view_rotx = NRAND(360); + gp->view_roty = NRAND(360); + gp->view_rotz = NRAND(360); + gp->angle = NRAND(360); + gp->mono = (MI_WIN_IS_MONO(mi) ? 1 : 0); + + gp->glx_context = init_GL(mi); + + reshape(MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + pinit(mi); +} + +void +draw_gears(ModeInfo * mi) +{ + gearsstruct *gp = &gears[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int angle_incr = MI_CYCLES(mi) ? MI_CYCLES(mi) : 2; + int rot_incr = MI_BATCHCOUNT(mi) ? MI_BATCHCOUNT(mi) : 1; + + glDrawBuffer(GL_BACK); + + glXMakeCurrent(display, window, gp->glx_context); + draw(mi); + + /* let's do something so we don't get bored */ + gp->angle = (int) (gp->angle + angle_incr) % 360; + gp->view_rotx = (int) (gp->view_rotx + rot_incr) % 360; + gp->view_roty = (int) (gp->view_roty + rot_incr) % 360; + gp->view_rotz = (int) (gp->view_rotz + rot_incr) % 360; + + glFinish(); + glXSwapBuffers(display, window); +} + +void +release_gears(ModeInfo * mi) +{ + if (gears != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + gearsstruct *gp = &gears[screen]; + + /* Display lists MUST be freed while their glXContext is current. */ + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), gp->glx_context); + + if (glIsList(gp->gear1)) + glDeleteLists(gp->gear1, 1); + if (glIsList(gp->gear2)) + glDeleteLists(gp->gear2, 1); + if (glIsList(gp->gear3)) + glDeleteLists(gp->gear3, 1); + + /* Don't destroy the glXContext. init_GL does that. */ + + } + (void) free((void *) gears); + gears = NULL; + } +} + + +/*********************************************************/ + +#endif diff --git a/hacks/glx/morph3d.c b/hacks/glx/morph3d.c new file mode 100644 index 00000000..99316b07 --- /dev/null +++ b/hacks/glx/morph3d.c @@ -0,0 +1,860 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)morph3d.c 4.02 97/04/01 xlockmore"; + +#endif + +#undef DEBUG_CULL_FACE + +/*- + * morph3d.c - Shows 3D morphing objects (XLock Version) + * + * See xlock.c for copying information. + * + * The original code for this mode was written by Marcelo Fernandes Vianna + * (me...) and was inspired on a WindowsNT(R)'s screen saver. It was written + * from scratch and it was not based on any other source code. + * + * Porting it to xlock (the final objective of this code since the moment I + * decided to create it) was possible by comparing the original Mesa's gear + * demo with it's ported version to xlock, so thanks for Danny Sung (look at + * gear.c) for his indirect help. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * If you are interested in the original version of this program (not a xlock + * mode, please refer to the Mesa package (ftp iris.ssec.wisc.edu on /pub/Mesa) + * + * Since I'm not a native english speaker, my apologies for any gramatical + * mistake. + * + * My e-mail addresses are + * vianna@cat.cbpf.br + * and + * marcelo@venus.rdc.puc-rio.br + * + * Marcelo F. Vianna (Feb-13-1997) + * + * Revision History: + * 27-Jul-97: Speed ups by Marcelo F. Vianna. + * 08-May-97: Speed ups by Marcelo F. Vianna. + * + */ + +/*- + * PURIFY 3.0a on SunOS4 reports an unitialized memory read on each of + * the glCallList() functions below when using MesaGL 2.1. This has + * been fixed in MesaGL 2.2 and later releases. + */ + +/*- + * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock. + * otherwise caddr_t is not defined correctly + */ + +#include + +#ifdef STANDALONE +# define PROGCLASS "Morph3d" +# define HACK_INIT init_morph3d +# define HACK_DRAW draw_morph3d +# define morph3d_opts xlockmore_opts +# define DEFAULTS "*delay: 1000 \n" \ + "*count: 0 \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +ModeSpecOpt morph3d_opts = +{0, NULL, 0, NULL, NULL}; + +#define Scale4Window 0.3 +#define Scale4Iconic 1.0 + +#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)) + +/* Increasing this values produces better image quality, the price is speed. */ +#define tetradivisions 23 +#define cubedivisions 20 +#define octadivisions 21 +#define dodecadivisions 10 +#define icodivisions 15 + +#define tetraangle 109.47122063449069174 +#define cubeangle 90.000000000000000000 +#define octaangle 109.47122063449069174 +#define dodecaangle 63.434948822922009981 +#define icoangle 41.810314895778596167 + +#ifndef Pi +#define Pi M_PI +#endif +#define SQRT2 1.4142135623730951455 +#define SQRT3 1.7320508075688771932 +#define SQRT5 2.2360679774997898051 +#define SQRT6 2.4494897427831778813 +#define SQRT15 3.8729833462074170214 +#define cossec36_2 0.8506508083520399322 +#define cos72 0.3090169943749474241 +#define sin72 0.9510565162951535721 +#define cos36 0.8090169943749474241 +#define sin36 0.5877852522924731292 + +/*************************************************************************/ + +typedef struct { + GLint WindH, WindW; + GLfloat step; + GLfloat seno; + int object; + int edgedivisions; + int VisibleSpikes; + void (*draw_object) (ModeInfo * mi); + float Magnitude; + float *MaterialColor[20]; + GLXContext glx_context; +} morph3dstruct; + +static float front_shininess[] = +{60.0}; +static float front_specular[] = +{0.7, 0.7, 0.7, 1.0}; +static float ambient[] = +{0.0, 0.0, 0.0, 1.0}; +static float diffuse[] = +{1.0, 1.0, 1.0, 1.0}; +static float position0[] = +{1.0, 1.0, 1.0, 0.0}; +static float position1[] = +{-1.0, -1.0, 1.0, 0.0}; +static float lmodel_ambient[] = +{0.5, 0.5, 0.5, 1.0}; +static float lmodel_twoside[] = +{GL_TRUE}; + +static float MaterialRed[] = +{0.7, 0.0, 0.0, 1.0}; +static float MaterialGreen[] = +{0.1, 0.5, 0.2, 1.0}; +static float MaterialBlue[] = +{0.0, 0.0, 0.7, 1.0}; +static float MaterialCyan[] = +{0.2, 0.5, 0.7, 1.0}; +static float MaterialYellow[] = +{0.7, 0.7, 0.0, 1.0}; +static float MaterialMagenta[] = +{0.6, 0.2, 0.5, 1.0}; +static float MaterialWhite[] = +{0.7, 0.7, 0.7, 1.0}; +static float MaterialGray[] = +{0.2, 0.2, 0.2, 1.0}; + +static morph3dstruct *morph3d = NULL; + +#define TRIANGLE(Edge, Amp, Divisions, Z, VS) \ +{ \ + GLfloat Xf,Yf,Xa,Yb,Xf2,Yf2,Yf_2,Yb2,Yb_2; \ + GLfloat Factor=0.0,Factor1,Factor2; \ + GLfloat VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ; \ + GLfloat Ax,Ay; \ + int Ri,Ti; \ + GLfloat Vr=(Edge)*SQRT3/3; \ + GLfloat AmpVr2=(Amp)/sqr(Vr); \ + GLfloat Zf=(Edge)*(Z); \ + \ + Ax=(Edge)*(+0.5/(Divisions)), Ay=(Edge)*(-SQRT3/(2*Divisions)); \ + \ + Yf=Vr+Ay; Yb=Yf+0.001; \ + for (Ri=1; Ri<=(Divisions); Ri++) { \ + glBegin(GL_TRIANGLE_STRIP); \ + Xf=(float)Ri*Ax; Xa=Xf+0.001; \ + Yf2=sqr(Yf); Yf_2=sqr(Yf-Ay); \ + Yb2=sqr(Yb); Yb_2=sqr(Yb-Ay); \ + for (Ti=0; TiMaterialColor[0]); + + list = glGenLists(1); + glNewList(list, GL_COMPILE_AND_EXECUTE); + TRIANGLE(2, mp->seno, mp->edgedivisions, 0.5 / SQRT6, mp->VisibleSpikes); + glEndList(); + + glPushMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-tetraangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[1]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + tetraangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[2]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + tetraangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[3]); + glCallList(list); + + glDeleteLists(list, 1); +} + +static void +draw_cube(ModeInfo * mi) +{ + GLuint list; + + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[0]); + + list = glGenLists(1); + glNewList(list, GL_COMPILE_AND_EXECUTE); + SQUARE(2, mp->seno, mp->edgedivisions, 0.5, mp->VisibleSpikes) + glEndList(); + + glRotatef(cubeangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[1]); + glCallList(list); + glRotatef(cubeangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[2]); + glCallList(list); + glRotatef(cubeangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[3]); + glCallList(list); + glRotatef(cubeangle, 0, 1, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[4]); + glCallList(list); + glRotatef(2 * cubeangle, 0, 1, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[5]); + glCallList(list); + + glDeleteLists(list, 1); +} + +static void +draw_octa(ModeInfo * mi) +{ + GLuint list; + + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[0]); + + list = glGenLists(1); + glNewList(list, GL_COMPILE_AND_EXECUTE); + TRIANGLE(2, mp->seno, mp->edgedivisions, 1 / SQRT6, mp->VisibleSpikes); + glEndList(); + + glPushMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-180 + octaangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[1]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-octaangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[2]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-octaangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[3]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[4]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-180 + octaangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[5]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-octaangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[6]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-octaangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[7]); + glCallList(list); + + glDeleteLists(list, 1); +} + +static void +draw_dodeca(ModeInfo * mi) +{ + GLuint list; + + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + +#define TAU ((SQRT5+1)/2) + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[0]); + + list = glGenLists(1); + glNewList(list, GL_COMPILE_AND_EXECUTE); + PENTAGON(1, mp->seno, mp->edgedivisions, sqr(TAU) * sqrt((TAU + 2) / 5) / 2, mp->VisibleSpikes); + glEndList(); + + glPushMatrix(); + glRotatef(180, 0, 0, 1); + glPushMatrix(); + glRotatef(-dodecaangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[1]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(-dodecaangle, cos72, sin72, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[2]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(-dodecaangle, cos72, -sin72, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[3]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(dodecaangle, cos36, -sin36, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[4]); + glCallList(list); + glPopMatrix(); + glRotatef(dodecaangle, cos36, sin36, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[5]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[6]); + glCallList(list); + glRotatef(180, 0, 0, 1); + glPushMatrix(); + glRotatef(-dodecaangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[7]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(-dodecaangle, cos72, sin72, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[8]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(-dodecaangle, cos72, -sin72, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[9]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(dodecaangle, cos36, -sin36, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[10]); + glCallList(list); + glPopMatrix(); + glRotatef(dodecaangle, cos36, sin36, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[11]); + glCallList(list); + + glDeleteLists(list, 1); +} + +static void +draw_icosa(ModeInfo * mi) +{ + GLuint list; + + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[0]); + + list = glGenLists(1); + glNewList(list, GL_COMPILE_AND_EXECUTE); + TRIANGLE(1.5, mp->seno, mp->edgedivisions, (3 * SQRT3 + SQRT15) / 12, mp->VisibleSpikes); + glEndList(); + + glPushMatrix(); + + glPushMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-icoangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[1]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[2]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[3]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[4]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[5]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-icoangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[6]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[7]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[8]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-icoangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[9]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[10]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-icoangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[11]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[12]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[13]); + glCallList(list); + glPopMatrix(); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[14]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[15]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-icoangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[16]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[17]); + glCallList(list); + glPushMatrix(); + glRotatef(180, 0, 1, 0); + glRotatef(-180 + icoangle, 0.5, -SQRT3 / 2, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[18]); + glCallList(list); + glPopMatrix(); + glRotatef(180, 0, 0, 1); + glRotatef(-icoangle, 1, 0, 0); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mp->MaterialColor[19]); + glCallList(list); + + glDeleteLists(list, 1); +} + +void +draw_morph3d(ModeInfo * mi) +{ + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + glDrawBuffer(GL_BACK); + glXMakeCurrent(display, window, mp->glx_context); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + glTranslatef(0.0, 0.0, -10.0); + + if (!MI_WIN_IS_ICONIC(mi)) { + glScalef(Scale4Window * mp->WindH / mp->WindW, Scale4Window, Scale4Window); + glTranslatef(2.5 * mp->WindW / mp->WindH * sin(mp->step * 1.11), 2.5 * cos(mp->step * 1.25 * 1.11), 0); + } else { + glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic); + } + + glRotatef(mp->step * 100, 1, 0, 0); + glRotatef(mp->step * 95, 0, 1, 0); + glRotatef(mp->step * 90, 0, 0, 1); + + mp->seno = (sin(mp->step) + 1.0 / 3.0) * (4.0 / 5.0) * mp->Magnitude; + + if (mp->VisibleSpikes) { +#ifdef DEBUG_CULL_FACE + int loop; + + for (loop = 0; loop < 20; loop++) + mp->MaterialColor[loop] = MaterialGray; +#endif + glDisable(GL_CULL_FACE); + } else { +#ifdef DEBUG_CULL_FACE + int loop; + + for (loop = 0; loop < 20; loop++) + mp->MaterialColor[loop] = MaterialWhite; +#endif + glEnable(GL_CULL_FACE); + } + + mp->draw_object(mi); + + glPopMatrix(); + + glFlush(); + + glXSwapBuffers(display, window); + + mp->step += 0.05; +} + +static void +reshape(ModeInfo * mi, int width, int height) +{ + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + glViewport(0, 0, mp->WindW = (GLint) width, mp->WindH = (GLint) height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); + glMatrixMode(GL_MODELVIEW); +} + +static void +pinit(ModeInfo * mi) +{ + morph3dstruct *mp = &morph3d[MI_SCREEN(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); + + glShadeModel(GL_SMOOTH); + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular); + + switch (mp->object) { + case 2: + mp->draw_object = draw_cube; + mp->MaterialColor[0] = MaterialRed; + mp->MaterialColor[1] = MaterialGreen; + mp->MaterialColor[2] = MaterialCyan; + mp->MaterialColor[3] = MaterialMagenta; + mp->MaterialColor[4] = MaterialYellow; + mp->MaterialColor[5] = MaterialBlue; + mp->edgedivisions = cubedivisions; + mp->Magnitude = 2.0; + break; + case 3: + mp->draw_object = draw_octa; + mp->MaterialColor[0] = MaterialRed; + mp->MaterialColor[1] = MaterialGreen; + mp->MaterialColor[2] = MaterialBlue; + mp->MaterialColor[3] = MaterialWhite; + mp->MaterialColor[4] = MaterialCyan; + mp->MaterialColor[5] = MaterialMagenta; + mp->MaterialColor[6] = MaterialGray; + mp->MaterialColor[7] = MaterialYellow; + mp->edgedivisions = octadivisions; + mp->Magnitude = 2.5; + break; + case 4: + mp->draw_object = draw_dodeca; + mp->MaterialColor[0] = MaterialRed; + mp->MaterialColor[1] = MaterialGreen; + mp->MaterialColor[2] = MaterialCyan; + mp->MaterialColor[3] = MaterialBlue; + mp->MaterialColor[4] = MaterialMagenta; + mp->MaterialColor[5] = MaterialYellow; + mp->MaterialColor[6] = MaterialGreen; + mp->MaterialColor[7] = MaterialCyan; + mp->MaterialColor[8] = MaterialRed; + mp->MaterialColor[9] = MaterialMagenta; + mp->MaterialColor[10] = MaterialBlue; + mp->MaterialColor[11] = MaterialYellow; + mp->edgedivisions = dodecadivisions; + mp->Magnitude = 2.0; + break; + case 5: + mp->draw_object = draw_icosa; + mp->MaterialColor[0] = MaterialRed; + mp->MaterialColor[1] = MaterialGreen; + mp->MaterialColor[2] = MaterialBlue; + mp->MaterialColor[3] = MaterialCyan; + mp->MaterialColor[4] = MaterialYellow; + mp->MaterialColor[5] = MaterialMagenta; + mp->MaterialColor[6] = MaterialRed; + mp->MaterialColor[7] = MaterialGreen; + mp->MaterialColor[8] = MaterialBlue; + mp->MaterialColor[9] = MaterialWhite; + mp->MaterialColor[10] = MaterialCyan; + mp->MaterialColor[11] = MaterialYellow; + mp->MaterialColor[12] = MaterialMagenta; + mp->MaterialColor[13] = MaterialRed; + mp->MaterialColor[14] = MaterialGreen; + mp->MaterialColor[15] = MaterialBlue; + mp->MaterialColor[16] = MaterialCyan; + mp->MaterialColor[17] = MaterialYellow; + mp->MaterialColor[18] = MaterialMagenta; + mp->MaterialColor[19] = MaterialGray; + mp->edgedivisions = icodivisions; + mp->Magnitude = 2.5; + break; + default: + mp->draw_object = draw_tetra; + mp->MaterialColor[0] = MaterialRed; + mp->MaterialColor[1] = MaterialGreen; + mp->MaterialColor[2] = MaterialBlue; + mp->MaterialColor[3] = MaterialWhite; + mp->edgedivisions = tetradivisions; + mp->Magnitude = 2.5; + break; + } + if (MI_WIN_IS_MONO(mi)) { + int loop; + + for (loop = 0; loop < 20; loop++) + mp->MaterialColor[loop] = MaterialGray; + } +} + +void +init_morph3d(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + morph3dstruct *mp; + + if (morph3d == NULL) { + if ((morph3d = (morph3dstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (morph3dstruct))) == NULL) + return; + } + mp = &morph3d[screen]; + mp->step = NRAND(90); + mp->VisibleSpikes = 1; + + mp->glx_context = init_GL(mi); + + reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + mp->object = MI_BATCHCOUNT(mi); + if (mp->object <= 0 || mp->object > 5) + mp->object = NRAND(5) + 1; + pinit(mi); +} + +void +change_morph3d(ModeInfo * mi) +{ + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + mp->object = (mp->object) % 5 + 1; + pinit(mi); +} + +void +release_morph3d(ModeInfo * mi) +{ + if (morph3d != NULL) { + (void) free((void *) morph3d); + morph3d = NULL; + } +} + +#endif diff --git a/hacks/glx/pipeobjs.c b/hacks/glx/pipeobjs.c new file mode 100644 index 00000000..28d9e6a2 --- /dev/null +++ b/hacks/glx/pipeobjs.c @@ -0,0 +1,3267 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)pipeobjs.c 4.2 97/04/27 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render objects for pipes. + * + * Generated by lw2ogl. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat BigValve_PNTS[] = +{ + (GLfloat) 0.756788, (GLfloat) 0.614672, (GLfloat) - 0.000000, + (GLfloat) 0.779498, (GLfloat) 0.599497, (GLfloat) - 0.000000, + (GLfloat) 0.794672, (GLfloat) 0.576788, (GLfloat) - 0.000000, + (GLfloat) 0.800000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) 0.794672, (GLfloat) 0.523212, (GLfloat) - 0.000000, + (GLfloat) 0.779498, (GLfloat) 0.500503, (GLfloat) - 0.000000, + (GLfloat) 0.756788, (GLfloat) 0.485328, (GLfloat) - 0.000000, + (GLfloat) 0.730000, (GLfloat) 0.480000, (GLfloat) - 0.000000, + (GLfloat) 0.703212, (GLfloat) 0.485328, (GLfloat) - 0.000000, + (GLfloat) 0.680503, (GLfloat) 0.500503, (GLfloat) - 0.000000, + (GLfloat) 0.665328, (GLfloat) 0.523212, (GLfloat) - 0.000000, + (GLfloat) 0.660000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) 0.665328, (GLfloat) 0.576788, (GLfloat) - 0.000000, + (GLfloat) 0.680503, (GLfloat) 0.599497, (GLfloat) - 0.000000, + (GLfloat) 0.703212, (GLfloat) 0.614672, (GLfloat) - 0.000000, + (GLfloat) 0.730000, (GLfloat) 0.620000, (GLfloat) - 0.000000, + (GLfloat) 0.756788, (GLfloat) 0.602861, (GLfloat) 0.119916, + (GLfloat) 0.779498, (GLfloat) 0.587978, (GLfloat) 0.116956, + (GLfloat) 0.794672, (GLfloat) 0.565705, (GLfloat) 0.112526, + (GLfloat) 0.800000, (GLfloat) 0.539432, (GLfloat) 0.107300, + (GLfloat) 0.794672, (GLfloat) 0.513159, (GLfloat) 0.102074, + (GLfloat) 0.779498, (GLfloat) 0.490886, (GLfloat) 0.097643, + (GLfloat) 0.756788, (GLfloat) 0.476003, (GLfloat) 0.094683, + (GLfloat) 0.730000, (GLfloat) 0.470777, (GLfloat) 0.093643, + (GLfloat) 0.703212, (GLfloat) 0.476003, (GLfloat) 0.094683, + (GLfloat) 0.680503, (GLfloat) 0.490886, (GLfloat) 0.097643, + (GLfloat) 0.665328, (GLfloat) 0.513159, (GLfloat) 0.102074, + (GLfloat) 0.660000, (GLfloat) 0.539432, (GLfloat) 0.107300, + (GLfloat) 0.665328, (GLfloat) 0.565705, (GLfloat) 0.112526, + (GLfloat) 0.680503, (GLfloat) 0.587978, (GLfloat) 0.116956, + (GLfloat) 0.703212, (GLfloat) 0.602861, (GLfloat) 0.119916, + (GLfloat) 0.730000, (GLfloat) 0.608087, (GLfloat) 0.120956, + (GLfloat) 0.756788, (GLfloat) 0.567882, (GLfloat) 0.235225, + (GLfloat) 0.779498, (GLfloat) 0.553863, (GLfloat) 0.229418, + (GLfloat) 0.794672, (GLfloat) 0.532882, (GLfloat) 0.220727, + (GLfloat) 0.800000, (GLfloat) 0.508134, (GLfloat) 0.210476, + (GLfloat) 0.794672, (GLfloat) 0.483385, (GLfloat) 0.200225, + (GLfloat) 0.779498, (GLfloat) 0.462404, (GLfloat) 0.191534, + (GLfloat) 0.756788, (GLfloat) 0.448385, (GLfloat) 0.185727, + (GLfloat) 0.730000, (GLfloat) 0.443462, (GLfloat) 0.183688, + (GLfloat) 0.703212, (GLfloat) 0.448385, (GLfloat) 0.185727, + (GLfloat) 0.680503, (GLfloat) 0.462404, (GLfloat) 0.191534, + (GLfloat) 0.665328, (GLfloat) 0.483385, (GLfloat) 0.200225, + (GLfloat) 0.660000, (GLfloat) 0.508134, (GLfloat) 0.210476, + (GLfloat) 0.665328, (GLfloat) 0.532882, (GLfloat) 0.220727, + (GLfloat) 0.680503, (GLfloat) 0.553863, (GLfloat) 0.229418, + (GLfloat) 0.703212, (GLfloat) 0.567882, (GLfloat) 0.235225, + (GLfloat) 0.730000, (GLfloat) 0.572805, (GLfloat) 0.237264, + (GLfloat) 0.756788, (GLfloat) 0.511081, (GLfloat) 0.341493, + (GLfloat) 0.779498, (GLfloat) 0.498464, (GLfloat) 0.333063, + (GLfloat) 0.794672, (GLfloat) 0.479582, (GLfloat) 0.320446, + (GLfloat) 0.800000, (GLfloat) 0.457308, (GLfloat) 0.305564, + (GLfloat) 0.794672, (GLfloat) 0.435035, (GLfloat) 0.290681, + (GLfloat) 0.779498, (GLfloat) 0.416153, (GLfloat) 0.278064, + (GLfloat) 0.756788, (GLfloat) 0.403536, (GLfloat) 0.269634, + (GLfloat) 0.730000, (GLfloat) 0.399105, (GLfloat) 0.266674, + (GLfloat) 0.703212, (GLfloat) 0.403536, (GLfloat) 0.269634, + (GLfloat) 0.680503, (GLfloat) 0.416153, (GLfloat) 0.278064, + (GLfloat) 0.665328, (GLfloat) 0.435035, (GLfloat) 0.290681, + (GLfloat) 0.660000, (GLfloat) 0.457308, (GLfloat) 0.305564, + (GLfloat) 0.665328, (GLfloat) 0.479582, (GLfloat) 0.320446, + (GLfloat) 0.680503, (GLfloat) 0.498464, (GLfloat) 0.333063, + (GLfloat) 0.703212, (GLfloat) 0.511081, (GLfloat) 0.341493, + (GLfloat) 0.730000, (GLfloat) 0.515511, (GLfloat) 0.344454, + (GLfloat) 0.756788, (GLfloat) 0.434638, (GLfloat) 0.434638, + (GLfloat) 0.779498, (GLfloat) 0.423909, (GLfloat) 0.423909, + (GLfloat) 0.794672, (GLfloat) 0.407851, (GLfloat) 0.407851, + (GLfloat) 0.800000, (GLfloat) 0.388909, (GLfloat) 0.388909, + (GLfloat) 0.794672, (GLfloat) 0.369967, (GLfloat) 0.369967, + (GLfloat) 0.779498, (GLfloat) 0.353909, (GLfloat) 0.353909, + (GLfloat) 0.756788, (GLfloat) 0.343179, (GLfloat) 0.343179, + (GLfloat) 0.730000, (GLfloat) 0.339411, (GLfloat) 0.339411, + (GLfloat) 0.703212, (GLfloat) 0.343179, (GLfloat) 0.343179, + (GLfloat) 0.680503, (GLfloat) 0.353909, (GLfloat) 0.353909, + (GLfloat) 0.665328, (GLfloat) 0.369967, (GLfloat) 0.369967, + (GLfloat) 0.660000, (GLfloat) 0.388909, (GLfloat) 0.388909, + (GLfloat) 0.665328, (GLfloat) 0.407851, (GLfloat) 0.407851, + (GLfloat) 0.680503, (GLfloat) 0.423909, (GLfloat) 0.423909, + (GLfloat) 0.703212, (GLfloat) 0.434638, (GLfloat) 0.434638, + (GLfloat) 0.730000, (GLfloat) 0.438406, (GLfloat) 0.438406, + (GLfloat) 0.756788, (GLfloat) 0.341493, (GLfloat) 0.511081, + (GLfloat) 0.779498, (GLfloat) 0.333063, (GLfloat) 0.498464, + (GLfloat) 0.794672, (GLfloat) 0.320446, (GLfloat) 0.479582, + (GLfloat) 0.800000, (GLfloat) 0.305564, (GLfloat) 0.457308, + (GLfloat) 0.794672, (GLfloat) 0.290681, (GLfloat) 0.435035, + (GLfloat) 0.779498, (GLfloat) 0.278064, (GLfloat) 0.416153, + (GLfloat) 0.756788, (GLfloat) 0.269634, (GLfloat) 0.403536, + (GLfloat) 0.730000, (GLfloat) 0.266674, (GLfloat) 0.399105, + (GLfloat) 0.703212, (GLfloat) 0.269634, (GLfloat) 0.403536, + (GLfloat) 0.680503, (GLfloat) 0.278064, (GLfloat) 0.416153, + (GLfloat) 0.665328, (GLfloat) 0.290681, (GLfloat) 0.435035, + (GLfloat) 0.660000, (GLfloat) 0.305564, (GLfloat) 0.457308, + (GLfloat) 0.665328, (GLfloat) 0.320446, (GLfloat) 0.479582, + (GLfloat) 0.680503, (GLfloat) 0.333063, (GLfloat) 0.498464, + (GLfloat) 0.703212, (GLfloat) 0.341493, (GLfloat) 0.511081, + (GLfloat) 0.730000, (GLfloat) 0.344454, (GLfloat) 0.515511, + (GLfloat) 0.756788, (GLfloat) 0.235225, (GLfloat) 0.567882, + (GLfloat) 0.779498, (GLfloat) 0.229418, (GLfloat) 0.553863, + (GLfloat) 0.794672, (GLfloat) 0.220727, (GLfloat) 0.532882, + (GLfloat) 0.800000, (GLfloat) 0.210476, (GLfloat) 0.508134, + (GLfloat) 0.794672, (GLfloat) 0.200225, (GLfloat) 0.483385, + (GLfloat) 0.779498, (GLfloat) 0.191534, (GLfloat) 0.462404, + (GLfloat) 0.756788, (GLfloat) 0.185727, (GLfloat) 0.448385, + (GLfloat) 0.730000, (GLfloat) 0.183688, (GLfloat) 0.443462, + (GLfloat) 0.703212, (GLfloat) 0.185727, (GLfloat) 0.448385, + (GLfloat) 0.680503, (GLfloat) 0.191534, (GLfloat) 0.462404, + (GLfloat) 0.665328, (GLfloat) 0.200225, (GLfloat) 0.483385, + (GLfloat) 0.660000, (GLfloat) 0.210476, (GLfloat) 0.508134, + (GLfloat) 0.665328, (GLfloat) 0.220727, (GLfloat) 0.532882, + (GLfloat) 0.680503, (GLfloat) 0.229418, (GLfloat) 0.553863, + (GLfloat) 0.703212, (GLfloat) 0.235225, (GLfloat) 0.567882, + (GLfloat) 0.730000, (GLfloat) 0.237264, (GLfloat) 0.572805, + (GLfloat) 0.756788, (GLfloat) 0.119916, (GLfloat) 0.602861, + (GLfloat) 0.779498, (GLfloat) 0.116956, (GLfloat) 0.587978, + (GLfloat) 0.794672, (GLfloat) 0.112526, (GLfloat) 0.565705, + (GLfloat) 0.800000, (GLfloat) 0.107300, (GLfloat) 0.539432, + (GLfloat) 0.794672, (GLfloat) 0.102074, (GLfloat) 0.513159, + (GLfloat) 0.779498, (GLfloat) 0.097643, (GLfloat) 0.490886, + (GLfloat) 0.756788, (GLfloat) 0.094683, (GLfloat) 0.476003, + (GLfloat) 0.730000, (GLfloat) 0.093643, (GLfloat) 0.470777, + (GLfloat) 0.703212, (GLfloat) 0.094683, (GLfloat) 0.476003, + (GLfloat) 0.680503, (GLfloat) 0.097643, (GLfloat) 0.490886, + (GLfloat) 0.665328, (GLfloat) 0.102074, (GLfloat) 0.513159, + (GLfloat) 0.660000, (GLfloat) 0.107300, (GLfloat) 0.539432, + (GLfloat) 0.665328, (GLfloat) 0.112526, (GLfloat) 0.565705, + (GLfloat) 0.680503, (GLfloat) 0.116956, (GLfloat) 0.587978, + (GLfloat) 0.703212, (GLfloat) 0.119916, (GLfloat) 0.602861, + (GLfloat) 0.730000, (GLfloat) 0.120956, (GLfloat) 0.608087, + (GLfloat) 0.756788, (GLfloat) 0.000000, (GLfloat) 0.614672, + (GLfloat) 0.779498, (GLfloat) 0.000000, (GLfloat) 0.599497, + (GLfloat) 0.794672, (GLfloat) 0.000000, (GLfloat) 0.576788, + (GLfloat) 0.800000, (GLfloat) 0.000000, (GLfloat) 0.550000, + (GLfloat) 0.794672, (GLfloat) 0.000000, (GLfloat) 0.523212, + (GLfloat) 0.779498, (GLfloat) 0.000000, (GLfloat) 0.500503, + (GLfloat) 0.756788, (GLfloat) 0.000000, (GLfloat) 0.485328, + (GLfloat) 0.730000, (GLfloat) 0.000000, (GLfloat) 0.480000, + (GLfloat) 0.703212, (GLfloat) 0.000000, (GLfloat) 0.485328, + (GLfloat) 0.680503, (GLfloat) 0.000000, (GLfloat) 0.500503, + (GLfloat) 0.665328, (GLfloat) 0.000000, (GLfloat) 0.523212, + (GLfloat) 0.660000, (GLfloat) 0.000000, (GLfloat) 0.550000, + (GLfloat) 0.665328, (GLfloat) 0.000000, (GLfloat) 0.576788, + (GLfloat) 0.680503, (GLfloat) 0.000000, (GLfloat) 0.599497, + (GLfloat) 0.703212, (GLfloat) 0.000000, (GLfloat) 0.614672, + (GLfloat) 0.730000, (GLfloat) 0.000000, (GLfloat) 0.620000, + (GLfloat) 0.756788, (GLfloat) - 0.119916, (GLfloat) 0.602861, + (GLfloat) 0.779498, (GLfloat) - 0.116956, (GLfloat) 0.587978, + (GLfloat) 0.794672, (GLfloat) - 0.112526, (GLfloat) 0.565705, + (GLfloat) 0.800000, (GLfloat) - 0.107300, (GLfloat) 0.539432, + (GLfloat) 0.794672, (GLfloat) - 0.102074, (GLfloat) 0.513159, + (GLfloat) 0.779498, (GLfloat) - 0.097643, (GLfloat) 0.490886, + (GLfloat) 0.756788, (GLfloat) - 0.094683, (GLfloat) 0.476003, + (GLfloat) 0.730000, (GLfloat) - 0.093643, (GLfloat) 0.470777, + (GLfloat) 0.703212, (GLfloat) - 0.094683, (GLfloat) 0.476003, + (GLfloat) 0.680503, (GLfloat) - 0.097643, (GLfloat) 0.490886, + (GLfloat) 0.665328, (GLfloat) - 0.102074, (GLfloat) 0.513159, + (GLfloat) 0.660000, (GLfloat) - 0.107300, (GLfloat) 0.539432, + (GLfloat) 0.665328, (GLfloat) - 0.112526, (GLfloat) 0.565705, + (GLfloat) 0.680503, (GLfloat) - 0.116956, (GLfloat) 0.587978, + (GLfloat) 0.703212, (GLfloat) - 0.119916, (GLfloat) 0.602861, + (GLfloat) 0.730000, (GLfloat) - 0.120956, (GLfloat) 0.608087, + (GLfloat) 0.756788, (GLfloat) - 0.235225, (GLfloat) 0.567882, + (GLfloat) 0.779498, (GLfloat) - 0.229418, (GLfloat) 0.553863, + (GLfloat) 0.794672, (GLfloat) - 0.220727, (GLfloat) 0.532882, + (GLfloat) 0.800000, (GLfloat) - 0.210476, (GLfloat) 0.508134, + (GLfloat) 0.794672, (GLfloat) - 0.200225, (GLfloat) 0.483385, + (GLfloat) 0.779498, (GLfloat) - 0.191534, (GLfloat) 0.462404, + (GLfloat) 0.756788, (GLfloat) - 0.185727, (GLfloat) 0.448385, + (GLfloat) 0.730000, (GLfloat) - 0.183688, (GLfloat) 0.443462, + (GLfloat) 0.703212, (GLfloat) - 0.185727, (GLfloat) 0.448385, + (GLfloat) 0.680503, (GLfloat) - 0.191534, (GLfloat) 0.462404, + (GLfloat) 0.665328, (GLfloat) - 0.200225, (GLfloat) 0.483385, + (GLfloat) 0.660000, (GLfloat) - 0.210476, (GLfloat) 0.508134, + (GLfloat) 0.665328, (GLfloat) - 0.220727, (GLfloat) 0.532882, + (GLfloat) 0.680503, (GLfloat) - 0.229418, (GLfloat) 0.553863, + (GLfloat) 0.703212, (GLfloat) - 0.235225, (GLfloat) 0.567882, + (GLfloat) 0.730000, (GLfloat) - 0.237264, (GLfloat) 0.572805, + (GLfloat) 0.756788, (GLfloat) - 0.341493, (GLfloat) 0.511081, + (GLfloat) 0.779498, (GLfloat) - 0.333063, (GLfloat) 0.498464, + (GLfloat) 0.794672, (GLfloat) - 0.320446, (GLfloat) 0.479582, + (GLfloat) 0.800000, (GLfloat) - 0.305564, (GLfloat) 0.457308, + (GLfloat) 0.794672, (GLfloat) - 0.290681, (GLfloat) 0.435035, + (GLfloat) 0.779498, (GLfloat) - 0.278064, (GLfloat) 0.416153, + (GLfloat) 0.756788, (GLfloat) - 0.269634, (GLfloat) 0.403536, + (GLfloat) 0.730000, (GLfloat) - 0.266674, (GLfloat) 0.399105, + (GLfloat) 0.703212, (GLfloat) - 0.269634, (GLfloat) 0.403536, + (GLfloat) 0.680503, (GLfloat) - 0.278064, (GLfloat) 0.416153, + (GLfloat) 0.665328, (GLfloat) - 0.290681, (GLfloat) 0.435035, + (GLfloat) 0.660000, (GLfloat) - 0.305564, (GLfloat) 0.457308, + (GLfloat) 0.665328, (GLfloat) - 0.320446, (GLfloat) 0.479582, + (GLfloat) 0.680503, (GLfloat) - 0.333063, (GLfloat) 0.498464, + (GLfloat) 0.703212, (GLfloat) - 0.341493, (GLfloat) 0.511081, + (GLfloat) 0.730000, (GLfloat) - 0.344454, (GLfloat) 0.515511, + (GLfloat) 0.756788, (GLfloat) - 0.434638, (GLfloat) 0.434638, + (GLfloat) 0.779498, (GLfloat) - 0.423909, (GLfloat) 0.423909, + (GLfloat) 0.794672, (GLfloat) - 0.407851, (GLfloat) 0.407851, + (GLfloat) 0.800000, (GLfloat) - 0.388909, (GLfloat) 0.388909, + (GLfloat) 0.794672, (GLfloat) - 0.369967, (GLfloat) 0.369967, + (GLfloat) 0.779498, (GLfloat) - 0.353909, (GLfloat) 0.353909, + (GLfloat) 0.756788, (GLfloat) - 0.343179, (GLfloat) 0.343179, + (GLfloat) 0.730000, (GLfloat) - 0.339411, (GLfloat) 0.339411, + (GLfloat) 0.703212, (GLfloat) - 0.343179, (GLfloat) 0.343179, + (GLfloat) 0.680503, (GLfloat) - 0.353909, (GLfloat) 0.353909, + (GLfloat) 0.665328, (GLfloat) - 0.369967, (GLfloat) 0.369967, + (GLfloat) 0.660000, (GLfloat) - 0.388909, (GLfloat) 0.388909, + (GLfloat) 0.665328, (GLfloat) - 0.407851, (GLfloat) 0.407851, + (GLfloat) 0.680503, (GLfloat) - 0.423909, (GLfloat) 0.423909, + (GLfloat) 0.703212, (GLfloat) - 0.434638, (GLfloat) 0.434638, + (GLfloat) 0.730000, (GLfloat) - 0.438406, (GLfloat) 0.438406, + (GLfloat) 0.756788, (GLfloat) - 0.511081, (GLfloat) 0.341493, + (GLfloat) 0.779498, (GLfloat) - 0.498464, (GLfloat) 0.333063, + (GLfloat) 0.794672, (GLfloat) - 0.479582, (GLfloat) 0.320446, + (GLfloat) 0.800000, (GLfloat) - 0.457308, (GLfloat) 0.305564, + (GLfloat) 0.794672, (GLfloat) - 0.435035, (GLfloat) 0.290681, + (GLfloat) 0.779498, (GLfloat) - 0.416153, (GLfloat) 0.278064, + (GLfloat) 0.756788, (GLfloat) - 0.403536, (GLfloat) 0.269634, + (GLfloat) 0.730000, (GLfloat) - 0.399105, (GLfloat) 0.266674, + (GLfloat) 0.703212, (GLfloat) - 0.403536, (GLfloat) 0.269634, + (GLfloat) 0.680503, (GLfloat) - 0.416153, (GLfloat) 0.278064, + (GLfloat) 0.665328, (GLfloat) - 0.435035, (GLfloat) 0.290681, + (GLfloat) 0.660000, (GLfloat) - 0.457308, (GLfloat) 0.305564, + (GLfloat) 0.665328, (GLfloat) - 0.479582, (GLfloat) 0.320446, + (GLfloat) 0.680503, (GLfloat) - 0.498464, (GLfloat) 0.333063, + (GLfloat) 0.703212, (GLfloat) - 0.511081, (GLfloat) 0.341493, + (GLfloat) 0.730000, (GLfloat) - 0.515511, (GLfloat) 0.344454, + (GLfloat) 0.756788, (GLfloat) - 0.567882, (GLfloat) 0.235225, + (GLfloat) 0.779498, (GLfloat) - 0.553863, (GLfloat) 0.229418, + (GLfloat) 0.794672, (GLfloat) - 0.532882, (GLfloat) 0.220727, + (GLfloat) 0.800000, (GLfloat) - 0.508134, (GLfloat) 0.210476, + (GLfloat) 0.794672, (GLfloat) - 0.483385, (GLfloat) 0.200225, + (GLfloat) 0.779498, (GLfloat) - 0.462404, (GLfloat) 0.191534, + (GLfloat) 0.756788, (GLfloat) - 0.448385, (GLfloat) 0.185727, + (GLfloat) 0.730000, (GLfloat) - 0.443462, (GLfloat) 0.183688, + (GLfloat) 0.703212, (GLfloat) - 0.448385, (GLfloat) 0.185727, + (GLfloat) 0.680503, (GLfloat) - 0.462404, (GLfloat) 0.191534, + (GLfloat) 0.665328, (GLfloat) - 0.483385, (GLfloat) 0.200225, + (GLfloat) 0.660000, (GLfloat) - 0.508134, (GLfloat) 0.210476, + (GLfloat) 0.665328, (GLfloat) - 0.532882, (GLfloat) 0.220727, + (GLfloat) 0.680503, (GLfloat) - 0.553863, (GLfloat) 0.229418, + (GLfloat) 0.703212, (GLfloat) - 0.567882, (GLfloat) 0.235225, + (GLfloat) 0.730000, (GLfloat) - 0.572805, (GLfloat) 0.237264, + (GLfloat) 0.756788, (GLfloat) - 0.602861, (GLfloat) 0.119916, + (GLfloat) 0.779498, (GLfloat) - 0.587978, (GLfloat) 0.116956, + (GLfloat) 0.794672, (GLfloat) - 0.565705, (GLfloat) 0.112526, + (GLfloat) 0.800000, (GLfloat) - 0.539432, (GLfloat) 0.107300, + (GLfloat) 0.794672, (GLfloat) - 0.513159, (GLfloat) 0.102074, + (GLfloat) 0.779498, (GLfloat) - 0.490886, (GLfloat) 0.097643, + (GLfloat) 0.756788, (GLfloat) - 0.476003, (GLfloat) 0.094683, + (GLfloat) 0.730000, (GLfloat) - 0.470777, (GLfloat) 0.093643, + (GLfloat) 0.703212, (GLfloat) - 0.476003, (GLfloat) 0.094683, + (GLfloat) 0.680503, (GLfloat) - 0.490886, (GLfloat) 0.097643, + (GLfloat) 0.665328, (GLfloat) - 0.513159, (GLfloat) 0.102074, + (GLfloat) 0.660000, (GLfloat) - 0.539432, (GLfloat) 0.107300, + (GLfloat) 0.665328, (GLfloat) - 0.565705, (GLfloat) 0.112526, + (GLfloat) 0.680503, (GLfloat) - 0.587978, (GLfloat) 0.116956, + (GLfloat) 0.703212, (GLfloat) - 0.602861, (GLfloat) 0.119916, + (GLfloat) 0.730000, (GLfloat) - 0.608087, (GLfloat) 0.120956, + (GLfloat) 0.756788, (GLfloat) - 0.614672, (GLfloat) 0.000000, + (GLfloat) 0.779498, (GLfloat) - 0.599497, (GLfloat) 0.000000, + (GLfloat) 0.794672, (GLfloat) - 0.576788, (GLfloat) 0.000000, + (GLfloat) 0.800000, (GLfloat) - 0.550000, (GLfloat) 0.000000, + (GLfloat) 0.794672, (GLfloat) - 0.523212, (GLfloat) 0.000000, + (GLfloat) 0.779498, (GLfloat) - 0.500503, (GLfloat) 0.000000, + (GLfloat) 0.756788, (GLfloat) - 0.485328, (GLfloat) 0.000000, + (GLfloat) 0.730000, (GLfloat) - 0.480000, (GLfloat) 0.000000, + (GLfloat) 0.703212, (GLfloat) - 0.485328, (GLfloat) 0.000000, + (GLfloat) 0.680503, (GLfloat) - 0.500503, (GLfloat) 0.000000, + (GLfloat) 0.665328, (GLfloat) - 0.523212, (GLfloat) 0.000000, + (GLfloat) 0.660000, (GLfloat) - 0.550000, (GLfloat) 0.000000, + (GLfloat) 0.665328, (GLfloat) - 0.576788, (GLfloat) 0.000000, + (GLfloat) 0.680503, (GLfloat) - 0.599497, (GLfloat) 0.000000, + (GLfloat) 0.703212, (GLfloat) - 0.614672, (GLfloat) 0.000000, + (GLfloat) 0.730000, (GLfloat) - 0.620000, (GLfloat) 0.000000, + (GLfloat) 0.756788, (GLfloat) - 0.602861, (GLfloat) - 0.119916, + (GLfloat) 0.779498, (GLfloat) - 0.587978, (GLfloat) - 0.116956, + (GLfloat) 0.794672, (GLfloat) - 0.565705, (GLfloat) - 0.112526, + (GLfloat) 0.800000, (GLfloat) - 0.539432, (GLfloat) - 0.107300, + (GLfloat) 0.794672, (GLfloat) - 0.513159, (GLfloat) - 0.102074, + (GLfloat) 0.779498, (GLfloat) - 0.490886, (GLfloat) - 0.097643, + (GLfloat) 0.756788, (GLfloat) - 0.476003, (GLfloat) - 0.094683, + (GLfloat) 0.730000, (GLfloat) - 0.470777, (GLfloat) - 0.093643, + (GLfloat) 0.703212, (GLfloat) - 0.476003, (GLfloat) - 0.094683, + (GLfloat) 0.680503, (GLfloat) - 0.490886, (GLfloat) - 0.097643, + (GLfloat) 0.665328, (GLfloat) - 0.513159, (GLfloat) - 0.102074, + (GLfloat) 0.660000, (GLfloat) - 0.539432, (GLfloat) - 0.107300, + (GLfloat) 0.665328, (GLfloat) - 0.565705, (GLfloat) - 0.112526, + (GLfloat) 0.680503, (GLfloat) - 0.587978, (GLfloat) - 0.116956, + (GLfloat) 0.703212, (GLfloat) - 0.602861, (GLfloat) - 0.119916, + (GLfloat) 0.730000, (GLfloat) - 0.608087, (GLfloat) - 0.120956, + (GLfloat) 0.756788, (GLfloat) - 0.567882, (GLfloat) - 0.235225, + (GLfloat) 0.779498, (GLfloat) - 0.553863, (GLfloat) - 0.229418, + (GLfloat) 0.794672, (GLfloat) - 0.532882, (GLfloat) - 0.220727, + (GLfloat) 0.800000, (GLfloat) - 0.508134, (GLfloat) - 0.210476, + (GLfloat) 0.794672, (GLfloat) - 0.483385, (GLfloat) - 0.200225, + (GLfloat) 0.779498, (GLfloat) - 0.462404, (GLfloat) - 0.191534, + (GLfloat) 0.756788, (GLfloat) - 0.448385, (GLfloat) - 0.185727, + (GLfloat) 0.730000, (GLfloat) - 0.443462, (GLfloat) - 0.183688, + (GLfloat) 0.703212, (GLfloat) - 0.448385, (GLfloat) - 0.185727, + (GLfloat) 0.680503, (GLfloat) - 0.462404, (GLfloat) - 0.191534, + (GLfloat) 0.665328, (GLfloat) - 0.483385, (GLfloat) - 0.200225, + (GLfloat) 0.660000, (GLfloat) - 0.508134, (GLfloat) - 0.210476, + (GLfloat) 0.665328, (GLfloat) - 0.532882, (GLfloat) - 0.220727, + (GLfloat) 0.680503, (GLfloat) - 0.553863, (GLfloat) - 0.229418, + (GLfloat) 0.703212, (GLfloat) - 0.567882, (GLfloat) - 0.235225, + (GLfloat) 0.730000, (GLfloat) - 0.572805, (GLfloat) - 0.237264, + (GLfloat) 0.756788, (GLfloat) - 0.511081, (GLfloat) - 0.341493, + (GLfloat) 0.779498, (GLfloat) - 0.498464, (GLfloat) - 0.333063, + (GLfloat) 0.794672, (GLfloat) - 0.479582, (GLfloat) - 0.320446, + (GLfloat) 0.800000, (GLfloat) - 0.457308, (GLfloat) - 0.305564, + (GLfloat) 0.794672, (GLfloat) - 0.435035, (GLfloat) - 0.290681, + (GLfloat) 0.779498, (GLfloat) - 0.416153, (GLfloat) - 0.278064, + (GLfloat) 0.756788, (GLfloat) - 0.403536, (GLfloat) - 0.269634, + (GLfloat) 0.730000, (GLfloat) - 0.399105, (GLfloat) - 0.266674, + (GLfloat) 0.703212, (GLfloat) - 0.403536, (GLfloat) - 0.269634, + (GLfloat) 0.680503, (GLfloat) - 0.416153, (GLfloat) - 0.278064, + (GLfloat) 0.665328, (GLfloat) - 0.435035, (GLfloat) - 0.290681, + (GLfloat) 0.660000, (GLfloat) - 0.457308, (GLfloat) - 0.305564, + (GLfloat) 0.665328, (GLfloat) - 0.479582, (GLfloat) - 0.320446, + (GLfloat) 0.680503, (GLfloat) - 0.498464, (GLfloat) - 0.333063, + (GLfloat) 0.703212, (GLfloat) - 0.511081, (GLfloat) - 0.341493, + (GLfloat) 0.730000, (GLfloat) - 0.515511, (GLfloat) - 0.344454, + (GLfloat) 0.756788, (GLfloat) - 0.434638, (GLfloat) - 0.434638, + (GLfloat) 0.779498, (GLfloat) - 0.423909, (GLfloat) - 0.423909, + (GLfloat) 0.794672, (GLfloat) - 0.407851, (GLfloat) - 0.407851, + (GLfloat) 0.800000, (GLfloat) - 0.388909, (GLfloat) - 0.388909, + (GLfloat) 0.794672, (GLfloat) - 0.369967, (GLfloat) - 0.369967, + (GLfloat) 0.779498, (GLfloat) - 0.353909, (GLfloat) - 0.353909, + (GLfloat) 0.756788, (GLfloat) - 0.343179, (GLfloat) - 0.343179, + (GLfloat) 0.730000, (GLfloat) - 0.339411, (GLfloat) - 0.339411, + (GLfloat) 0.703212, (GLfloat) - 0.343179, (GLfloat) - 0.343179, + (GLfloat) 0.680503, (GLfloat) - 0.353909, (GLfloat) - 0.353909, + (GLfloat) 0.665328, (GLfloat) - 0.369967, (GLfloat) - 0.369967, + (GLfloat) 0.660000, (GLfloat) - 0.388909, (GLfloat) - 0.388909, + (GLfloat) 0.665328, (GLfloat) - 0.407851, (GLfloat) - 0.407851, + (GLfloat) 0.680503, (GLfloat) - 0.423909, (GLfloat) - 0.423909, + (GLfloat) 0.703212, (GLfloat) - 0.434638, (GLfloat) - 0.434638, + (GLfloat) 0.730000, (GLfloat) - 0.438406, (GLfloat) - 0.438406, + (GLfloat) 0.756788, (GLfloat) - 0.341493, (GLfloat) - 0.511081, + (GLfloat) 0.779498, (GLfloat) - 0.333063, (GLfloat) - 0.498464, + (GLfloat) 0.794672, (GLfloat) - 0.320446, (GLfloat) - 0.479582, + (GLfloat) 0.800000, (GLfloat) - 0.305564, (GLfloat) - 0.457308, + (GLfloat) 0.794672, (GLfloat) - 0.290681, (GLfloat) - 0.435035, + (GLfloat) 0.779498, (GLfloat) - 0.278064, (GLfloat) - 0.416153, + (GLfloat) 0.756788, (GLfloat) - 0.269634, (GLfloat) - 0.403536, + (GLfloat) 0.730000, (GLfloat) - 0.266674, (GLfloat) - 0.399105, + (GLfloat) 0.703212, (GLfloat) - 0.269634, (GLfloat) - 0.403536, + (GLfloat) 0.680503, (GLfloat) - 0.278064, (GLfloat) - 0.416153, + (GLfloat) 0.665328, (GLfloat) - 0.290681, (GLfloat) - 0.435035, + (GLfloat) 0.660000, (GLfloat) - 0.305564, (GLfloat) - 0.457308, + (GLfloat) 0.665328, (GLfloat) - 0.320446, (GLfloat) - 0.479582, + (GLfloat) 0.680503, (GLfloat) - 0.333063, (GLfloat) - 0.498464, + (GLfloat) 0.703212, (GLfloat) - 0.341493, (GLfloat) - 0.511081, + (GLfloat) 0.730000, (GLfloat) - 0.344454, (GLfloat) - 0.515511, + (GLfloat) 0.756788, (GLfloat) - 0.235225, (GLfloat) - 0.567882, + (GLfloat) 0.779498, (GLfloat) - 0.229418, (GLfloat) - 0.553863, + (GLfloat) 0.794672, (GLfloat) - 0.220727, (GLfloat) - 0.532882, + (GLfloat) 0.800000, (GLfloat) - 0.210476, (GLfloat) - 0.508134, + (GLfloat) 0.794672, (GLfloat) - 0.200225, (GLfloat) - 0.483385, + (GLfloat) 0.779498, (GLfloat) - 0.191534, (GLfloat) - 0.462404, + (GLfloat) 0.756788, (GLfloat) - 0.185727, (GLfloat) - 0.448385, + (GLfloat) 0.730000, (GLfloat) - 0.183688, (GLfloat) - 0.443462, + (GLfloat) 0.703212, (GLfloat) - 0.185727, (GLfloat) - 0.448385, + (GLfloat) 0.680503, (GLfloat) - 0.191534, (GLfloat) - 0.462404, + (GLfloat) 0.665328, (GLfloat) - 0.200225, (GLfloat) - 0.483385, + (GLfloat) 0.660000, (GLfloat) - 0.210476, (GLfloat) - 0.508134, + (GLfloat) 0.665328, (GLfloat) - 0.220727, (GLfloat) - 0.532882, + (GLfloat) 0.680503, (GLfloat) - 0.229418, (GLfloat) - 0.553863, + (GLfloat) 0.703212, (GLfloat) - 0.235225, (GLfloat) - 0.567882, + (GLfloat) 0.730000, (GLfloat) - 0.237264, (GLfloat) - 0.572805, + (GLfloat) 0.756788, (GLfloat) - 0.119916, (GLfloat) - 0.602861, + (GLfloat) 0.779498, (GLfloat) - 0.116956, (GLfloat) - 0.587978, + (GLfloat) 0.794672, (GLfloat) - 0.112526, (GLfloat) - 0.565705, + (GLfloat) 0.800000, (GLfloat) - 0.107300, (GLfloat) - 0.539432, + (GLfloat) 0.794672, (GLfloat) - 0.102074, (GLfloat) - 0.513159, + (GLfloat) 0.779498, (GLfloat) - 0.097643, (GLfloat) - 0.490885, + (GLfloat) 0.756788, (GLfloat) - 0.094683, (GLfloat) - 0.476003, + (GLfloat) 0.730000, (GLfloat) - 0.093643, (GLfloat) - 0.470777, + (GLfloat) 0.703212, (GLfloat) - 0.094683, (GLfloat) - 0.476003, + (GLfloat) 0.680503, (GLfloat) - 0.097643, (GLfloat) - 0.490885, + (GLfloat) 0.665328, (GLfloat) - 0.102074, (GLfloat) - 0.513159, + (GLfloat) 0.660000, (GLfloat) - 0.107300, (GLfloat) - 0.539432, + (GLfloat) 0.665328, (GLfloat) - 0.112526, (GLfloat) - 0.565705, + (GLfloat) 0.680503, (GLfloat) - 0.116956, (GLfloat) - 0.587978, + (GLfloat) 0.703212, (GLfloat) - 0.119916, (GLfloat) - 0.602861, + (GLfloat) 0.730000, (GLfloat) - 0.120956, (GLfloat) - 0.608087, + (GLfloat) 0.756788, (GLfloat) - 0.000000, (GLfloat) - 0.614672, + (GLfloat) 0.779498, (GLfloat) - 0.000000, (GLfloat) - 0.599497, + (GLfloat) 0.794672, (GLfloat) - 0.000000, (GLfloat) - 0.576788, + (GLfloat) 0.800000, (GLfloat) - 0.000000, (GLfloat) - 0.550000, + (GLfloat) 0.794672, (GLfloat) - 0.000000, (GLfloat) - 0.523212, + (GLfloat) 0.779498, (GLfloat) - 0.000000, (GLfloat) - 0.500503, + (GLfloat) 0.756788, (GLfloat) - 0.000000, (GLfloat) - 0.485328, + (GLfloat) 0.730000, (GLfloat) - 0.000000, (GLfloat) - 0.480000, + (GLfloat) 0.703212, (GLfloat) - 0.000000, (GLfloat) - 0.485328, + (GLfloat) 0.680503, (GLfloat) - 0.000000, (GLfloat) - 0.500503, + (GLfloat) 0.665328, (GLfloat) - 0.000000, (GLfloat) - 0.523212, + (GLfloat) 0.660000, (GLfloat) - 0.000000, (GLfloat) - 0.550000, + (GLfloat) 0.665328, (GLfloat) - 0.000000, (GLfloat) - 0.576788, + (GLfloat) 0.680503, (GLfloat) - 0.000000, (GLfloat) - 0.599497, + (GLfloat) 0.703212, (GLfloat) - 0.000000, (GLfloat) - 0.614672, + (GLfloat) 0.730000, (GLfloat) - 0.000000, (GLfloat) - 0.620000, + (GLfloat) 0.756788, (GLfloat) 0.119916, (GLfloat) - 0.602861, + (GLfloat) 0.779498, (GLfloat) 0.116956, (GLfloat) - 0.587978, + (GLfloat) 0.794672, (GLfloat) 0.112526, (GLfloat) - 0.565705, + (GLfloat) 0.800000, (GLfloat) 0.107300, (GLfloat) - 0.539432, + (GLfloat) 0.794672, (GLfloat) 0.102074, (GLfloat) - 0.513159, + (GLfloat) 0.779498, (GLfloat) 0.097643, (GLfloat) - 0.490886, + (GLfloat) 0.756788, (GLfloat) 0.094683, (GLfloat) - 0.476003, + (GLfloat) 0.730000, (GLfloat) 0.093643, (GLfloat) - 0.470777, + (GLfloat) 0.703212, (GLfloat) 0.094683, (GLfloat) - 0.476003, + (GLfloat) 0.680503, (GLfloat) 0.097643, (GLfloat) - 0.490886, + (GLfloat) 0.665328, (GLfloat) 0.102074, (GLfloat) - 0.513159, + (GLfloat) 0.660000, (GLfloat) 0.107300, (GLfloat) - 0.539432, + (GLfloat) 0.665328, (GLfloat) 0.112526, (GLfloat) - 0.565705, + (GLfloat) 0.680503, (GLfloat) 0.116956, (GLfloat) - 0.587978, + (GLfloat) 0.703212, (GLfloat) 0.119916, (GLfloat) - 0.602861, + (GLfloat) 0.730000, (GLfloat) 0.120956, (GLfloat) - 0.608087, + (GLfloat) 0.756788, (GLfloat) 0.235225, (GLfloat) - 0.567882, + (GLfloat) 0.779498, (GLfloat) 0.229418, (GLfloat) - 0.553863, + (GLfloat) 0.794672, (GLfloat) 0.220727, (GLfloat) - 0.532882, + (GLfloat) 0.800000, (GLfloat) 0.210476, (GLfloat) - 0.508134, + (GLfloat) 0.794672, (GLfloat) 0.200225, (GLfloat) - 0.483385, + (GLfloat) 0.779498, (GLfloat) 0.191534, (GLfloat) - 0.462404, + (GLfloat) 0.756788, (GLfloat) 0.185727, (GLfloat) - 0.448385, + (GLfloat) 0.730000, (GLfloat) 0.183688, (GLfloat) - 0.443462, + (GLfloat) 0.703212, (GLfloat) 0.185727, (GLfloat) - 0.448385, + (GLfloat) 0.680503, (GLfloat) 0.191534, (GLfloat) - 0.462404, + (GLfloat) 0.665328, (GLfloat) 0.200225, (GLfloat) - 0.483385, + (GLfloat) 0.660000, (GLfloat) 0.210476, (GLfloat) - 0.508134, + (GLfloat) 0.665328, (GLfloat) 0.220727, (GLfloat) - 0.532882, + (GLfloat) 0.680503, (GLfloat) 0.229418, (GLfloat) - 0.553863, + (GLfloat) 0.703212, (GLfloat) 0.235225, (GLfloat) - 0.567882, + (GLfloat) 0.730000, (GLfloat) 0.237264, (GLfloat) - 0.572805, + (GLfloat) 0.756788, (GLfloat) 0.341493, (GLfloat) - 0.511081, + (GLfloat) 0.779498, (GLfloat) 0.333063, (GLfloat) - 0.498464, + (GLfloat) 0.794672, (GLfloat) 0.320446, (GLfloat) - 0.479582, + (GLfloat) 0.800000, (GLfloat) 0.305564, (GLfloat) - 0.457308, + (GLfloat) 0.794672, (GLfloat) 0.290681, (GLfloat) - 0.435035, + (GLfloat) 0.779498, (GLfloat) 0.278064, (GLfloat) - 0.416153, + (GLfloat) 0.756788, (GLfloat) 0.269634, (GLfloat) - 0.403536, + (GLfloat) 0.730000, (GLfloat) 0.266674, (GLfloat) - 0.399105, + (GLfloat) 0.703212, (GLfloat) 0.269634, (GLfloat) - 0.403536, + (GLfloat) 0.680503, (GLfloat) 0.278064, (GLfloat) - 0.416153, + (GLfloat) 0.665328, (GLfloat) 0.290681, (GLfloat) - 0.435035, + (GLfloat) 0.660000, (GLfloat) 0.305564, (GLfloat) - 0.457308, + (GLfloat) 0.665328, (GLfloat) 0.320446, (GLfloat) - 0.479582, + (GLfloat) 0.680503, (GLfloat) 0.333063, (GLfloat) - 0.498464, + (GLfloat) 0.703212, (GLfloat) 0.341493, (GLfloat) - 0.511081, + (GLfloat) 0.730000, (GLfloat) 0.344454, (GLfloat) - 0.515511, + (GLfloat) 0.756788, (GLfloat) 0.434638, (GLfloat) - 0.434638, + (GLfloat) 0.779498, (GLfloat) 0.423909, (GLfloat) - 0.423909, + (GLfloat) 0.794672, (GLfloat) 0.407851, (GLfloat) - 0.407851, + (GLfloat) 0.800000, (GLfloat) 0.388909, (GLfloat) - 0.388909, + (GLfloat) 0.794672, (GLfloat) 0.369967, (GLfloat) - 0.369967, + (GLfloat) 0.779498, (GLfloat) 0.353909, (GLfloat) - 0.353909, + (GLfloat) 0.756788, (GLfloat) 0.343179, (GLfloat) - 0.343179, + (GLfloat) 0.730000, (GLfloat) 0.339411, (GLfloat) - 0.339411, + (GLfloat) 0.703212, (GLfloat) 0.343179, (GLfloat) - 0.343179, + (GLfloat) 0.680503, (GLfloat) 0.353909, (GLfloat) - 0.353909, + (GLfloat) 0.665328, (GLfloat) 0.369967, (GLfloat) - 0.369967, + (GLfloat) 0.660000, (GLfloat) 0.388909, (GLfloat) - 0.388909, + (GLfloat) 0.665328, (GLfloat) 0.407851, (GLfloat) - 0.407851, + (GLfloat) 0.680503, (GLfloat) 0.423909, (GLfloat) - 0.423909, + (GLfloat) 0.703212, (GLfloat) 0.434638, (GLfloat) - 0.434638, + (GLfloat) 0.730000, (GLfloat) 0.438406, (GLfloat) - 0.438406, + (GLfloat) 0.756788, (GLfloat) 0.511081, (GLfloat) - 0.341493, + (GLfloat) 0.779498, (GLfloat) 0.498464, (GLfloat) - 0.333063, + (GLfloat) 0.794672, (GLfloat) 0.479582, (GLfloat) - 0.320446, + (GLfloat) 0.800000, (GLfloat) 0.457308, (GLfloat) - 0.305564, + (GLfloat) 0.794672, (GLfloat) 0.435035, (GLfloat) - 0.290681, + (GLfloat) 0.779498, (GLfloat) 0.416153, (GLfloat) - 0.278064, + (GLfloat) 0.756788, (GLfloat) 0.403536, (GLfloat) - 0.269634, + (GLfloat) 0.730000, (GLfloat) 0.399105, (GLfloat) - 0.266674, + (GLfloat) 0.703212, (GLfloat) 0.403536, (GLfloat) - 0.269634, + (GLfloat) 0.680503, (GLfloat) 0.416153, (GLfloat) - 0.278064, + (GLfloat) 0.665328, (GLfloat) 0.435035, (GLfloat) - 0.290681, + (GLfloat) 0.660000, (GLfloat) 0.457308, (GLfloat) - 0.305564, + (GLfloat) 0.665328, (GLfloat) 0.479582, (GLfloat) - 0.320446, + (GLfloat) 0.680503, (GLfloat) 0.498464, (GLfloat) - 0.333063, + (GLfloat) 0.703212, (GLfloat) 0.511081, (GLfloat) - 0.341493, + (GLfloat) 0.730000, (GLfloat) 0.515511, (GLfloat) - 0.344454, + (GLfloat) 0.756788, (GLfloat) 0.567882, (GLfloat) - 0.235225, + (GLfloat) 0.779498, (GLfloat) 0.553863, (GLfloat) - 0.229418, + (GLfloat) 0.794672, (GLfloat) 0.532882, (GLfloat) - 0.220727, + (GLfloat) 0.800000, (GLfloat) 0.508134, (GLfloat) - 0.210476, + (GLfloat) 0.794672, (GLfloat) 0.483385, (GLfloat) - 0.200225, + (GLfloat) 0.779498, (GLfloat) 0.462404, (GLfloat) - 0.191534, + (GLfloat) 0.756788, (GLfloat) 0.448385, (GLfloat) - 0.185727, + (GLfloat) 0.730000, (GLfloat) 0.443462, (GLfloat) - 0.183688, + (GLfloat) 0.703212, (GLfloat) 0.448385, (GLfloat) - 0.185727, + (GLfloat) 0.680503, (GLfloat) 0.462404, (GLfloat) - 0.191534, + (GLfloat) 0.665328, (GLfloat) 0.483385, (GLfloat) - 0.200225, + (GLfloat) 0.660000, (GLfloat) 0.508134, (GLfloat) - 0.210476, + (GLfloat) 0.665328, (GLfloat) 0.532882, (GLfloat) - 0.220727, + (GLfloat) 0.680503, (GLfloat) 0.553863, (GLfloat) - 0.229418, + (GLfloat) 0.703212, (GLfloat) 0.567882, (GLfloat) - 0.235225, + (GLfloat) 0.730000, (GLfloat) 0.572805, (GLfloat) - 0.237264, + (GLfloat) 0.756788, (GLfloat) 0.602861, (GLfloat) - 0.119916, + (GLfloat) 0.779498, (GLfloat) 0.587978, (GLfloat) - 0.116956, + (GLfloat) 0.794672, (GLfloat) 0.565705, (GLfloat) - 0.112526, + (GLfloat) 0.800000, (GLfloat) 0.539432, (GLfloat) - 0.107300, + (GLfloat) 0.794672, (GLfloat) 0.513159, (GLfloat) - 0.102074, + (GLfloat) 0.779498, (GLfloat) 0.490885, (GLfloat) - 0.097643, + (GLfloat) 0.756788, (GLfloat) 0.476003, (GLfloat) - 0.094683, + (GLfloat) 0.730000, (GLfloat) 0.470777, (GLfloat) - 0.093643, + (GLfloat) 0.703212, (GLfloat) 0.476003, (GLfloat) - 0.094683, + (GLfloat) 0.680503, (GLfloat) 0.490885, (GLfloat) - 0.097643, + (GLfloat) 0.665328, (GLfloat) 0.513159, (GLfloat) - 0.102074, + (GLfloat) 0.660000, (GLfloat) 0.539432, (GLfloat) - 0.107300, + (GLfloat) 0.665328, (GLfloat) 0.565705, (GLfloat) - 0.112526, + (GLfloat) 0.680503, (GLfloat) 0.587978, (GLfloat) - 0.116956, + (GLfloat) 0.703212, (GLfloat) 0.602861, (GLfloat) - 0.119916, + (GLfloat) 0.730000, (GLfloat) 0.608087, (GLfloat) - 0.120956, + (GLfloat) 0.420000, (GLfloat) - 0.000000, (GLfloat) - 0.200000, + (GLfloat) 0.420000, (GLfloat) 0.051764, (GLfloat) - 0.193185, + (GLfloat) 0.420000, (GLfloat) 0.100000, (GLfloat) - 0.173205, + (GLfloat) 0.420000, (GLfloat) 0.141421, (GLfloat) - 0.141421, + (GLfloat) 0.420000, (GLfloat) 0.173205, (GLfloat) - 0.100000, + (GLfloat) 0.420000, (GLfloat) 0.193185, (GLfloat) - 0.051764, + (GLfloat) 0.420000, (GLfloat) 0.200000, (GLfloat) - 0.000000, + (GLfloat) 0.420000, (GLfloat) 0.193185, (GLfloat) 0.051764, + (GLfloat) 0.420000, (GLfloat) 0.173205, (GLfloat) 0.100000, + (GLfloat) 0.420000, (GLfloat) 0.141421, (GLfloat) 0.141421, + (GLfloat) 0.420000, (GLfloat) 0.100000, (GLfloat) 0.173205, + (GLfloat) 0.420000, (GLfloat) 0.051764, (GLfloat) 0.193185, + (GLfloat) 0.420000, (GLfloat) 0.000000, (GLfloat) 0.200000, + (GLfloat) 0.420000, (GLfloat) - 0.051764, (GLfloat) 0.193185, + (GLfloat) 0.420000, (GLfloat) - 0.100000, (GLfloat) 0.173205, + (GLfloat) 0.420000, (GLfloat) - 0.141421, (GLfloat) 0.141421, + (GLfloat) 0.420000, (GLfloat) - 0.173205, (GLfloat) 0.100000, + (GLfloat) 0.420000, (GLfloat) - 0.193185, (GLfloat) 0.051764, + (GLfloat) 0.420000, (GLfloat) - 0.200000, (GLfloat) 0.000000, + (GLfloat) 0.420000, (GLfloat) - 0.193185, (GLfloat) - 0.051764, + (GLfloat) 0.420000, (GLfloat) - 0.173205, (GLfloat) - 0.100000, + (GLfloat) 0.420000, (GLfloat) - 0.141421, (GLfloat) - 0.141421, + (GLfloat) 0.420000, (GLfloat) - 0.100000, (GLfloat) - 0.173205, + (GLfloat) 0.420000, (GLfloat) - 0.051764, (GLfloat) - 0.193185, + (GLfloat) 0.540000, (GLfloat) - 0.000000, (GLfloat) - 0.200000, + (GLfloat) 0.540000, (GLfloat) 0.051764, (GLfloat) - 0.193185, + (GLfloat) 0.540000, (GLfloat) 0.100000, (GLfloat) - 0.173205, + (GLfloat) 0.540000, (GLfloat) 0.141421, (GLfloat) - 0.141421, + (GLfloat) 0.540000, (GLfloat) 0.173205, (GLfloat) - 0.100000, + (GLfloat) 0.540000, (GLfloat) 0.193185, (GLfloat) - 0.051764, + (GLfloat) 0.540000, (GLfloat) 0.200000, (GLfloat) - 0.000000, + (GLfloat) 0.540000, (GLfloat) 0.193185, (GLfloat) 0.051764, + (GLfloat) 0.540000, (GLfloat) 0.173205, (GLfloat) 0.100000, + (GLfloat) 0.540000, (GLfloat) 0.141421, (GLfloat) 0.141421, + (GLfloat) 0.540000, (GLfloat) 0.100000, (GLfloat) 0.173205, + (GLfloat) 0.540000, (GLfloat) 0.051764, (GLfloat) 0.193185, + (GLfloat) 0.540000, (GLfloat) 0.000000, (GLfloat) 0.200000, + (GLfloat) 0.540000, (GLfloat) - 0.051764, (GLfloat) 0.193185, + (GLfloat) 0.540000, (GLfloat) - 0.100000, (GLfloat) 0.173205, + (GLfloat) 0.540000, (GLfloat) - 0.141421, (GLfloat) 0.141421, + (GLfloat) 0.540000, (GLfloat) - 0.173205, (GLfloat) 0.100000, + (GLfloat) 0.540000, (GLfloat) - 0.193185, (GLfloat) 0.051764, + (GLfloat) 0.540000, (GLfloat) - 0.200000, (GLfloat) 0.000000, + (GLfloat) 0.540000, (GLfloat) - 0.193185, (GLfloat) - 0.051764, + (GLfloat) 0.540000, (GLfloat) - 0.173205, (GLfloat) - 0.100000, + (GLfloat) 0.540000, (GLfloat) - 0.141421, (GLfloat) - 0.141421, + (GLfloat) 0.540000, (GLfloat) - 0.100000, (GLfloat) - 0.173205, + (GLfloat) 0.540000, (GLfloat) - 0.051764, (GLfloat) - 0.193185, + (GLfloat) 0.790000, (GLfloat) 0.060000, (GLfloat) - 0.000000, + (GLfloat) 0.785433, (GLfloat) 0.060000, (GLfloat) - 0.022961, + (GLfloat) 0.772426, (GLfloat) 0.060000, (GLfloat) - 0.042426, + (GLfloat) 0.752961, (GLfloat) 0.060000, (GLfloat) - 0.055433, + (GLfloat) 0.730000, (GLfloat) 0.060000, (GLfloat) - 0.060000, + (GLfloat) 0.707039, (GLfloat) 0.060000, (GLfloat) - 0.055433, + (GLfloat) 0.687574, (GLfloat) 0.060000, (GLfloat) - 0.042426, + (GLfloat) 0.674567, (GLfloat) 0.060000, (GLfloat) - 0.022961, + (GLfloat) 0.670000, (GLfloat) 0.060000, (GLfloat) - 0.000000, + (GLfloat) 0.674567, (GLfloat) 0.060000, (GLfloat) 0.022961, + (GLfloat) 0.687574, (GLfloat) 0.060000, (GLfloat) 0.042426, + (GLfloat) 0.707039, (GLfloat) 0.060000, (GLfloat) 0.055433, + (GLfloat) 0.730000, (GLfloat) 0.060000, (GLfloat) 0.060000, + (GLfloat) 0.752961, (GLfloat) 0.060000, (GLfloat) 0.055433, + (GLfloat) 0.772426, (GLfloat) 0.060000, (GLfloat) 0.042426, + (GLfloat) 0.785433, (GLfloat) 0.060000, (GLfloat) 0.022961, + (GLfloat) 0.790000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) 0.785433, (GLfloat) 0.550000, (GLfloat) - 0.022961, + (GLfloat) 0.772426, (GLfloat) 0.550000, (GLfloat) - 0.042426, + (GLfloat) 0.752961, (GLfloat) 0.550000, (GLfloat) - 0.055433, + (GLfloat) 0.730000, (GLfloat) 0.550000, (GLfloat) - 0.060000, + (GLfloat) 0.707039, (GLfloat) 0.550000, (GLfloat) - 0.055433, + (GLfloat) 0.687574, (GLfloat) 0.550000, (GLfloat) - 0.042426, + (GLfloat) 0.674567, (GLfloat) 0.550000, (GLfloat) - 0.022961, + (GLfloat) 0.670000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) 0.674567, (GLfloat) 0.550000, (GLfloat) 0.022961, + (GLfloat) 0.687574, (GLfloat) 0.550000, (GLfloat) 0.042426, + (GLfloat) 0.707039, (GLfloat) 0.550000, (GLfloat) 0.055433, + (GLfloat) 0.730000, (GLfloat) 0.550000, (GLfloat) 0.060000, + (GLfloat) 0.752961, (GLfloat) 0.550000, (GLfloat) 0.055433, + (GLfloat) 0.772426, (GLfloat) 0.550000, (GLfloat) 0.042426, + (GLfloat) 0.785433, (GLfloat) 0.550000, (GLfloat) 0.022961, + (GLfloat) 0.790000, (GLfloat) 0.000000, (GLfloat) 0.060000, + (GLfloat) 0.785433, (GLfloat) 0.022961, (GLfloat) 0.060000, + (GLfloat) 0.772426, (GLfloat) 0.042426, (GLfloat) 0.060000, + (GLfloat) 0.752961, (GLfloat) 0.055433, (GLfloat) 0.060000, + (GLfloat) 0.707039, (GLfloat) 0.055433, (GLfloat) 0.060000, + (GLfloat) 0.687574, (GLfloat) 0.042426, (GLfloat) 0.060000, + (GLfloat) 0.674567, (GLfloat) 0.022961, (GLfloat) 0.060000, + (GLfloat) 0.670000, (GLfloat) 0.000000, (GLfloat) 0.060000, + (GLfloat) 0.674567, (GLfloat) - 0.022961, (GLfloat) 0.060000, + (GLfloat) 0.687574, (GLfloat) - 0.042426, (GLfloat) 0.060000, + (GLfloat) 0.707039, (GLfloat) - 0.055433, (GLfloat) 0.060000, + (GLfloat) 0.730000, (GLfloat) - 0.060000, (GLfloat) 0.060000, + (GLfloat) 0.752961, (GLfloat) - 0.055433, (GLfloat) 0.060000, + (GLfloat) 0.772426, (GLfloat) - 0.042426, (GLfloat) 0.060000, + (GLfloat) 0.785433, (GLfloat) - 0.022961, (GLfloat) 0.060000, + (GLfloat) 0.790000, (GLfloat) 0.000000, (GLfloat) 0.550000, + (GLfloat) 0.785433, (GLfloat) 0.022961, (GLfloat) 0.550000, + (GLfloat) 0.772426, (GLfloat) 0.042426, (GLfloat) 0.550000, + (GLfloat) 0.752961, (GLfloat) 0.055433, (GLfloat) 0.550000, + (GLfloat) 0.730000, (GLfloat) 0.060000, (GLfloat) 0.550000, + (GLfloat) 0.707039, (GLfloat) 0.055433, (GLfloat) 0.550000, + (GLfloat) 0.687574, (GLfloat) 0.042426, (GLfloat) 0.550000, + (GLfloat) 0.674567, (GLfloat) 0.022961, (GLfloat) 0.550000, + (GLfloat) 0.670000, (GLfloat) 0.000000, (GLfloat) 0.550000, + (GLfloat) 0.674567, (GLfloat) - 0.022961, (GLfloat) 0.550000, + (GLfloat) 0.687574, (GLfloat) - 0.042426, (GLfloat) 0.550000, + (GLfloat) 0.707039, (GLfloat) - 0.055433, (GLfloat) 0.550000, + (GLfloat) 0.730000, (GLfloat) - 0.060000, (GLfloat) 0.550000, + (GLfloat) 0.752961, (GLfloat) - 0.055433, (GLfloat) 0.550000, + (GLfloat) 0.772426, (GLfloat) - 0.042426, (GLfloat) 0.550000, + (GLfloat) 0.785433, (GLfloat) - 0.022961, (GLfloat) 0.550000, + (GLfloat) 0.790000, (GLfloat) - 0.060000, (GLfloat) 0.000000, + (GLfloat) 0.785433, (GLfloat) - 0.060000, (GLfloat) 0.022961, + (GLfloat) 0.772426, (GLfloat) - 0.060000, (GLfloat) 0.042426, + (GLfloat) 0.752961, (GLfloat) - 0.060000, (GLfloat) 0.055433, + (GLfloat) 0.707039, (GLfloat) - 0.060000, (GLfloat) 0.055433, + (GLfloat) 0.687574, (GLfloat) - 0.060000, (GLfloat) 0.042426, + (GLfloat) 0.674567, (GLfloat) - 0.060000, (GLfloat) 0.022961, + (GLfloat) 0.670000, (GLfloat) - 0.060000, (GLfloat) 0.000000, + (GLfloat) 0.674567, (GLfloat) - 0.060000, (GLfloat) - 0.022961, + (GLfloat) 0.687574, (GLfloat) - 0.060000, (GLfloat) - 0.042426, + (GLfloat) 0.707039, (GLfloat) - 0.060000, (GLfloat) - 0.055433, + (GLfloat) 0.730000, (GLfloat) - 0.060000, (GLfloat) - 0.060000, + (GLfloat) 0.752961, (GLfloat) - 0.060000, (GLfloat) - 0.055433, + (GLfloat) 0.772426, (GLfloat) - 0.060000, (GLfloat) - 0.042426, + (GLfloat) 0.785433, (GLfloat) - 0.060000, (GLfloat) - 0.022961, + (GLfloat) 0.790000, (GLfloat) - 0.550000, (GLfloat) 0.000000, + (GLfloat) 0.785433, (GLfloat) - 0.550000, (GLfloat) 0.022961, + (GLfloat) 0.772426, (GLfloat) - 0.550000, (GLfloat) 0.042426, + (GLfloat) 0.752961, (GLfloat) - 0.550000, (GLfloat) 0.055433, + (GLfloat) 0.730000, (GLfloat) - 0.550000, (GLfloat) 0.060000, + (GLfloat) 0.707039, (GLfloat) - 0.550000, (GLfloat) 0.055433, + (GLfloat) 0.687574, (GLfloat) - 0.550000, (GLfloat) 0.042426, + (GLfloat) 0.674567, (GLfloat) - 0.550000, (GLfloat) 0.022961, + (GLfloat) 0.670000, (GLfloat) - 0.550000, (GLfloat) 0.000000, + (GLfloat) 0.674567, (GLfloat) - 0.550000, (GLfloat) - 0.022961, + (GLfloat) 0.687574, (GLfloat) - 0.550000, (GLfloat) - 0.042426, + (GLfloat) 0.707039, (GLfloat) - 0.550000, (GLfloat) - 0.055433, + (GLfloat) 0.730000, (GLfloat) - 0.550000, (GLfloat) - 0.060000, + (GLfloat) 0.752961, (GLfloat) - 0.550000, (GLfloat) - 0.055433, + (GLfloat) 0.772426, (GLfloat) - 0.550000, (GLfloat) - 0.042426, + (GLfloat) 0.785433, (GLfloat) - 0.550000, (GLfloat) - 0.022961, + (GLfloat) 0.790000, (GLfloat) - 0.000000, (GLfloat) - 0.060000, + (GLfloat) 0.785433, (GLfloat) - 0.022961, (GLfloat) - 0.060000, + (GLfloat) 0.772426, (GLfloat) - 0.042426, (GLfloat) - 0.060000, + (GLfloat) 0.752961, (GLfloat) - 0.055433, (GLfloat) - 0.060000, + (GLfloat) 0.707039, (GLfloat) - 0.055433, (GLfloat) - 0.060000, + (GLfloat) 0.687574, (GLfloat) - 0.042426, (GLfloat) - 0.060000, + (GLfloat) 0.674567, (GLfloat) - 0.022961, (GLfloat) - 0.060000, + (GLfloat) 0.670000, (GLfloat) - 0.000000, (GLfloat) - 0.060000, + (GLfloat) 0.674567, (GLfloat) 0.022961, (GLfloat) - 0.060000, + (GLfloat) 0.687574, (GLfloat) 0.042426, (GLfloat) - 0.060000, + (GLfloat) 0.707039, (GLfloat) 0.055433, (GLfloat) - 0.060000, + (GLfloat) 0.752961, (GLfloat) 0.055433, (GLfloat) - 0.060000, + (GLfloat) 0.772426, (GLfloat) 0.042426, (GLfloat) - 0.060000, + (GLfloat) 0.785433, (GLfloat) 0.022961, (GLfloat) - 0.060000, + (GLfloat) 0.790000, (GLfloat) - 0.000000, (GLfloat) - 0.550000, + (GLfloat) 0.785433, (GLfloat) - 0.022961, (GLfloat) - 0.550000, + (GLfloat) 0.772426, (GLfloat) - 0.042426, (GLfloat) - 0.550000, + (GLfloat) 0.752961, (GLfloat) - 0.055433, (GLfloat) - 0.550000, + (GLfloat) 0.730000, (GLfloat) - 0.060000, (GLfloat) - 0.550000, + (GLfloat) 0.707039, (GLfloat) - 0.055433, (GLfloat) - 0.550000, + (GLfloat) 0.687574, (GLfloat) - 0.042426, (GLfloat) - 0.550000, + (GLfloat) 0.674567, (GLfloat) - 0.022961, (GLfloat) - 0.550000, + (GLfloat) 0.670000, (GLfloat) - 0.000000, (GLfloat) - 0.550000, + (GLfloat) 0.674567, (GLfloat) 0.022961, (GLfloat) - 0.550000, + (GLfloat) 0.687574, (GLfloat) 0.042426, (GLfloat) - 0.550000, + (GLfloat) 0.707039, (GLfloat) 0.055433, (GLfloat) - 0.550000, + (GLfloat) 0.730000, (GLfloat) 0.060000, (GLfloat) - 0.550000, + (GLfloat) 0.752961, (GLfloat) 0.055433, (GLfloat) - 0.550000, + (GLfloat) 0.772426, (GLfloat) 0.042426, (GLfloat) - 0.550000, + (GLfloat) 0.785433, (GLfloat) 0.022961, (GLfloat) - 0.550000, + (GLfloat) 0.540000, (GLfloat) 0.000000, (GLfloat) - 0.100000, + (GLfloat) 0.540000, (GLfloat) 0.038268, (GLfloat) - 0.092388, + (GLfloat) 0.540000, (GLfloat) 0.070711, (GLfloat) - 0.070711, + (GLfloat) 0.540000, (GLfloat) 0.092388, (GLfloat) - 0.038268, + (GLfloat) 0.540000, (GLfloat) 0.100000, (GLfloat) - 0.000000, + (GLfloat) 0.540000, (GLfloat) 0.092388, (GLfloat) 0.038268, + (GLfloat) 0.540000, (GLfloat) 0.070711, (GLfloat) 0.070711, + (GLfloat) 0.540000, (GLfloat) 0.038268, (GLfloat) 0.092388, + (GLfloat) 0.540000, (GLfloat) 0.000000, (GLfloat) 0.100000, + (GLfloat) 0.540000, (GLfloat) - 0.038268, (GLfloat) 0.092388, + (GLfloat) 0.540000, (GLfloat) - 0.070711, (GLfloat) 0.070711, + (GLfloat) 0.540000, (GLfloat) - 0.092388, (GLfloat) 0.038268, + (GLfloat) 0.540000, (GLfloat) - 0.100000, (GLfloat) 0.000000, + (GLfloat) 0.540000, (GLfloat) - 0.092388, (GLfloat) - 0.038268, + (GLfloat) 0.540000, (GLfloat) - 0.070711, (GLfloat) - 0.070711, + (GLfloat) 0.540000, (GLfloat) - 0.038268, (GLfloat) - 0.092388, + (GLfloat) 0.800000, (GLfloat) 0.000000, (GLfloat) - 0.100000, + (GLfloat) 0.800000, (GLfloat) 0.038268, (GLfloat) - 0.092388, + (GLfloat) 0.800000, (GLfloat) 0.070711, (GLfloat) - 0.070711, + (GLfloat) 0.800000, (GLfloat) 0.092388, (GLfloat) - 0.038268, + (GLfloat) 0.800000, (GLfloat) 0.100000, (GLfloat) - 0.000000, + (GLfloat) 0.800000, (GLfloat) 0.092388, (GLfloat) 0.038268, + (GLfloat) 0.800000, (GLfloat) 0.070711, (GLfloat) 0.070711, + (GLfloat) 0.800000, (GLfloat) 0.038268, (GLfloat) 0.092388, + (GLfloat) 0.800000, (GLfloat) 0.000000, (GLfloat) 0.100000, + (GLfloat) 0.800000, (GLfloat) - 0.038268, (GLfloat) 0.092388, + (GLfloat) 0.800000, (GLfloat) - 0.070711, (GLfloat) 0.070711, + (GLfloat) 0.800000, (GLfloat) - 0.092388, (GLfloat) 0.038268, + (GLfloat) 0.800000, (GLfloat) - 0.100000, (GLfloat) 0.000000, + (GLfloat) 0.800000, (GLfloat) - 0.092388, (GLfloat) - 0.038268, + (GLfloat) 0.800000, (GLfloat) - 0.070711, (GLfloat) - 0.070711, + (GLfloat) 0.800000, (GLfloat) - 0.038268, (GLfloat) - 0.092388, +}; + +static GLfloat BigValve_normals[] = +{ + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.195090, (GLfloat) - 0.980785, + (GLfloat) - 0.000000, (GLfloat) 0.555570, (GLfloat) - 0.831470, + (GLfloat) - 0.000000, (GLfloat) 0.831470, (GLfloat) - 0.555570, + (GLfloat) - 0.000000, (GLfloat) 0.980785, (GLfloat) - 0.195090, + (GLfloat) - 0.000000, (GLfloat) 0.980785, (GLfloat) 0.195090, + (GLfloat) - 0.000000, (GLfloat) 0.831470, (GLfloat) 0.555570, + (GLfloat) - 0.000000, (GLfloat) 0.555570, (GLfloat) 0.831470, + (GLfloat) - 0.000000, (GLfloat) 0.195090, (GLfloat) 0.980785, + (GLfloat) - 0.000000, (GLfloat) - 0.195090, (GLfloat) 0.980785, + (GLfloat) - 0.000000, (GLfloat) - 0.555570, (GLfloat) 0.831470, + (GLfloat) - 0.000000, (GLfloat) - 0.831470, (GLfloat) 0.555570, + (GLfloat) - 0.000000, (GLfloat) - 0.980785, (GLfloat) 0.195090, + (GLfloat) 0.000000, (GLfloat) - 0.980785, (GLfloat) - 0.195090, + (GLfloat) 0.000000, (GLfloat) - 0.831470, (GLfloat) - 0.555570, + (GLfloat) 0.000000, (GLfloat) - 0.555570, (GLfloat) - 0.831470, + (GLfloat) 0.000000, (GLfloat) - 0.195090, (GLfloat) - 0.980785, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.980785, (GLfloat) - 0.195092, (GLfloat) - 0.000000, + (GLfloat) 0.831470, (GLfloat) - 0.555569, (GLfloat) - 0.000000, + (GLfloat) 0.555569, (GLfloat) - 0.831470, (GLfloat) - 0.000000, + (GLfloat) 0.195091, (GLfloat) - 0.980785, (GLfloat) - 0.000000, + (GLfloat) - 0.195090, (GLfloat) - 0.980785, (GLfloat) - 0.000000, + (GLfloat) - 0.555570, (GLfloat) - 0.831469, (GLfloat) - 0.000000, + (GLfloat) - 0.831469, (GLfloat) - 0.555571, (GLfloat) - 0.000000, + (GLfloat) - 0.980785, (GLfloat) - 0.195089, (GLfloat) 0.000000, + (GLfloat) - 0.980785, (GLfloat) 0.195089, (GLfloat) - 0.000000, + (GLfloat) - 0.831469, (GLfloat) 0.555571, (GLfloat) - 0.000000, + (GLfloat) - 0.555570, (GLfloat) 0.831469, (GLfloat) - 0.000000, + (GLfloat) - 0.195090, (GLfloat) 0.980785, (GLfloat) - 0.000000, + (GLfloat) 0.195091, (GLfloat) 0.980785, (GLfloat) 0.000000, + (GLfloat) 0.555569, (GLfloat) 0.831470, (GLfloat) 0.000000, + (GLfloat) 0.831470, (GLfloat) 0.555569, (GLfloat) 0.000000, + (GLfloat) 0.980785, (GLfloat) 0.195092, (GLfloat) - 0.000000, + (GLfloat) 0.980785, (GLfloat) 0.000000, (GLfloat) 0.195092, + (GLfloat) 0.831470, (GLfloat) 0.000000, (GLfloat) 0.555569, + (GLfloat) 0.555569, (GLfloat) 0.000000, (GLfloat) 0.831470, + (GLfloat) 0.195091, (GLfloat) 0.000000, (GLfloat) 0.980785, + (GLfloat) - 0.195090, (GLfloat) 0.000000, (GLfloat) 0.980785, + (GLfloat) - 0.555570, (GLfloat) 0.000000, (GLfloat) 0.831469, + (GLfloat) - 0.831469, (GLfloat) 0.000000, (GLfloat) 0.555571, + (GLfloat) - 0.980785, (GLfloat) 0.000000, (GLfloat) 0.195089, + (GLfloat) - 0.980785, (GLfloat) - 0.000000, (GLfloat) - 0.195089, + (GLfloat) - 0.831469, (GLfloat) - 0.000000, (GLfloat) - 0.555571, + (GLfloat) - 0.555570, (GLfloat) - 0.000000, (GLfloat) - 0.831469, + (GLfloat) - 0.195090, (GLfloat) - 0.000000, (GLfloat) - 0.980785, + (GLfloat) 0.195091, (GLfloat) 0.000000, (GLfloat) - 0.980785, + (GLfloat) 0.555569, (GLfloat) 0.000000, (GLfloat) - 0.831470, + (GLfloat) 0.831470, (GLfloat) 0.000000, (GLfloat) - 0.555569, + (GLfloat) 0.980785, (GLfloat) - 0.000000, (GLfloat) - 0.195092, + (GLfloat) 0.980785, (GLfloat) 0.195092, (GLfloat) - 0.000000, + (GLfloat) 0.831470, (GLfloat) 0.555569, (GLfloat) - 0.000000, + (GLfloat) 0.555569, (GLfloat) 0.831470, (GLfloat) - 0.000000, + (GLfloat) 0.195091, (GLfloat) 0.980785, (GLfloat) - 0.000000, + (GLfloat) - 0.195090, (GLfloat) 0.980785, (GLfloat) - 0.000000, + (GLfloat) - 0.555570, (GLfloat) 0.831469, (GLfloat) - 0.000000, + (GLfloat) - 0.831469, (GLfloat) 0.555571, (GLfloat) - 0.000000, + (GLfloat) - 0.980785, (GLfloat) 0.195089, (GLfloat) - 0.000000, + (GLfloat) - 0.980785, (GLfloat) - 0.195089, (GLfloat) 0.000000, + (GLfloat) - 0.831469, (GLfloat) - 0.555571, (GLfloat) 0.000000, + (GLfloat) - 0.555570, (GLfloat) - 0.831469, (GLfloat) 0.000000, + (GLfloat) - 0.195090, (GLfloat) - 0.980785, (GLfloat) 0.000000, + (GLfloat) 0.195091, (GLfloat) - 0.980785, (GLfloat) - 0.000000, + (GLfloat) 0.555569, (GLfloat) - 0.831470, (GLfloat) - 0.000000, + (GLfloat) 0.831470, (GLfloat) - 0.555569, (GLfloat) - 0.000000, + (GLfloat) 0.980785, (GLfloat) - 0.195092, (GLfloat) 0.000000, + (GLfloat) 0.980785, (GLfloat) 0.000000, (GLfloat) - 0.195092, + (GLfloat) 0.831470, (GLfloat) 0.000000, (GLfloat) - 0.555569, + (GLfloat) 0.555569, (GLfloat) 0.000000, (GLfloat) - 0.831470, + (GLfloat) 0.195091, (GLfloat) 0.000000, (GLfloat) - 0.980785, + (GLfloat) - 0.195090, (GLfloat) 0.000000, (GLfloat) - 0.980785, + (GLfloat) - 0.555570, (GLfloat) 0.000000, (GLfloat) - 0.831469, + (GLfloat) - 0.831469, (GLfloat) 0.000000, (GLfloat) - 0.555571, + (GLfloat) - 0.980785, (GLfloat) 0.000000, (GLfloat) - 0.195089, + (GLfloat) - 0.980785, (GLfloat) 0.000000, (GLfloat) 0.195089, + (GLfloat) - 0.831469, (GLfloat) 0.000000, (GLfloat) 0.555571, + (GLfloat) - 0.555570, (GLfloat) 0.000000, (GLfloat) 0.831469, + (GLfloat) - 0.195090, (GLfloat) 0.000000, (GLfloat) 0.980785, + (GLfloat) 0.195091, (GLfloat) - 0.000000, (GLfloat) 0.980785, + (GLfloat) 0.555569, (GLfloat) - 0.000000, (GLfloat) 0.831470, + (GLfloat) 0.831470, (GLfloat) - 0.000000, (GLfloat) 0.555569, + (GLfloat) 0.980785, (GLfloat) - 0.000000, (GLfloat) 0.195092, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.130526, (GLfloat) - 0.991445, + (GLfloat) - 0.000000, (GLfloat) 0.382684, (GLfloat) - 0.923880, + (GLfloat) - 0.000000, (GLfloat) 0.608761, (GLfloat) - 0.793353, + (GLfloat) - 0.000000, (GLfloat) 0.793353, (GLfloat) - 0.608761, + (GLfloat) - 0.000000, (GLfloat) 0.923880, (GLfloat) - 0.382684, + (GLfloat) - 0.000000, (GLfloat) 0.991445, (GLfloat) - 0.130526, + (GLfloat) - 0.000000, (GLfloat) 0.991445, (GLfloat) 0.130526, + (GLfloat) - 0.000000, (GLfloat) 0.923880, (GLfloat) 0.382684, + (GLfloat) - 0.000000, (GLfloat) 0.793353, (GLfloat) 0.608761, + (GLfloat) - 0.000000, (GLfloat) 0.608761, (GLfloat) 0.793353, + (GLfloat) - 0.000000, (GLfloat) 0.382684, (GLfloat) 0.923880, + (GLfloat) - 0.000000, (GLfloat) 0.130526, (GLfloat) 0.991445, + (GLfloat) - 0.000000, (GLfloat) - 0.130526, (GLfloat) 0.991445, + (GLfloat) - 0.000000, (GLfloat) - 0.382684, (GLfloat) 0.923880, + (GLfloat) - 0.000000, (GLfloat) - 0.608761, (GLfloat) 0.793353, + (GLfloat) - 0.000000, (GLfloat) - 0.793353, (GLfloat) 0.608761, + (GLfloat) - 0.000000, (GLfloat) - 0.923880, (GLfloat) 0.382684, + (GLfloat) - 0.000000, (GLfloat) - 0.991445, (GLfloat) 0.130526, + (GLfloat) 0.000000, (GLfloat) - 0.991445, (GLfloat) - 0.130526, + (GLfloat) 0.000000, (GLfloat) - 0.923880, (GLfloat) - 0.382684, + (GLfloat) 0.000000, (GLfloat) - 0.793353, (GLfloat) - 0.608761, + (GLfloat) 0.000000, (GLfloat) - 0.608761, (GLfloat) - 0.793353, + (GLfloat) 0.000000, (GLfloat) - 0.382684, (GLfloat) - 0.923880, + (GLfloat) 0.000000, (GLfloat) - 0.130526, (GLfloat) - 0.991445, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.194185, (GLfloat) 0.976241, (GLfloat) 0.096151, + (GLfloat) - 0.194185, (GLfloat) 0.976241, (GLfloat) 0.096151, + (GLfloat) - 0.553718, (GLfloat) 0.828695, (GLfloat) 0.081619, + (GLfloat) - 0.830228, (GLfloat) 0.554740, (GLfloat) 0.054637, + (GLfloat) - 0.980604, (GLfloat) 0.195054, (GLfloat) 0.019211, + (GLfloat) - 0.980605, (GLfloat) - 0.195053, (GLfloat) - 0.019211, + (GLfloat) - 0.830227, (GLfloat) - 0.554741, (GLfloat) - 0.054637, + (GLfloat) - 0.553717, (GLfloat) - 0.828695, (GLfloat) - 0.081619, + (GLfloat) - 0.194187, (GLfloat) - 0.976241, (GLfloat) - 0.096151, + (GLfloat) 0.194188, (GLfloat) - 0.976241, (GLfloat) - 0.096151, + (GLfloat) 0.553716, (GLfloat) - 0.828696, (GLfloat) - 0.081619, + (GLfloat) 0.830227, (GLfloat) - 0.554741, (GLfloat) - 0.054637, + (GLfloat) 0.980604, (GLfloat) - 0.195053, (GLfloat) - 0.019211, + (GLfloat) 0.980604, (GLfloat) 0.195054, (GLfloat) 0.019211, + (GLfloat) 0.830228, (GLfloat) 0.554740, (GLfloat) 0.054637, + (GLfloat) 0.553717, (GLfloat) 0.828695, (GLfloat) 0.081619, + (GLfloat) 0.194186, (GLfloat) 0.938725, (GLfloat) 0.284759, + (GLfloat) - 0.194185, (GLfloat) 0.938725, (GLfloat) 0.284759, + (GLfloat) - 0.553717, (GLfloat) 0.796849, (GLfloat) 0.241721, + (GLfloat) - 0.830228, (GLfloat) 0.533421, (GLfloat) 0.161812, + (GLfloat) - 0.980604, (GLfloat) 0.187558, (GLfloat) 0.056895, + (GLfloat) - 0.980604, (GLfloat) - 0.187558, (GLfloat) - 0.056895, + (GLfloat) - 0.830227, (GLfloat) - 0.533422, (GLfloat) - 0.161812, + (GLfloat) - 0.553717, (GLfloat) - 0.796849, (GLfloat) - 0.241722, + (GLfloat) - 0.194186, (GLfloat) - 0.938725, (GLfloat) - 0.284759, + (GLfloat) 0.194187, (GLfloat) - 0.938724, (GLfloat) - 0.284759, + (GLfloat) 0.553716, (GLfloat) - 0.796849, (GLfloat) - 0.241722, + (GLfloat) 0.830227, (GLfloat) - 0.533422, (GLfloat) - 0.161812, + (GLfloat) 0.980604, (GLfloat) - 0.187558, (GLfloat) - 0.056895, + (GLfloat) 0.980604, (GLfloat) 0.187558, (GLfloat) 0.056895, + (GLfloat) 0.830228, (GLfloat) 0.533421, (GLfloat) 0.161811, + (GLfloat) 0.553716, (GLfloat) 0.796850, (GLfloat) 0.241722, + (GLfloat) 0.194186, (GLfloat) 0.865134, (GLfloat) 0.462423, + (GLfloat) - 0.194185, (GLfloat) 0.865134, (GLfloat) 0.462424, + (GLfloat) - 0.553717, (GLfloat) 0.734380, (GLfloat) 0.392534, + (GLfloat) - 0.830228, (GLfloat) 0.491604, (GLfloat) 0.262768, + (GLfloat) - 0.980604, (GLfloat) 0.172854, (GLfloat) 0.092393, + (GLfloat) - 0.980604, (GLfloat) - 0.172854, (GLfloat) - 0.092393, + (GLfloat) - 0.830227, (GLfloat) - 0.491605, (GLfloat) - 0.262768, + (GLfloat) - 0.553717, (GLfloat) - 0.734380, (GLfloat) - 0.392534, + (GLfloat) - 0.194187, (GLfloat) - 0.865134, (GLfloat) - 0.462424, + (GLfloat) 0.194187, (GLfloat) - 0.865134, (GLfloat) - 0.462423, + (GLfloat) 0.553716, (GLfloat) - 0.734381, (GLfloat) - 0.392534, + (GLfloat) 0.830227, (GLfloat) - 0.491605, (GLfloat) - 0.262768, + (GLfloat) 0.980604, (GLfloat) - 0.172854, (GLfloat) - 0.092393, + (GLfloat) 0.980604, (GLfloat) 0.172854, (GLfloat) 0.092393, + (GLfloat) 0.830228, (GLfloat) 0.491604, (GLfloat) 0.262768, + (GLfloat) 0.553716, (GLfloat) 0.734381, (GLfloat) 0.392535, + (GLfloat) 0.194186, (GLfloat) 0.758296, (GLfloat) 0.622317, + (GLfloat) - 0.194186, (GLfloat) 0.758296, (GLfloat) 0.622318, + (GLfloat) - 0.553717, (GLfloat) 0.643690, (GLfloat) 0.528263, + (GLfloat) - 0.830228, (GLfloat) 0.430895, (GLfloat) 0.353626, + (GLfloat) - 0.980604, (GLfloat) 0.151508, (GLfloat) 0.124340, + (GLfloat) - 0.980604, (GLfloat) - 0.151508, (GLfloat) - 0.124339, + (GLfloat) - 0.830227, (GLfloat) - 0.430895, (GLfloat) - 0.353627, + (GLfloat) - 0.553717, (GLfloat) - 0.643690, (GLfloat) - 0.528263, + (GLfloat) - 0.194186, (GLfloat) - 0.758296, (GLfloat) - 0.622317, + (GLfloat) 0.194186, (GLfloat) - 0.758296, (GLfloat) - 0.622318, + (GLfloat) 0.553716, (GLfloat) - 0.643690, (GLfloat) - 0.528263, + (GLfloat) 0.830227, (GLfloat) - 0.430895, (GLfloat) - 0.353627, + (GLfloat) 0.980604, (GLfloat) - 0.151508, (GLfloat) - 0.124339, + (GLfloat) 0.980604, (GLfloat) 0.151508, (GLfloat) 0.124340, + (GLfloat) 0.830228, (GLfloat) 0.430895, (GLfloat) 0.353626, + (GLfloat) 0.553716, (GLfloat) 0.643690, (GLfloat) 0.528263, + (GLfloat) 0.194186, (GLfloat) 0.622317, (GLfloat) 0.758296, + (GLfloat) - 0.194185, (GLfloat) 0.622318, (GLfloat) 0.758296, + (GLfloat) - 0.553717, (GLfloat) 0.528263, (GLfloat) 0.643690, + (GLfloat) - 0.830228, (GLfloat) 0.353626, (GLfloat) 0.430895, + (GLfloat) - 0.980604, (GLfloat) 0.124339, (GLfloat) 0.151508, + (GLfloat) - 0.980604, (GLfloat) - 0.124339, (GLfloat) - 0.151508, + (GLfloat) - 0.830227, (GLfloat) - 0.353627, (GLfloat) - 0.430895, + (GLfloat) - 0.553717, (GLfloat) - 0.528262, (GLfloat) - 0.643689, + (GLfloat) - 0.194187, (GLfloat) - 0.622317, (GLfloat) - 0.758296, + (GLfloat) 0.194187, (GLfloat) - 0.622317, (GLfloat) - 0.758296, + (GLfloat) 0.553716, (GLfloat) - 0.528263, (GLfloat) - 0.643690, + (GLfloat) 0.830227, (GLfloat) - 0.353627, (GLfloat) - 0.430895, + (GLfloat) 0.980604, (GLfloat) - 0.124339, (GLfloat) - 0.151508, + (GLfloat) 0.980604, (GLfloat) 0.124340, (GLfloat) 0.151508, + (GLfloat) 0.830228, (GLfloat) 0.353626, (GLfloat) 0.430895, + (GLfloat) 0.553716, (GLfloat) 0.528263, (GLfloat) 0.643690, + (GLfloat) 0.194186, (GLfloat) 0.462423, (GLfloat) 0.865134, + (GLfloat) - 0.194185, (GLfloat) 0.462424, (GLfloat) 0.865134, + (GLfloat) - 0.553717, (GLfloat) 0.392534, (GLfloat) 0.734380, + (GLfloat) - 0.830228, (GLfloat) 0.262768, (GLfloat) 0.491604, + (GLfloat) - 0.980604, (GLfloat) 0.092393, (GLfloat) 0.172855, + (GLfloat) - 0.980604, (GLfloat) - 0.092392, (GLfloat) - 0.172854, + (GLfloat) - 0.830227, (GLfloat) - 0.262768, (GLfloat) - 0.491605, + (GLfloat) - 0.553717, (GLfloat) - 0.392534, (GLfloat) - 0.734380, + (GLfloat) - 0.194186, (GLfloat) - 0.462424, (GLfloat) - 0.865134, + (GLfloat) 0.194187, (GLfloat) - 0.462423, (GLfloat) - 0.865134, + (GLfloat) 0.553716, (GLfloat) - 0.392535, (GLfloat) - 0.734381, + (GLfloat) 0.830227, (GLfloat) - 0.262768, (GLfloat) - 0.491605, + (GLfloat) 0.980604, (GLfloat) - 0.092392, (GLfloat) - 0.172854, + (GLfloat) 0.980604, (GLfloat) 0.092393, (GLfloat) 0.172855, + (GLfloat) 0.830228, (GLfloat) 0.262768, (GLfloat) 0.491604, + (GLfloat) 0.553716, (GLfloat) 0.392535, (GLfloat) 0.734381, + (GLfloat) 0.194185, (GLfloat) 0.284759, (GLfloat) 0.938725, + (GLfloat) - 0.194185, (GLfloat) 0.284759, (GLfloat) 0.938725, + (GLfloat) - 0.553718, (GLfloat) 0.241721, (GLfloat) 0.796848, + (GLfloat) - 0.830228, (GLfloat) 0.161812, (GLfloat) 0.533422, + (GLfloat) - 0.980604, (GLfloat) 0.056895, (GLfloat) 0.187558, + (GLfloat) - 0.980604, (GLfloat) - 0.056895, (GLfloat) - 0.187558, + (GLfloat) - 0.830227, (GLfloat) - 0.161812, (GLfloat) - 0.533423, + (GLfloat) - 0.553717, (GLfloat) - 0.241722, (GLfloat) - 0.796849, + (GLfloat) - 0.194187, (GLfloat) - 0.284759, (GLfloat) - 0.938725, + (GLfloat) 0.194188, (GLfloat) - 0.284759, (GLfloat) - 0.938724, + (GLfloat) 0.553716, (GLfloat) - 0.241722, (GLfloat) - 0.796849, + (GLfloat) 0.830227, (GLfloat) - 0.161812, (GLfloat) - 0.533423, + (GLfloat) 0.980604, (GLfloat) - 0.056895, (GLfloat) - 0.187557, + (GLfloat) 0.980604, (GLfloat) 0.056895, (GLfloat) 0.187558, + (GLfloat) 0.830228, (GLfloat) 0.161812, (GLfloat) 0.533422, + (GLfloat) 0.553717, (GLfloat) 0.241722, (GLfloat) 0.796849, + (GLfloat) 0.194186, (GLfloat) 0.096151, (GLfloat) 0.976241, + (GLfloat) - 0.194186, (GLfloat) 0.096151, (GLfloat) 0.976241, + (GLfloat) - 0.553717, (GLfloat) 0.081619, (GLfloat) 0.828695, + (GLfloat) - 0.830228, (GLfloat) 0.054637, (GLfloat) 0.554740, + (GLfloat) - 0.980604, (GLfloat) 0.019211, (GLfloat) 0.195054, + (GLfloat) - 0.980604, (GLfloat) - 0.019211, (GLfloat) - 0.195054, + (GLfloat) - 0.830227, (GLfloat) - 0.054637, (GLfloat) - 0.554741, + (GLfloat) - 0.553717, (GLfloat) - 0.081619, (GLfloat) - 0.828695, + (GLfloat) - 0.194187, (GLfloat) - 0.096151, (GLfloat) - 0.976241, + (GLfloat) 0.194187, (GLfloat) - 0.096151, (GLfloat) - 0.976241, + (GLfloat) 0.553716, (GLfloat) - 0.081619, (GLfloat) - 0.828696, + (GLfloat) 0.830227, (GLfloat) - 0.054637, (GLfloat) - 0.554741, + (GLfloat) 0.980604, (GLfloat) - 0.019211, (GLfloat) - 0.195054, + (GLfloat) 0.980604, (GLfloat) 0.019211, (GLfloat) 0.195054, + (GLfloat) 0.830228, (GLfloat) 0.054637, (GLfloat) 0.554740, + (GLfloat) 0.553716, (GLfloat) 0.081619, (GLfloat) 0.828696, + (GLfloat) 0.194185, (GLfloat) - 0.096151, (GLfloat) 0.976241, + (GLfloat) - 0.194185, (GLfloat) - 0.096151, (GLfloat) 0.976241, + (GLfloat) - 0.553718, (GLfloat) - 0.081619, (GLfloat) 0.828695, + (GLfloat) - 0.830228, (GLfloat) - 0.054637, (GLfloat) 0.554740, + (GLfloat) - 0.980604, (GLfloat) - 0.019211, (GLfloat) 0.195054, + (GLfloat) - 0.980605, (GLfloat) 0.019211, (GLfloat) - 0.195053, + (GLfloat) - 0.830227, (GLfloat) 0.054637, (GLfloat) - 0.554741, + (GLfloat) - 0.553717, (GLfloat) 0.081619, (GLfloat) - 0.828695, + (GLfloat) - 0.194187, (GLfloat) 0.096151, (GLfloat) - 0.976241, + (GLfloat) 0.194188, (GLfloat) 0.096151, (GLfloat) - 0.976241, + (GLfloat) 0.553716, (GLfloat) 0.081619, (GLfloat) - 0.828696, + (GLfloat) 0.830227, (GLfloat) 0.054637, (GLfloat) - 0.554741, + (GLfloat) 0.980604, (GLfloat) 0.019211, (GLfloat) - 0.195053, + (GLfloat) 0.980604, (GLfloat) - 0.019211, (GLfloat) 0.195054, + (GLfloat) 0.830228, (GLfloat) - 0.054637, (GLfloat) 0.554740, + (GLfloat) 0.553717, (GLfloat) - 0.081619, (GLfloat) 0.828695, + (GLfloat) 0.194186, (GLfloat) - 0.284759, (GLfloat) 0.938725, + (GLfloat) - 0.194185, (GLfloat) - 0.284759, (GLfloat) 0.938725, + (GLfloat) - 0.553717, (GLfloat) - 0.241721, (GLfloat) 0.796849, + (GLfloat) - 0.830228, (GLfloat) - 0.161812, (GLfloat) 0.533421, + (GLfloat) - 0.980604, (GLfloat) - 0.056895, (GLfloat) 0.187558, + (GLfloat) - 0.980604, (GLfloat) 0.056895, (GLfloat) - 0.187558, + (GLfloat) - 0.830227, (GLfloat) 0.161812, (GLfloat) - 0.533422, + (GLfloat) - 0.553717, (GLfloat) 0.241722, (GLfloat) - 0.796849, + (GLfloat) - 0.194186, (GLfloat) 0.284759, (GLfloat) - 0.938725, + (GLfloat) 0.194187, (GLfloat) 0.284759, (GLfloat) - 0.938724, + (GLfloat) 0.553716, (GLfloat) 0.241722, (GLfloat) - 0.796849, + (GLfloat) 0.830227, (GLfloat) 0.161812, (GLfloat) - 0.533422, + (GLfloat) 0.980604, (GLfloat) 0.056895, (GLfloat) - 0.187558, + (GLfloat) 0.980604, (GLfloat) - 0.056895, (GLfloat) 0.187558, + (GLfloat) 0.830228, (GLfloat) - 0.161811, (GLfloat) 0.533421, + (GLfloat) 0.553716, (GLfloat) - 0.241722, (GLfloat) 0.796850, + (GLfloat) 0.194186, (GLfloat) - 0.462423, (GLfloat) 0.865134, + (GLfloat) - 0.194185, (GLfloat) - 0.462424, (GLfloat) 0.865134, + (GLfloat) - 0.553717, (GLfloat) - 0.392534, (GLfloat) 0.734380, + (GLfloat) - 0.830228, (GLfloat) - 0.262768, (GLfloat) 0.491604, + (GLfloat) - 0.980604, (GLfloat) - 0.092393, (GLfloat) 0.172854, + (GLfloat) - 0.980604, (GLfloat) 0.092393, (GLfloat) - 0.172854, + (GLfloat) - 0.830227, (GLfloat) 0.262768, (GLfloat) - 0.491605, + (GLfloat) - 0.553717, (GLfloat) 0.392534, (GLfloat) - 0.734380, + (GLfloat) - 0.194187, (GLfloat) 0.462424, (GLfloat) - 0.865134, + (GLfloat) 0.194187, (GLfloat) 0.462423, (GLfloat) - 0.865134, + (GLfloat) 0.553716, (GLfloat) 0.392534, (GLfloat) - 0.734381, + (GLfloat) 0.830227, (GLfloat) 0.262768, (GLfloat) - 0.491605, + (GLfloat) 0.980604, (GLfloat) 0.092393, (GLfloat) - 0.172854, + (GLfloat) 0.980604, (GLfloat) - 0.092393, (GLfloat) 0.172854, + (GLfloat) 0.830228, (GLfloat) - 0.262768, (GLfloat) 0.491604, + (GLfloat) 0.553716, (GLfloat) - 0.392535, (GLfloat) 0.734381, + (GLfloat) 0.194186, (GLfloat) - 0.622317, (GLfloat) 0.758296, + (GLfloat) - 0.194186, (GLfloat) - 0.622318, (GLfloat) 0.758296, + (GLfloat) - 0.553717, (GLfloat) - 0.528263, (GLfloat) 0.643690, + (GLfloat) - 0.830228, (GLfloat) - 0.353626, (GLfloat) 0.430895, + (GLfloat) - 0.980604, (GLfloat) - 0.124340, (GLfloat) 0.151508, + (GLfloat) - 0.980604, (GLfloat) 0.124339, (GLfloat) - 0.151508, + (GLfloat) - 0.830227, (GLfloat) 0.353627, (GLfloat) - 0.430895, + (GLfloat) - 0.553717, (GLfloat) 0.528263, (GLfloat) - 0.643690, + (GLfloat) - 0.194186, (GLfloat) 0.622317, (GLfloat) - 0.758296, + (GLfloat) 0.194186, (GLfloat) 0.622318, (GLfloat) - 0.758296, + (GLfloat) 0.553716, (GLfloat) 0.528263, (GLfloat) - 0.643690, + (GLfloat) 0.830227, (GLfloat) 0.353627, (GLfloat) - 0.430895, + (GLfloat) 0.980604, (GLfloat) 0.124339, (GLfloat) - 0.151508, + (GLfloat) 0.980604, (GLfloat) - 0.124340, (GLfloat) 0.151508, + (GLfloat) 0.830228, (GLfloat) - 0.353626, (GLfloat) 0.430895, + (GLfloat) 0.553716, (GLfloat) - 0.528263, (GLfloat) 0.643690, + (GLfloat) 0.194186, (GLfloat) - 0.758296, (GLfloat) 0.622317, + (GLfloat) - 0.194185, (GLfloat) - 0.758296, (GLfloat) 0.622318, + (GLfloat) - 0.553717, (GLfloat) - 0.643690, (GLfloat) 0.528263, + (GLfloat) - 0.830228, (GLfloat) - 0.430895, (GLfloat) 0.353626, + (GLfloat) - 0.980604, (GLfloat) - 0.151508, (GLfloat) 0.124339, + (GLfloat) - 0.980604, (GLfloat) 0.151508, (GLfloat) - 0.124339, + (GLfloat) - 0.830227, (GLfloat) 0.430895, (GLfloat) - 0.353627, + (GLfloat) - 0.553717, (GLfloat) 0.643689, (GLfloat) - 0.528262, + (GLfloat) - 0.194187, (GLfloat) 0.758296, (GLfloat) - 0.622317, + (GLfloat) 0.194187, (GLfloat) 0.758296, (GLfloat) - 0.622317, + (GLfloat) 0.553716, (GLfloat) 0.643690, (GLfloat) - 0.528263, + (GLfloat) 0.830227, (GLfloat) 0.430895, (GLfloat) - 0.353627, + (GLfloat) 0.980604, (GLfloat) 0.151508, (GLfloat) - 0.124339, + (GLfloat) 0.980604, (GLfloat) - 0.151508, (GLfloat) 0.124340, + (GLfloat) 0.830228, (GLfloat) - 0.430895, (GLfloat) 0.353626, + (GLfloat) 0.553716, (GLfloat) - 0.643690, (GLfloat) 0.528263, + (GLfloat) 0.194186, (GLfloat) - 0.865134, (GLfloat) 0.462423, + (GLfloat) - 0.194185, (GLfloat) - 0.865134, (GLfloat) 0.462424, + (GLfloat) - 0.553717, (GLfloat) - 0.734380, (GLfloat) 0.392534, + (GLfloat) - 0.830228, (GLfloat) - 0.491604, (GLfloat) 0.262768, + (GLfloat) - 0.980604, (GLfloat) - 0.172855, (GLfloat) 0.092393, + (GLfloat) - 0.980604, (GLfloat) 0.172854, (GLfloat) - 0.092393, + (GLfloat) - 0.830227, (GLfloat) 0.491605, (GLfloat) - 0.262768, + (GLfloat) - 0.553717, (GLfloat) 0.734380, (GLfloat) - 0.392534, + (GLfloat) - 0.194186, (GLfloat) 0.865134, (GLfloat) - 0.462424, + (GLfloat) 0.194187, (GLfloat) 0.865134, (GLfloat) - 0.462423, + (GLfloat) 0.553716, (GLfloat) 0.734381, (GLfloat) - 0.392535, + (GLfloat) 0.830228, (GLfloat) 0.491605, (GLfloat) - 0.262768, + (GLfloat) 0.980604, (GLfloat) 0.172854, (GLfloat) - 0.092393, + (GLfloat) 0.980604, (GLfloat) - 0.172855, (GLfloat) 0.092393, + (GLfloat) 0.830228, (GLfloat) - 0.491604, (GLfloat) 0.262768, + (GLfloat) 0.553716, (GLfloat) - 0.734381, (GLfloat) 0.392535, + (GLfloat) 0.194185, (GLfloat) - 0.938725, (GLfloat) 0.284759, + (GLfloat) - 0.194185, (GLfloat) - 0.938725, (GLfloat) 0.284759, + (GLfloat) - 0.553718, (GLfloat) - 0.796848, (GLfloat) 0.241721, + (GLfloat) - 0.830228, (GLfloat) - 0.533422, (GLfloat) 0.161812, + (GLfloat) - 0.980604, (GLfloat) - 0.187558, (GLfloat) 0.056895, + (GLfloat) - 0.980605, (GLfloat) 0.187557, (GLfloat) - 0.056895, + (GLfloat) - 0.830227, (GLfloat) 0.533423, (GLfloat) - 0.161812, + (GLfloat) - 0.553717, (GLfloat) 0.796849, (GLfloat) - 0.241722, + (GLfloat) - 0.194187, (GLfloat) 0.938725, (GLfloat) - 0.284759, + (GLfloat) 0.194188, (GLfloat) 0.938724, (GLfloat) - 0.284759, + (GLfloat) 0.553716, (GLfloat) 0.796849, (GLfloat) - 0.241722, + (GLfloat) 0.830227, (GLfloat) 0.533423, (GLfloat) - 0.161812, + (GLfloat) 0.980604, (GLfloat) 0.187557, (GLfloat) - 0.056895, + (GLfloat) 0.980604, (GLfloat) - 0.187558, (GLfloat) 0.056895, + (GLfloat) 0.830228, (GLfloat) - 0.533422, (GLfloat) 0.161812, + (GLfloat) 0.553717, (GLfloat) - 0.796849, (GLfloat) 0.241722, + (GLfloat) 0.194186, (GLfloat) - 0.976241, (GLfloat) 0.096151, + (GLfloat) - 0.194186, (GLfloat) - 0.976241, (GLfloat) 0.096151, + (GLfloat) - 0.553717, (GLfloat) - 0.828695, (GLfloat) 0.081619, + (GLfloat) - 0.830228, (GLfloat) - 0.554740, (GLfloat) 0.054637, + (GLfloat) - 0.980604, (GLfloat) - 0.195054, (GLfloat) 0.019211, + (GLfloat) - 0.980604, (GLfloat) 0.195054, (GLfloat) - 0.019211, + (GLfloat) - 0.830227, (GLfloat) 0.554741, (GLfloat) - 0.054637, + (GLfloat) - 0.553717, (GLfloat) 0.828695, (GLfloat) - 0.081619, + (GLfloat) - 0.194187, (GLfloat) 0.976241, (GLfloat) - 0.096151, + (GLfloat) 0.194187, (GLfloat) 0.976241, (GLfloat) - 0.096151, + (GLfloat) 0.553716, (GLfloat) 0.828696, (GLfloat) - 0.081619, + (GLfloat) 0.830227, (GLfloat) 0.554741, (GLfloat) - 0.054637, + (GLfloat) 0.980604, (GLfloat) 0.195054, (GLfloat) - 0.019211, + (GLfloat) 0.980604, (GLfloat) - 0.195054, (GLfloat) 0.019211, + (GLfloat) 0.830228, (GLfloat) - 0.554740, (GLfloat) 0.054637, + (GLfloat) 0.553716, (GLfloat) - 0.828696, (GLfloat) 0.081619, + (GLfloat) 0.194185, (GLfloat) - 0.976241, (GLfloat) - 0.096151, + (GLfloat) - 0.194185, (GLfloat) - 0.976241, (GLfloat) - 0.096151, + (GLfloat) - 0.553718, (GLfloat) - 0.828695, (GLfloat) - 0.081619, + (GLfloat) - 0.830228, (GLfloat) - 0.554740, (GLfloat) - 0.054637, + (GLfloat) - 0.980604, (GLfloat) - 0.195054, (GLfloat) - 0.019211, + (GLfloat) - 0.980605, (GLfloat) 0.195053, (GLfloat) 0.019211, + (GLfloat) - 0.830227, (GLfloat) 0.554741, (GLfloat) 0.054637, + (GLfloat) - 0.553717, (GLfloat) 0.828695, (GLfloat) 0.081619, + (GLfloat) - 0.194187, (GLfloat) 0.976241, (GLfloat) 0.096151, + (GLfloat) 0.194188, (GLfloat) 0.976241, (GLfloat) 0.096151, + (GLfloat) 0.553716, (GLfloat) 0.828696, (GLfloat) 0.081619, + (GLfloat) 0.830227, (GLfloat) 0.554741, (GLfloat) 0.054637, + (GLfloat) 0.980604, (GLfloat) 0.195053, (GLfloat) 0.019211, + (GLfloat) 0.980604, (GLfloat) - 0.195054, (GLfloat) - 0.019211, + (GLfloat) 0.830228, (GLfloat) - 0.554740, (GLfloat) - 0.054637, + (GLfloat) 0.553717, (GLfloat) - 0.828695, (GLfloat) - 0.081619, + (GLfloat) 0.194186, (GLfloat) - 0.938725, (GLfloat) - 0.284759, + (GLfloat) - 0.194185, (GLfloat) - 0.938725, (GLfloat) - 0.284759, + (GLfloat) - 0.553717, (GLfloat) - 0.796849, (GLfloat) - 0.241721, + (GLfloat) - 0.830228, (GLfloat) - 0.533421, (GLfloat) - 0.161812, + (GLfloat) - 0.980604, (GLfloat) - 0.187558, (GLfloat) - 0.056895, + (GLfloat) - 0.980604, (GLfloat) 0.187558, (GLfloat) 0.056895, + (GLfloat) - 0.830227, (GLfloat) 0.533422, (GLfloat) 0.161812, + (GLfloat) - 0.553717, (GLfloat) 0.796849, (GLfloat) 0.241722, + (GLfloat) - 0.194186, (GLfloat) 0.938725, (GLfloat) 0.284759, + (GLfloat) 0.194187, (GLfloat) 0.938724, (GLfloat) 0.284759, + (GLfloat) 0.553716, (GLfloat) 0.796849, (GLfloat) 0.241722, + (GLfloat) 0.830227, (GLfloat) 0.533422, (GLfloat) 0.161812, + (GLfloat) 0.980604, (GLfloat) 0.187558, (GLfloat) 0.056895, + (GLfloat) 0.980604, (GLfloat) - 0.187558, (GLfloat) - 0.056895, + (GLfloat) 0.830228, (GLfloat) - 0.533421, (GLfloat) - 0.161811, + (GLfloat) 0.553716, (GLfloat) - 0.796850, (GLfloat) - 0.241722, + (GLfloat) 0.194186, (GLfloat) - 0.865134, (GLfloat) - 0.462423, + (GLfloat) - 0.194185, (GLfloat) - 0.865134, (GLfloat) - 0.462424, + (GLfloat) - 0.553717, (GLfloat) - 0.734380, (GLfloat) - 0.392534, + (GLfloat) - 0.830228, (GLfloat) - 0.491604, (GLfloat) - 0.262768, + (GLfloat) - 0.980604, (GLfloat) - 0.172854, (GLfloat) - 0.092393, + (GLfloat) - 0.980604, (GLfloat) 0.172854, (GLfloat) 0.092393, + (GLfloat) - 0.830227, (GLfloat) 0.491605, (GLfloat) 0.262768, + (GLfloat) - 0.553717, (GLfloat) 0.734380, (GLfloat) 0.392534, + (GLfloat) - 0.194187, (GLfloat) 0.865134, (GLfloat) 0.462424, + (GLfloat) 0.194187, (GLfloat) 0.865134, (GLfloat) 0.462423, + (GLfloat) 0.553716, (GLfloat) 0.734381, (GLfloat) 0.392534, + (GLfloat) 0.830227, (GLfloat) 0.491605, (GLfloat) 0.262768, + (GLfloat) 0.980604, (GLfloat) 0.172854, (GLfloat) 0.092393, + (GLfloat) 0.980604, (GLfloat) - 0.172854, (GLfloat) - 0.092393, + (GLfloat) 0.830228, (GLfloat) - 0.491604, (GLfloat) - 0.262768, + (GLfloat) 0.553716, (GLfloat) - 0.734381, (GLfloat) - 0.392535, + (GLfloat) 0.194186, (GLfloat) - 0.758296, (GLfloat) - 0.622317, + (GLfloat) - 0.194186, (GLfloat) - 0.758296, (GLfloat) - 0.622318, + (GLfloat) - 0.553717, (GLfloat) - 0.643690, (GLfloat) - 0.528263, + (GLfloat) - 0.830228, (GLfloat) - 0.430895, (GLfloat) - 0.353626, + (GLfloat) - 0.980604, (GLfloat) - 0.151508, (GLfloat) - 0.124340, + (GLfloat) - 0.980604, (GLfloat) 0.151508, (GLfloat) 0.124339, + (GLfloat) - 0.830227, (GLfloat) 0.430895, (GLfloat) 0.353627, + (GLfloat) - 0.553717, (GLfloat) 0.643690, (GLfloat) 0.528263, + (GLfloat) - 0.194186, (GLfloat) 0.758296, (GLfloat) 0.622317, + (GLfloat) 0.194186, (GLfloat) 0.758296, (GLfloat) 0.622318, + (GLfloat) 0.553716, (GLfloat) 0.643690, (GLfloat) 0.528263, + (GLfloat) 0.830227, (GLfloat) 0.430895, (GLfloat) 0.353627, + (GLfloat) 0.980604, (GLfloat) 0.151508, (GLfloat) 0.124339, + (GLfloat) 0.980604, (GLfloat) - 0.151508, (GLfloat) - 0.124340, + (GLfloat) 0.830228, (GLfloat) - 0.430895, (GLfloat) - 0.353626, + (GLfloat) 0.553716, (GLfloat) - 0.643690, (GLfloat) - 0.528263, + (GLfloat) 0.194186, (GLfloat) - 0.622317, (GLfloat) - 0.758296, + (GLfloat) - 0.194185, (GLfloat) - 0.622318, (GLfloat) - 0.758296, + (GLfloat) - 0.553717, (GLfloat) - 0.528263, (GLfloat) - 0.643690, + (GLfloat) - 0.830228, (GLfloat) - 0.353626, (GLfloat) - 0.430895, + (GLfloat) - 0.980604, (GLfloat) - 0.124339, (GLfloat) - 0.151508, + (GLfloat) - 0.980604, (GLfloat) 0.124339, (GLfloat) 0.151508, + (GLfloat) - 0.830227, (GLfloat) 0.353627, (GLfloat) 0.430895, + (GLfloat) - 0.553717, (GLfloat) 0.528262, (GLfloat) 0.643689, + (GLfloat) - 0.194187, (GLfloat) 0.622317, (GLfloat) 0.758296, + (GLfloat) 0.194187, (GLfloat) 0.622317, (GLfloat) 0.758296, + (GLfloat) 0.553716, (GLfloat) 0.528263, (GLfloat) 0.643690, + (GLfloat) 0.830227, (GLfloat) 0.353627, (GLfloat) 0.430895, + (GLfloat) 0.980604, (GLfloat) 0.124339, (GLfloat) 0.151508, + (GLfloat) 0.980604, (GLfloat) - 0.124340, (GLfloat) - 0.151508, + (GLfloat) 0.830228, (GLfloat) - 0.353626, (GLfloat) - 0.430895, + (GLfloat) 0.553716, (GLfloat) - 0.528263, (GLfloat) - 0.643690, + (GLfloat) 0.194186, (GLfloat) - 0.462423, (GLfloat) - 0.865134, + (GLfloat) - 0.194185, (GLfloat) - 0.462424, (GLfloat) - 0.865134, + (GLfloat) - 0.553717, (GLfloat) - 0.392534, (GLfloat) - 0.734380, + (GLfloat) - 0.830228, (GLfloat) - 0.262768, (GLfloat) - 0.491604, + (GLfloat) - 0.980604, (GLfloat) - 0.092393, (GLfloat) - 0.172855, + (GLfloat) - 0.980604, (GLfloat) 0.092393, (GLfloat) 0.172854, + (GLfloat) - 0.830227, (GLfloat) 0.262768, (GLfloat) 0.491605, + (GLfloat) - 0.553717, (GLfloat) 0.392534, (GLfloat) 0.734380, + (GLfloat) - 0.194186, (GLfloat) 0.462424, (GLfloat) 0.865134, + (GLfloat) 0.194187, (GLfloat) 0.462423, (GLfloat) 0.865134, + (GLfloat) 0.553716, (GLfloat) 0.392535, (GLfloat) 0.734381, + (GLfloat) 0.830228, (GLfloat) 0.262768, (GLfloat) 0.491605, + (GLfloat) 0.980604, (GLfloat) 0.092393, (GLfloat) 0.172854, + (GLfloat) 0.980604, (GLfloat) - 0.092393, (GLfloat) - 0.172855, + (GLfloat) 0.830228, (GLfloat) - 0.262768, (GLfloat) - 0.491604, + (GLfloat) 0.553716, (GLfloat) - 0.392535, (GLfloat) - 0.734381, + (GLfloat) 0.194185, (GLfloat) - 0.284759, (GLfloat) - 0.938725, + (GLfloat) - 0.194185, (GLfloat) - 0.284759, (GLfloat) - 0.938725, + (GLfloat) - 0.553718, (GLfloat) - 0.241721, (GLfloat) - 0.796848, + (GLfloat) - 0.830228, (GLfloat) - 0.161812, (GLfloat) - 0.533422, + (GLfloat) - 0.980604, (GLfloat) - 0.056895, (GLfloat) - 0.187558, + (GLfloat) - 0.980605, (GLfloat) 0.056895, (GLfloat) 0.187557, + (GLfloat) - 0.830227, (GLfloat) 0.161812, (GLfloat) 0.533422, + (GLfloat) - 0.553716, (GLfloat) 0.241722, (GLfloat) 0.796849, + (GLfloat) - 0.194187, (GLfloat) 0.284759, (GLfloat) 0.938725, + (GLfloat) 0.194188, (GLfloat) 0.284759, (GLfloat) 0.938724, + (GLfloat) 0.553716, (GLfloat) 0.241722, (GLfloat) 0.796850, + (GLfloat) 0.830227, (GLfloat) 0.161812, (GLfloat) 0.533423, + (GLfloat) 0.980604, (GLfloat) 0.056895, (GLfloat) 0.187557, + (GLfloat) 0.980604, (GLfloat) - 0.056895, (GLfloat) - 0.187558, + (GLfloat) 0.830228, (GLfloat) - 0.161812, (GLfloat) - 0.533422, + (GLfloat) 0.553717, (GLfloat) - 0.241722, (GLfloat) - 0.796849, + (GLfloat) 0.194186, (GLfloat) - 0.096151, (GLfloat) - 0.976241, + (GLfloat) - 0.194186, (GLfloat) - 0.096151, (GLfloat) - 0.976241, + (GLfloat) - 0.553717, (GLfloat) - 0.081619, (GLfloat) - 0.828695, + (GLfloat) - 0.830228, (GLfloat) - 0.054637, (GLfloat) - 0.554740, + (GLfloat) - 0.980604, (GLfloat) - 0.019211, (GLfloat) - 0.195054, + (GLfloat) - 0.980604, (GLfloat) 0.019211, (GLfloat) 0.195054, + (GLfloat) - 0.830227, (GLfloat) 0.054637, (GLfloat) 0.554741, + (GLfloat) - 0.553717, (GLfloat) 0.081619, (GLfloat) 0.828695, + (GLfloat) - 0.194187, (GLfloat) 0.096151, (GLfloat) 0.976241, + (GLfloat) 0.194187, (GLfloat) 0.096151, (GLfloat) 0.976241, + (GLfloat) 0.553716, (GLfloat) 0.081620, (GLfloat) 0.828696, + (GLfloat) 0.830227, (GLfloat) 0.054637, (GLfloat) 0.554741, + (GLfloat) 0.980604, (GLfloat) 0.019211, (GLfloat) 0.195054, + (GLfloat) 0.980604, (GLfloat) - 0.019211, (GLfloat) - 0.195054, + (GLfloat) 0.830228, (GLfloat) - 0.054637, (GLfloat) - 0.554740, + (GLfloat) 0.553716, (GLfloat) - 0.081619, (GLfloat) - 0.828696, + (GLfloat) 0.194185, (GLfloat) 0.096151, (GLfloat) - 0.976241, + (GLfloat) - 0.194185, (GLfloat) 0.096151, (GLfloat) - 0.976241, + (GLfloat) - 0.553718, (GLfloat) 0.081619, (GLfloat) - 0.828695, + (GLfloat) - 0.830228, (GLfloat) 0.054637, (GLfloat) - 0.554740, + (GLfloat) - 0.980604, (GLfloat) 0.019211, (GLfloat) - 0.195054, + (GLfloat) - 0.980605, (GLfloat) - 0.019211, (GLfloat) 0.195053, + (GLfloat) - 0.830227, (GLfloat) - 0.054637, (GLfloat) 0.554741, + (GLfloat) - 0.553717, (GLfloat) - 0.081619, (GLfloat) 0.828695, + (GLfloat) - 0.194187, (GLfloat) - 0.096151, (GLfloat) 0.976241, + (GLfloat) 0.194188, (GLfloat) - 0.096151, (GLfloat) 0.976241, + (GLfloat) 0.553716, (GLfloat) - 0.081619, (GLfloat) 0.828696, + (GLfloat) 0.830227, (GLfloat) - 0.054637, (GLfloat) 0.554741, + (GLfloat) 0.980604, (GLfloat) - 0.019211, (GLfloat) 0.195053, + (GLfloat) 0.980604, (GLfloat) 0.019211, (GLfloat) - 0.195054, + (GLfloat) 0.830228, (GLfloat) 0.054637, (GLfloat) - 0.554740, + (GLfloat) 0.553717, (GLfloat) 0.081619, (GLfloat) - 0.828695, + (GLfloat) 0.194186, (GLfloat) 0.284759, (GLfloat) - 0.938725, + (GLfloat) - 0.194185, (GLfloat) 0.284759, (GLfloat) - 0.938725, + (GLfloat) - 0.553717, (GLfloat) 0.241721, (GLfloat) - 0.796849, + (GLfloat) - 0.830228, (GLfloat) 0.161812, (GLfloat) - 0.533421, + (GLfloat) - 0.980604, (GLfloat) 0.056895, (GLfloat) - 0.187558, + (GLfloat) - 0.980604, (GLfloat) - 0.056895, (GLfloat) 0.187558, + (GLfloat) - 0.830227, (GLfloat) - 0.161812, (GLfloat) 0.533422, + (GLfloat) - 0.553717, (GLfloat) - 0.241722, (GLfloat) 0.796849, + (GLfloat) - 0.194186, (GLfloat) - 0.284759, (GLfloat) 0.938725, + (GLfloat) 0.194187, (GLfloat) - 0.284759, (GLfloat) 0.938724, + (GLfloat) 0.553716, (GLfloat) - 0.241722, (GLfloat) 0.796849, + (GLfloat) 0.830227, (GLfloat) - 0.161812, (GLfloat) 0.533422, + (GLfloat) 0.980604, (GLfloat) - 0.056895, (GLfloat) 0.187558, + (GLfloat) 0.980604, (GLfloat) 0.056895, (GLfloat) - 0.187558, + (GLfloat) 0.830228, (GLfloat) 0.161811, (GLfloat) - 0.533421, + (GLfloat) 0.553716, (GLfloat) 0.241722, (GLfloat) - 0.796850, + (GLfloat) 0.194186, (GLfloat) 0.462423, (GLfloat) - 0.865134, + (GLfloat) - 0.194185, (GLfloat) 0.462424, (GLfloat) - 0.865134, + (GLfloat) - 0.553717, (GLfloat) 0.392534, (GLfloat) - 0.734380, + (GLfloat) - 0.830228, (GLfloat) 0.262768, (GLfloat) - 0.491604, + (GLfloat) - 0.980604, (GLfloat) 0.092393, (GLfloat) - 0.172854, + (GLfloat) - 0.980604, (GLfloat) - 0.092393, (GLfloat) 0.172854, + (GLfloat) - 0.830227, (GLfloat) - 0.262768, (GLfloat) 0.491605, + (GLfloat) - 0.553717, (GLfloat) - 0.392534, (GLfloat) 0.734380, + (GLfloat) - 0.194187, (GLfloat) - 0.462424, (GLfloat) 0.865134, + (GLfloat) 0.194187, (GLfloat) - 0.462423, (GLfloat) 0.865134, + (GLfloat) 0.553716, (GLfloat) - 0.392534, (GLfloat) 0.734381, + (GLfloat) 0.830227, (GLfloat) - 0.262768, (GLfloat) 0.491605, + (GLfloat) 0.980604, (GLfloat) - 0.092393, (GLfloat) 0.172854, + (GLfloat) 0.980604, (GLfloat) 0.092393, (GLfloat) - 0.172854, + (GLfloat) 0.830228, (GLfloat) 0.262768, (GLfloat) - 0.491604, + (GLfloat) 0.553716, (GLfloat) 0.392535, (GLfloat) - 0.734381, + (GLfloat) 0.194186, (GLfloat) 0.622317, (GLfloat) - 0.758296, + (GLfloat) - 0.194186, (GLfloat) 0.622318, (GLfloat) - 0.758296, + (GLfloat) - 0.553717, (GLfloat) 0.528263, (GLfloat) - 0.643690, + (GLfloat) - 0.830228, (GLfloat) 0.353626, (GLfloat) - 0.430895, + (GLfloat) - 0.980604, (GLfloat) 0.124340, (GLfloat) - 0.151508, + (GLfloat) - 0.980604, (GLfloat) - 0.124339, (GLfloat) 0.151508, + (GLfloat) - 0.830227, (GLfloat) - 0.353627, (GLfloat) 0.430895, + (GLfloat) - 0.553717, (GLfloat) - 0.528263, (GLfloat) 0.643690, + (GLfloat) - 0.194186, (GLfloat) - 0.622317, (GLfloat) 0.758296, + (GLfloat) 0.194186, (GLfloat) - 0.622318, (GLfloat) 0.758296, + (GLfloat) 0.553716, (GLfloat) - 0.528263, (GLfloat) 0.643690, + (GLfloat) 0.830227, (GLfloat) - 0.353627, (GLfloat) 0.430895, + (GLfloat) 0.980604, (GLfloat) - 0.124339, (GLfloat) 0.151508, + (GLfloat) 0.980604, (GLfloat) 0.124340, (GLfloat) - 0.151508, + (GLfloat) 0.830228, (GLfloat) 0.353626, (GLfloat) - 0.430895, + (GLfloat) 0.553716, (GLfloat) 0.528263, (GLfloat) - 0.643690, + (GLfloat) 0.194186, (GLfloat) 0.758296, (GLfloat) - 0.622317, + (GLfloat) - 0.194185, (GLfloat) 0.758296, (GLfloat) - 0.622318, + (GLfloat) - 0.553717, (GLfloat) 0.643690, (GLfloat) - 0.528263, + (GLfloat) - 0.830228, (GLfloat) 0.430895, (GLfloat) - 0.353626, + (GLfloat) - 0.980604, (GLfloat) 0.151508, (GLfloat) - 0.124339, + (GLfloat) - 0.980604, (GLfloat) - 0.151508, (GLfloat) 0.124339, + (GLfloat) - 0.830227, (GLfloat) - 0.430895, (GLfloat) 0.353627, + (GLfloat) - 0.553717, (GLfloat) - 0.643689, (GLfloat) 0.528262, + (GLfloat) - 0.194187, (GLfloat) - 0.758296, (GLfloat) 0.622317, + (GLfloat) 0.194187, (GLfloat) - 0.758296, (GLfloat) 0.622317, + (GLfloat) 0.553716, (GLfloat) - 0.643690, (GLfloat) 0.528263, + (GLfloat) 0.830227, (GLfloat) - 0.430895, (GLfloat) 0.353627, + (GLfloat) 0.980604, (GLfloat) - 0.151508, (GLfloat) 0.124339, + (GLfloat) 0.980604, (GLfloat) 0.151508, (GLfloat) - 0.124340, + (GLfloat) 0.830228, (GLfloat) 0.430895, (GLfloat) - 0.353626, + (GLfloat) 0.553716, (GLfloat) 0.643690, (GLfloat) - 0.528263, + (GLfloat) 0.194186, (GLfloat) 0.865134, (GLfloat) - 0.462423, + (GLfloat) - 0.194185, (GLfloat) 0.865134, (GLfloat) - 0.462424, + (GLfloat) - 0.553717, (GLfloat) 0.734380, (GLfloat) - 0.392534, + (GLfloat) - 0.830228, (GLfloat) 0.491604, (GLfloat) - 0.262768, + (GLfloat) - 0.980604, (GLfloat) 0.172855, (GLfloat) - 0.092393, + (GLfloat) - 0.980604, (GLfloat) - 0.172854, (GLfloat) 0.092393, + (GLfloat) - 0.830227, (GLfloat) - 0.491605, (GLfloat) 0.262768, + (GLfloat) - 0.553717, (GLfloat) - 0.734380, (GLfloat) 0.392534, + (GLfloat) - 0.194186, (GLfloat) - 0.865134, (GLfloat) 0.462424, + (GLfloat) 0.194187, (GLfloat) - 0.865134, (GLfloat) 0.462423, + (GLfloat) 0.553716, (GLfloat) - 0.734381, (GLfloat) 0.392535, + (GLfloat) 0.830228, (GLfloat) - 0.491605, (GLfloat) 0.262768, + (GLfloat) 0.980604, (GLfloat) - 0.172854, (GLfloat) 0.092393, + (GLfloat) 0.980604, (GLfloat) 0.172855, (GLfloat) - 0.092393, + (GLfloat) 0.830228, (GLfloat) 0.491604, (GLfloat) - 0.262768, + (GLfloat) 0.553716, (GLfloat) 0.734381, (GLfloat) - 0.392535, + (GLfloat) 0.194185, (GLfloat) 0.938725, (GLfloat) - 0.284759, + (GLfloat) - 0.194185, (GLfloat) 0.938725, (GLfloat) - 0.284759, + (GLfloat) - 0.553718, (GLfloat) 0.796848, (GLfloat) - 0.241721, + (GLfloat) - 0.830228, (GLfloat) 0.533422, (GLfloat) - 0.161812, + (GLfloat) - 0.980604, (GLfloat) 0.187558, (GLfloat) - 0.056895, + (GLfloat) - 0.980605, (GLfloat) - 0.187557, (GLfloat) 0.056895, + (GLfloat) - 0.830227, (GLfloat) - 0.533422, (GLfloat) 0.161812, + (GLfloat) - 0.553716, (GLfloat) - 0.796849, (GLfloat) 0.241722, + (GLfloat) - 0.194187, (GLfloat) - 0.938725, (GLfloat) 0.284759, + (GLfloat) 0.194188, (GLfloat) - 0.938724, (GLfloat) 0.284759, + (GLfloat) 0.553716, (GLfloat) - 0.796850, (GLfloat) 0.241722, + (GLfloat) 0.830227, (GLfloat) - 0.533423, (GLfloat) 0.161812, + (GLfloat) 0.980604, (GLfloat) - 0.187557, (GLfloat) 0.056895, + (GLfloat) 0.980604, (GLfloat) 0.187558, (GLfloat) - 0.056895, + (GLfloat) 0.830228, (GLfloat) 0.533422, (GLfloat) - 0.161812, + (GLfloat) 0.553717, (GLfloat) 0.796849, (GLfloat) - 0.241722, + (GLfloat) 0.194186, (GLfloat) 0.976241, (GLfloat) - 0.096151, + (GLfloat) - 0.194186, (GLfloat) 0.976241, (GLfloat) - 0.096151, + (GLfloat) - 0.553717, (GLfloat) 0.828695, (GLfloat) - 0.081619, + (GLfloat) - 0.830228, (GLfloat) 0.554740, (GLfloat) - 0.054637, + (GLfloat) - 0.980604, (GLfloat) 0.195054, (GLfloat) - 0.019211, + (GLfloat) - 0.980604, (GLfloat) - 0.195054, (GLfloat) 0.019211, + (GLfloat) - 0.830227, (GLfloat) - 0.554741, (GLfloat) 0.054637, + (GLfloat) - 0.553717, (GLfloat) - 0.828695, (GLfloat) 0.081619, + (GLfloat) - 0.194187, (GLfloat) - 0.976241, (GLfloat) 0.096151, + (GLfloat) 0.194187, (GLfloat) - 0.976241, (GLfloat) 0.096151, + (GLfloat) 0.553716, (GLfloat) - 0.828696, (GLfloat) 0.081620, + (GLfloat) 0.830227, (GLfloat) - 0.554741, (GLfloat) 0.054637, + (GLfloat) 0.980604, (GLfloat) - 0.195054, (GLfloat) 0.019211, + (GLfloat) 0.980604, (GLfloat) 0.195054, (GLfloat) - 0.019211, + (GLfloat) 0.830228, (GLfloat) 0.554740, (GLfloat) - 0.054637, + (GLfloat) 0.553716, (GLfloat) 0.828696, (GLfloat) - 0.081619, +}; + +static unsigned short int BigValve_POLS[] = +{ + 16, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 1, 4, 700, + 701, 685, 684, 1, 4, 701, 702, 686, 685, 1, 4, 702, 703, 687, 686, 1, 4, 703, 704, 688, + 687, 1, 4, 704, 705, 689, 688, 1, 4, 705, 706, 690, 689, 1, 4, 706, 707, 691, 690, 1, + 4, 707, 708, 692, 691, 1, 4, 708, 709, 693, 692, 1, 4, 709, 710, 694, 693, 1, 4, 710, + 711, 695, 694, 1, 4, 711, 712, 696, 695, 1, 4, 712, 713, 697, 696, 1, 4, 713, 714, 698, + 697, 1, 4, 714, 715, 699, 698, 1, 4, 715, 700, 684, 699, 1, 16, 700, 715, 714, 713, 712, + 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 1, 4, 668, 669, 655, 654, 1, 4, 669, + 670, 656, 655, 1, 4, 670, 671, 657, 656, 1, 4, 671, 672, 634, 657, 1, 4, 672, 673, 658, + 634, 1, 4, 673, 674, 659, 658, 1, 4, 674, 675, 660, 659, 1, 4, 675, 676, 661, 660, 1, + 4, 676, 677, 662, 661, 1, 4, 677, 678, 663, 662, 1, 4, 678, 679, 664, 663, 1, 4, 679, + 680, 564, 664, 1, 4, 680, 681, 665, 564, 1, 4, 681, 682, 666, 665, 1, 4, 682, 683, 667, + 666, 1, 4, 683, 668, 654, 667, 1, 4, 638, 639, 624, 623, 1, 4, 639, 640, 625, 624, 1, + 4, 640, 641, 626, 625, 1, 4, 641, 642, 603, 626, 1, 4, 642, 643, 627, 603, 1, 4, 643, + 644, 628, 627, 1, 4, 644, 645, 629, 628, 1, 4, 645, 646, 630, 629, 1, 4, 646, 647, 631, + 630, 1, 4, 647, 648, 632, 631, 1, 4, 648, 649, 633, 632, 1, 4, 649, 650, 634, 633, 1, + 4, 650, 651, 635, 634, 1, 4, 651, 652, 636, 635, 1, 4, 652, 653, 637, 636, 1, 4, 653, + 638, 623, 637, 1, 4, 607, 608, 593, 592, 1, 4, 608, 609, 594, 593, 1, 4, 609, 610, 595, + 594, 1, 4, 610, 611, 572, 595, 1, 4, 611, 612, 596, 572, 1, 4, 612, 613, 597, 596, 1, + 4, 613, 614, 598, 597, 1, 4, 614, 615, 599, 598, 1, 4, 615, 616, 600, 599, 1, 4, 616, + 617, 601, 600, 1, 4, 617, 618, 602, 601, 1, 4, 618, 619, 603, 602, 1, 4, 619, 620, 604, + 603, 1, 4, 620, 621, 605, 604, 1, 4, 621, 622, 606, 605, 1, 4, 622, 607, 592, 606, 1, + 4, 576, 577, 561, 560, 1, 4, 577, 578, 562, 561, 1, 4, 578, 579, 563, 562, 1, 4, 579, + 580, 564, 563, 1, 4, 580, 581, 565, 564, 1, 4, 581, 582, 566, 565, 1, 4, 582, 583, 567, + 566, 1, 4, 583, 584, 568, 567, 1, 4, 584, 585, 569, 568, 1, 4, 585, 586, 570, 569, 1, + 4, 586, 587, 571, 570, 1, 4, 587, 588, 572, 571, 1, 4, 588, 589, 573, 572, 1, 4, 589, + 590, 574, 573, 1, 4, 590, 591, 575, 574, 1, 4, 591, 576, 560, 575, 1, 24, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 1, 4, 536, 537, 513, 512, 1, 4, 537, 538, 514, 513, 1, 4, 538, 539, 515, 514, 1, + 4, 539, 540, 516, 515, 1, 4, 540, 541, 517, 516, 1, 4, 541, 542, 518, 517, 1, 4, 542, + 543, 519, 518, 1, 4, 543, 544, 520, 519, 1, 4, 544, 545, 521, 520, 1, 4, 545, 546, 522, + 521, 1, 4, 546, 547, 523, 522, 1, 4, 547, 548, 524, 523, 1, 4, 548, 549, 525, 524, 1, + 4, 549, 550, 526, 525, 1, 4, 550, 551, 527, 526, 1, 4, 551, 552, 528, 527, 1, 4, 552, + 553, 529, 528, 1, 4, 553, 554, 530, 529, 1, 4, 554, 555, 531, 530, 1, 4, 555, 556, 532, + 531, 1, 4, 556, 557, 533, 532, 1, 4, 557, 558, 534, 533, 1, 4, 558, 559, 535, 534, 1, + 4, 559, 536, 512, 535, 1, 24, 536, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, + 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 1, 4, 16, 31, 15, 0, 1, 4, 31, + 30, 14, 15, 1, 4, 30, 29, 13, 14, 1, 4, 29, 28, 12, 13, 1, 4, 28, 27, 11, + 12, 1, 4, 27, 26, 10, 11, 1, 4, 26, 25, 9, 10, 1, 4, 25, 24, 8, 9, 1, + 4, 24, 23, 7, 8, 1, 4, 23, 22, 6, 7, 1, 4, 22, 21, 5, 6, 1, 4, 21, + 20, 4, 5, 1, 4, 20, 19, 3, 4, 1, 4, 19, 18, 2, 3, 1, 4, 18, 17, 1, + 2, 1, 4, 17, 16, 0, 1, 1, 4, 32, 47, 31, 16, 1, 4, 47, 46, 30, 31, 1, + 4, 46, 45, 29, 30, 1, 4, 45, 44, 28, 29, 1, 4, 44, 43, 27, 28, 1, 4, 43, + 42, 26, 27, 1, 4, 42, 41, 25, 26, 1, 4, 41, 40, 24, 25, 1, 4, 40, 39, 23, + 24, 1, 4, 39, 38, 22, 23, 1, 4, 38, 37, 21, 22, 1, 4, 37, 36, 20, 21, 1, + 4, 36, 35, 19, 20, 1, 4, 35, 34, 18, 19, 1, 4, 34, 33, 17, 18, 1, 4, 33, + 32, 16, 17, 1, 4, 48, 63, 47, 32, 1, 4, 63, 62, 46, 47, 1, 4, 62, 61, 45, + 46, 1, 4, 61, 60, 44, 45, 1, 4, 60, 59, 43, 44, 1, 4, 59, 58, 42, 43, 1, + 4, 58, 57, 41, 42, 1, 4, 57, 56, 40, 41, 1, 4, 56, 55, 39, 40, 1, 4, 55, + 54, 38, 39, 1, 4, 54, 53, 37, 38, 1, 4, 53, 52, 36, 37, 1, 4, 52, 51, 35, + 36, 1, 4, 51, 50, 34, 35, 1, 4, 50, 49, 33, 34, 1, 4, 49, 48, 32, 33, 1, + 4, 64, 79, 63, 48, 1, 4, 79, 78, 62, 63, 1, 4, 78, 77, 61, 62, 1, 4, 77, + 76, 60, 61, 1, 4, 76, 75, 59, 60, 1, 4, 75, 74, 58, 59, 1, 4, 74, 73, 57, + 58, 1, 4, 73, 72, 56, 57, 1, 4, 72, 71, 55, 56, 1, 4, 71, 70, 54, 55, 1, + 4, 70, 69, 53, 54, 1, 4, 69, 68, 52, 53, 1, 4, 68, 67, 51, 52, 1, 4, 67, + 66, 50, 51, 1, 4, 66, 65, 49, 50, 1, 4, 65, 64, 48, 49, 1, 4, 80, 95, 79, + 64, 1, 4, 95, 94, 78, 79, 1, 4, 94, 93, 77, 78, 1, 4, 93, 92, 76, 77, 1, + 4, 92, 91, 75, 76, 1, 4, 91, 90, 74, 75, 1, 4, 90, 89, 73, 74, 1, 4, 89, + 88, 72, 73, 1, 4, 88, 87, 71, 72, 1, 4, 87, 86, 70, 71, 1, 4, 86, 85, 69, + 70, 1, 4, 85, 84, 68, 69, 1, 4, 84, 83, 67, 68, 1, 4, 83, 82, 66, 67, 1, + 4, 82, 81, 65, 66, 1, 4, 81, 80, 64, 65, 1, 4, 96, 111, 95, 80, 1, 4, 111, + 110, 94, 95, 1, 4, 110, 109, 93, 94, 1, 4, 109, 108, 92, 93, 1, 4, 108, 107, 91, +92, 1, 4, 107, 106, 90, 91, 1, 4, 106, 105, 89, 90, 1, 4, 105, 104, 88, 89, 1, + 4, 104, 103, 87, 88, 1, 4, 103, 102, 86, 87, 1, 4, 102, 101, 85, 86, 1, 4, 101, + 100, 84, 85, 1, 4, 100, 99, 83, 84, 1, 4, 99, 98, 82, 83, 1, 4, 98, 97, 81, + 82, 1, 4, 97, 96, 80, 81, 1, 4, 112, 127, 111, 96, 1, 4, 127, 126, 110, 111, 1, + 4, 126, 125, 109, 110, 1, 4, 125, 124, 108, 109, 1, 4, 124, 123, 107, 108, 1, 4, 123, + 122, 106, 107, 1, 4, 122, 121, 105, 106, 1, 4, 121, 120, 104, 105, 1, 4, 120, 119, 103, + 104, 1, 4, 119, 118, 102, 103, 1, 4, 118, 117, 101, 102, 1, 4, 117, 116, 100, 101, 1, + 4, 116, 115, 99, 100, 1, 4, 115, 114, 98, 99, 1, 4, 114, 113, 97, 98, 1, 4, 113, + 112, 96, 97, 1, 4, 128, 143, 127, 112, 1, 4, 143, 142, 126, 127, 1, 4, 142, 141, 125, + 126, 1, 4, 141, 140, 124, 125, 1, 4, 140, 139, 123, 124, 1, 4, 139, 138, 122, 123, 1, + 4, 138, 137, 121, 122, 1, 4, 137, 136, 120, 121, 1, 4, 136, 135, 119, 120, 1, 4, 135, + 134, 118, 119, 1, 4, 134, 133, 117, 118, 1, 4, 133, 132, 116, 117, 1, 4, 132, 131, 115, + 116, 1, 4, 131, 130, 114, 115, 1, 4, 130, 129, 113, 114, 1, 4, 129, 128, 112, 113, 1, + 4, 144, 159, 143, 128, 1, 4, 159, 158, 142, 143, 1, 4, 158, 157, 141, 142, 1, 4, 157, + 156, 140, 141, 1, 4, 156, 155, 139, 140, 1, 4, 155, 154, 138, 139, 1, 4, 154, 153, 137, + 138, 1, 4, 153, 152, 136, 137, 1, 4, 152, 151, 135, 136, 1, 4, 151, 150, 134, 135, 1, + 4, 150, 149, 133, 134, 1, 4, 149, 148, 132, 133, 1, 4, 148, 147, 131, 132, 1, 4, 147, + 146, 130, 131, 1, 4, 146, 145, 129, 130, 1, 4, 145, 144, 128, 129, 1, 4, 160, 175, 159, + 144, 1, 4, 175, 174, 158, 159, 1, 4, 174, 173, 157, 158, 1, 4, 173, 172, 156, 157, 1, + 4, 172, 171, 155, 156, 1, 4, 171, 170, 154, 155, 1, 4, 170, 169, 153, 154, 1, 4, 169, + 168, 152, 153, 1, 4, 168, 167, 151, 152, 1, 4, 167, 166, 150, 151, 1, 4, 166, 165, 149, + 150, 1, 4, 165, 164, 148, 149, 1, 4, 164, 163, 147, 148, 1, 4, 163, 162, 146, 147, 1, + 4, 162, 161, 145, 146, 1, 4, 161, 160, 144, 145, 1, 4, 176, 191, 175, 160, 1, 4, 191, + 190, 174, 175, 1, 4, 190, 189, 173, 174, 1, 4, 189, 188, 172, 173, 1, 4, 188, 187, 171, + 172, 1, 4, 187, 186, 170, 171, 1, 4, 186, 185, 169, 170, 1, 4, 185, 184, 168, 169, 1, + 4, 184, 183, 167, 168, 1, 4, 183, 182, 166, 167, 1, 4, 182, 181, 165, 166, 1, 4, 181, + 180, 164, 165, 1, 4, 180, 179, 163, 164, 1, 4, 179, 178, 162, 163, 1, 4, 178, 177, 161, + 162, 1, 4, 177, 176, 160, 161, 1, 4, 192, 207, 191, 176, 1, 4, 207, 206, 190, 191, 1, + 4, 206, 205, 189, 190, 1, 4, 205, 204, 188, 189, 1, 4, 204, 203, 187, 188, 1, 4, 203, + 202, 186, 187, 1, 4, 202, 201, 185, 186, 1, 4, 201, 200, 184, 185, 1, 4, 200, 199, 183, + 184, 1, 4, 199, 198, 182, 183, 1, 4, 198, 197, 181, 182, 1, 4, 197, 196, 180, 181, 1, + 4, 196, 195, 179, 180, 1, 4, 195, 194, 178, 179, 1, 4, 194, 193, 177, 178, 1, 4, 193, + 192, 176, 177, 1, 4, 208, 223, 207, 192, 1, 4, 223, 222, 206, 207, 1, 4, 222, 221, 205, + 206, 1, 4, 221, 220, 204, 205, 1, 4, 220, 219, 203, 204, 1, 4, 219, 218, 202, 203, 1, + 4, 218, 217, 201, 202, 1, 4, 217, 216, 200, 201, 1, 4, 216, 215, 199, 200, 1, 4, 215, + 214, 198, 199, 1, 4, 214, 213, 197, 198, 1, 4, 213, 212, 196, 197, 1, 4, 212, 211, 195, + 196, 1, 4, 211, 210, 194, 195, 1, 4, 210, 209, 193, 194, 1, 4, 209, 208, 192, 193, 1, + 4, 224, 239, 223, 208, 1, 4, 239, 238, 222, 223, 1, 4, 238, 237, 221, 222, 1, 4, 237, + 236, 220, 221, 1, 4, 236, 235, 219, 220, 1, 4, 235, 234, 218, 219, 1, 4, 234, 233, 217, + 218, 1, 4, 233, 232, 216, 217, 1, 4, 232, 231, 215, 216, 1, 4, 231, 230, 214, 215, 1, + 4, 230, 229, 213, 214, 1, 4, 229, 228, 212, 213, 1, 4, 228, 227, 211, 212, 1, 4, 227, + 226, 210, 211, 1, 4, 226, 225, 209, 210, 1, 4, 225, 224, 208, 209, 1, 4, 240, 255, 239, + 224, 1, 4, 255, 254, 238, 239, 1, 4, 254, 253, 237, 238, 1, 4, 253, 252, 236, 237, 1, + 4, 252, 251, 235, 236, 1, 4, 251, 250, 234, 235, 1, 4, 250, 249, 233, 234, 1, 4, 249, + 248, 232, 233, 1, 4, 248, 247, 231, 232, 1, 4, 247, 246, 230, 231, 1, 4, 246, 245, 229, + 230, 1, 4, 245, 244, 228, 229, 1, 4, 244, 243, 227, 228, 1, 4, 243, 242, 226, 227, 1, + 4, 242, 241, 225, 226, 1, 4, 241, 240, 224, 225, 1, 4, 256, 271, 255, 240, 1, 4, 271, + 270, 254, 255, 1, 4, 270, 269, 253, 254, 1, 4, 269, 268, 252, 253, 1, 4, 268, 267, 251, + 252, 1, 4, 267, 266, 250, 251, 1, 4, 266, 265, 249, 250, 1, 4, 265, 264, 248, 249, 1, + 4, 264, 263, 247, 248, 1, 4, 263, 262, 246, 247, 1, 4, 262, 261, 245, 246, 1, 4, 261, + 260, 244, 245, 1, 4, 260, 259, 243, 244, 1, 4, 259, 258, 242, 243, 1, 4, 258, 257, 241, + 242, 1, 4, 257, 256, 240, 241, 1, 4, 272, 287, 271, 256, 1, 4, 287, 286, 270, 271, 1, + 4, 286, 285, 269, 270, 1, 4, 285, 284, 268, 269, 1, 4, 284, 283, 267, 268, 1, 4, 283, + 282, 266, 267, 1, 4, 282, 281, 265, 266, 1, 4, 281, 280, 264, 265, 1, 4, 280, 279, 263, + 264, 1, 4, 279, 278, 262, 263, 1, 4, 278, 277, 261, 262, 1, 4, 277, 276, 260, 261, 1, + 4, 276, 275, 259, 260, 1, 4, 275, 274, 258, 259, 1, 4, 274, 273, 257, 258, 1, 4, 273, + 272, 256, 257, 1, 4, 288, 303, 287, 272, 1, 4, 303, 302, 286, 287, 1, 4, 302, 301, 285, + 286, 1, 4, 301, 300, 284, 285, 1, 4, 300, 299, 283, 284, 1, 4, 299, 298, 282, 283, 1, + 4, 298, 297, 281, 282, 1, 4, 297, 296, 280, 281, 1, 4, 296, 295, 279, 280, 1, 4, 295, + 294, 278, 279, 1, 4, 294, 293, 277, 278, 1, 4, 293, 292, 276, 277, 1, 4, 292, 291, 275, + 276, 1, 4, 291, 290, 274, 275, 1, 4, 290, 289, 273, 274, 1, 4, 289, 288, 272, 273, 1, + 4, 304, 319, 303, 288, 1, 4, 319, 318, 302, 303, 1, 4, 318, 317, 301, 302, 1, 4, 317, + 316, 300, 301, 1, 4, 316, 315, 299, 300, 1, 4, 315, 314, 298, 299, 1, 4, 314, 313, 297, + 298, 1, 4, 313, 312, 296, 297, 1, 4, 312, 311, 295, 296, 1, 4, 311, 310, 294, 295, 1, + 4, 310, 309, 293, 294, 1, 4, 309, 308, 292, 293, 1, 4, 308, 307, 291, 292, 1, 4, 307, + 306, 290, 291, 1, 4, 306, 305, 289, 290, 1, 4, 305, 304, 288, 289, 1, 4, 320, 335, 319, + 304, 1, 4, 335, 334, 318, 319, 1, 4, 334, 333, 317, 318, 1, 4, 333, 332, 316, 317, 1, + 4, 332, 331, 315, 316, 1, 4, 331, 330, 314, 315, 1, 4, 330, 329, 313, 314, 1, 4, 329, + 328, 312, 313, 1, 4, 328, 327, 311, 312, 1, 4, 327, 326, 310, 311, 1, 4, 326, 325, 309, + 310, 1, 4, 325, 324, 308, 309, 1, 4, 324, 323, 307, 308, 1, 4, 323, 322, 306, 307, 1, + 4, 322, 321, 305, 306, 1, 4, 321, 320, 304, 305, 1, 4, 336, 351, 335, 320, 1, 4, 351, + 350, 334, 335, 1, 4, 350, 349, 333, 334, 1, 4, 349, 348, 332, 333, 1, 4, 348, 347, 331, + 332, 1, 4, 347, 346, 330, 331, 1, 4, 346, 345, 329, 330, 1, 4, 345, 344, 328, 329, 1, + 4, 344, 343, 327, 328, 1, 4, 343, 342, 326, 327, 1, 4, 342, 341, 325, 326, 1, 4, 341, + 340, 324, 325, 1, 4, 340, 339, 323, 324, 1, 4, 339, 338, 322, 323, 1, 4, 338, 337, 321, + 322, 1, 4, 337, 336, 320, 321, 1, 4, 352, 367, 351, 336, 1, 4, 367, 366, 350, 351, 1, + 4, 366, 365, 349, 350, 1, 4, 365, 364, 348, 349, 1, 4, 364, 363, 347, 348, 1, 4, 363, + 362, 346, 347, 1, 4, 362, 361, 345, 346, 1, 4, 361, 360, 344, 345, 1, 4, 360, 359, 343, + 344, 1, 4, 359, 358, 342, 343, 1, 4, 358, 357, 341, 342, 1, 4, 357, 356, 340, 341, 1, + 4, 356, 355, 339, 340, 1, 4, 355, 354, 338, 339, 1, 4, 354, 353, 337, 338, 1, 4, 353, + 352, 336, 337, 1, 4, 368, 383, 367, 352, 1, 4, 383, 382, 366, 367, 1, 4, 382, 381, 365, + 366, 1, 4, 381, 380, 364, 365, 1, 4, 380, 379, 363, 364, 1, 4, 379, 378, 362, 363, 1, + 4, 378, 377, 361, 362, 1, 4, 377, 376, 360, 361, 1, 4, 376, 375, 359, 360, 1, 4, 375, + 374, 358, 359, 1, 4, 374, 373, 357, 358, 1, 4, 373, 372, 356, 357, 1, 4, 372, 371, 355, + 356, 1, 4, 371, 370, 354, 355, 1, 4, 370, 369, 353, 354, 1, 4, 369, 368, 352, 353, 1, + 4, 384, 399, 383, 368, 1, 4, 399, 398, 382, 383, 1, 4, 398, 397, 381, 382, 1, 4, 397, + 396, 380, 381, 1, 4, 396, 395, 379, 380, 1, 4, 395, 394, 378, 379, 1, 4, 394, 393, 377, + 378, 1, 4, 393, 392, 376, 377, 1, 4, 392, 391, 375, 376, 1, 4, 391, 390, 374, 375, 1, + 4, 390, 389, 373, 374, 1, 4, 389, 388, 372, 373, 1, 4, 388, 387, 371, 372, 1, 4, 387, + 386, 370, 371, 1, 4, 386, 385, 369, 370, 1, 4, 385, 384, 368, 369, 1, 4, 400, 415, 399, + 384, 1, 4, 415, 414, 398, 399, 1, 4, 414, 413, 397, 398, 1, 4, 413, 412, 396, 397, 1, + 4, 412, 411, 395, 396, 1, 4, 411, 410, 394, 395, 1, 4, 410, 409, 393, 394, 1, 4, 409, + 408, 392, 393, 1, 4, 408, 407, 391, 392, 1, 4, 407, 406, 390, 391, 1, 4, 406, 405, 389, + 390, 1, 4, 405, 404, 388, 389, 1, 4, 404, 403, 387, 388, 1, 4, 403, 402, 386, 387, 1, + 4, 402, 401, 385, 386, 1, 4, 401, 400, 384, 385, 1, 4, 416, 431, 415, 400, 1, 4, 431, + 430, 414, 415, 1, 4, 430, 429, 413, 414, 1, 4, 429, 428, 412, 413, 1, 4, 428, 427, 411, + 412, 1, 4, 427, 426, 410, 411, 1, 4, 426, 425, 409, 410, 1, 4, 425, 424, 408, 409, 1, + 4, 424, 423, 407, 408, 1, 4, 423, 422, 406, 407, 1, 4, 422, 421, 405, 406, 1, 4, 421, + 420, 404, 405, 1, 4, 420, 419, 403, 404, 1, 4, 419, 418, 402, 403, 1, 4, 418, 417, 401, + 402, 1, 4, 417, 416, 400, 401, 1, 4, 432, 447, 431, 416, 1, 4, 447, 446, 430, 431, 1, + 4, 446, 445, 429, 430, 1, 4, 445, 444, 428, 429, 1, 4, 444, 443, 427, 428, 1, 4, 443, + 442, 426, 427, 1, 4, 442, 441, 425, 426, 1, 4, 441, 440, 424, 425, 1, 4, 440, 439, 423, + 424, 1, 4, 439, 438, 422, 423, 1, 4, 438, 437, 421, 422, 1, 4, 437, 436, 420, 421, 1, + 4, 436, 435, 419, 420, 1, 4, 435, 434, 418, 419, 1, 4, 434, 433, 417, 418, 1, 4, 433, + 432, 416, 417, 1, 4, 448, 463, 447, 432, 1, 4, 463, 462, 446, 447, 1, 4, 462, 461, 445, + 446, 1, 4, 461, 460, 444, 445, 1, 4, 460, 459, 443, 444, 1, 4, 459, 458, 442, 443, 1, + 4, 458, 457, 441, 442, 1, 4, 457, 456, 440, 441, 1, 4, 456, 455, 439, 440, 1, 4, 455, + 454, 438, 439, 1, 4, 454, 453, 437, 438, 1, 4, 453, 452, 436, 437, 1, 4, 452, 451, 435, + 436, 1, 4, 451, 450, 434, 435, 1, 4, 450, 449, 433, 434, 1, 4, 449, 448, 432, 433, 1, + 4, 464, 479, 463, 448, 1, 4, 479, 478, 462, 463, 1, 4, 478, 477, 461, 462, 1, 4, 477, + 476, 460, 461, 1, 4, 476, 475, 459, 460, 1, 4, 475, 474, 458, 459, 1, 4, 474, 473, 457, + 458, 1, 4, 473, 472, 456, 457, 1, 4, 472, 471, 455, 456, 1, 4, 471, 470, 454, 455, 1, + 4, 470, 469, 453, 454, 1, 4, 469, 468, 452, 453, 1, 4, 468, 467, 451, 452, 1, 4, 467, + 466, 450, 451, 1, 4, 466, 465, 449, 450, 1, 4, 465, 464, 448, 449, 1, 4, 480, 495, 479, + 464, 1, 4, 495, 494, 478, 479, 1, 4, 494, 493, 477, 478, 1, 4, 493, 492, 476, 477, 1, + 4, 492, 491, 475, 476, 1, 4, 491, 490, 474, 475, 1, 4, 490, 489, 473, 474, 1, 4, 489, + 488, 472, 473, 1, 4, 488, 487, 471, 472, 1, 4, 487, 486, 470, 471, 1, 4, 486, 485, 469, + 470, 1, 4, 485, 484, 468, 469, 1, 4, 484, 483, 467, 468, 1, 4, 483, 482, 466, 467, 1, + 4, 482, 481, 465, 466, 1, 4, 481, 480, 464, 465, 1, 4, 496, 511, 495, 480, 1, 4, 511, + 510, 494, 495, 1, 4, 510, 509, 493, 494, 1, 4, 509, 508, 492, 493, 1, 4, 508, 507, 491, + 492, 1, 4, 507, 506, 490, 491, 1, 4, 506, 505, 489, 490, 1, 4, 505, 504, 488, 489, 1, + 4, 504, 503, 487, 488, 1, 4, 503, 502, 486, 487, 1, 4, 502, 501, 485, 486, 1, 4, 501, + 500, 484, 485, 1, 4, 500, 499, 483, 484, 1, 4, 499, 498, 482, 483, 1, 4, 498, 497, 481, + 482, 1, 4, 497, 496, 480, 481, 1, 4, 0, 15, 511, 496, 1, 4, 15, 14, 510, 511, 1, +4, 14, 13, 509, 510, 1, 4, 13, 12, 508, 509, 1, 4, 12, 11, 507, 508, 1, 4, 11, + 10, 506, 507, 1, 4, 10, 9, 505, 506, 1, 4, 9, 8, 504, 505, 1, 4, 8, 7, 503, + 504, 1, 4, 7, 6, 502, 503, 1, 4, 6, 5, 501, 502, 1, 4, 5, 4, 500, 501, 1, + 4, 4, 3, 499, 500, 1, 4, 3, 2, 498, 499, 1, 4, 2, 1, 497, 498, 1, 4, 1, + 0, 496, 497, 1, + 0 +}; + +struct lwo LWO_BigValve = +{ + 716, /* number of points */ + BigValve_PNTS, BigValve_normals, BigValve_POLS, 0L +}; + +static GLfloat Bolts3D_PNTS[] = +{ + (GLfloat) - 0.160704, (GLfloat) 0.399000, (GLfloat) 0.600000, + (GLfloat) - 0.160704, (GLfloat) 0.399000, (GLfloat) - 0.500000, + (GLfloat) - 0.400000, (GLfloat) 0.160257, (GLfloat) 0.600000, + (GLfloat) - 0.400000, (GLfloat) 0.160257, (GLfloat) - 0.500000, + (GLfloat) - 0.400000, (GLfloat) - 0.170369, (GLfloat) 0.600000, + (GLfloat) - 0.400000, (GLfloat) - 0.170369, (GLfloat) - 0.500000, + (GLfloat) - 0.153738, (GLfloat) - 0.400000, (GLfloat) 0.600000, + (GLfloat) - 0.153738, (GLfloat) - 0.400000, (GLfloat) - 0.500000, + (GLfloat) 0.176887, (GLfloat) - 0.400000, (GLfloat) 0.600000, + (GLfloat) 0.176887, (GLfloat) - 0.400000, (GLfloat) - 0.500000, + (GLfloat) 0.400000, (GLfloat) - 0.163403, (GLfloat) 0.600000, + (GLfloat) 0.400000, (GLfloat) - 0.163403, (GLfloat) - 0.500000, + (GLfloat) 0.400000, (GLfloat) 0.167223, (GLfloat) 0.600000, + (GLfloat) 0.400000, (GLfloat) 0.167223, (GLfloat) - 0.500000, + (GLfloat) 0.169922, (GLfloat) 0.399000, (GLfloat) 0.600000, + (GLfloat) 0.169922, (GLfloat) 0.399000, (GLfloat) - 0.500000, + (GLfloat) - 0.160704, (GLfloat) 0.399000, (GLfloat) 0.500000, + (GLfloat) - 0.160704, (GLfloat) 0.399000, (GLfloat) - 0.600000, + (GLfloat) - 0.400000, (GLfloat) 0.160257, (GLfloat) - 0.600000, + (GLfloat) - 0.400000, (GLfloat) 0.160257, (GLfloat) 0.500000, + (GLfloat) - 0.400000, (GLfloat) - 0.170369, (GLfloat) - 0.600000, + (GLfloat) - 0.400000, (GLfloat) - 0.170369, (GLfloat) 0.500000, + (GLfloat) - 0.153738, (GLfloat) - 0.400000, (GLfloat) - 0.600000, + (GLfloat) - 0.153738, (GLfloat) - 0.400000, (GLfloat) 0.500000, + (GLfloat) 0.176887, (GLfloat) - 0.400000, (GLfloat) 0.500000, + (GLfloat) 0.176887, (GLfloat) - 0.400000, (GLfloat) - 0.600000, + (GLfloat) 0.400000, (GLfloat) - 0.163403, (GLfloat) 0.500000, + (GLfloat) 0.400000, (GLfloat) - 0.163403, (GLfloat) - 0.600000, + (GLfloat) 0.400000, (GLfloat) 0.167223, (GLfloat) - 0.600000, + (GLfloat) 0.400000, (GLfloat) 0.167223, (GLfloat) 0.500000, + (GLfloat) 0.169922, (GLfloat) 0.399000, (GLfloat) - 0.600000, + (GLfloat) 0.169922, (GLfloat) 0.399000, (GLfloat) 0.500000, +}; + +static GLfloat Bolts3D_normals[] = +{ + (GLfloat) 0.000000, (GLfloat) 1.000000, (GLfloat) 0.000000, + (GLfloat) 0.709703, (GLfloat) 0.704502, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.727535, (GLfloat) - 0.686070, (GLfloat) - 0.000000, + (GLfloat) 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.681980, (GLfloat) - 0.731370, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.706289, (GLfloat) 0.707924, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 1.000000, (GLfloat) 0.000000, + (GLfloat) 0.709703, (GLfloat) 0.704502, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.727535, (GLfloat) - 0.686070, (GLfloat) - 0.000000, + (GLfloat) 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.681980, (GLfloat) - 0.731370, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.706289, (GLfloat) 0.707924, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, +}; + +static unsigned short int Bolts3D_POLS[] = +{ + 4, 16, 31, 14, 0, 1, 4, 31, 29, 12, 14, 1, 4, 29, 26, 10, 12, 1, 4, 26, + 24, 8, 10, 1, 4, 24, 23, 6, 8, 1, 4, 23, 21, 4, 6, 1, 4, 21, 19, 2, + 4, 1, 4, 19, 16, 0, 2, 1, 8, 14, 12, 10, 8, 6, 4, 2, 0, 1, 4, 17, + 30, 15, 1, 1, 4, 30, 28, 13, 15, 1, 4, 28, 27, 11, 13, 1, 4, 27, 25, 9, + 11, 1, 4, 25, 22, 7, 9, 1, 4, 22, 20, 5, 7, 1, 4, 20, 18, 3, 5, 1, + 4, 18, 17, 1, 3, 1, 8, 30, 17, 18, 20, 22, 25, 27, 28, 1, + 0 +}; + +struct lwo LWO_Bolts3D = +{ + 32, /* number of points */ + Bolts3D_PNTS, Bolts3D_normals, Bolts3D_POLS, 0L +}; + +static GLfloat GuageConnector_PNTS[] = +{ + (GLfloat) 0.200000, (GLfloat) 0.400000, (GLfloat) - 0.000000, + (GLfloat) 0.200000, (GLfloat) 0.800000, (GLfloat) - 0.000000, + (GLfloat) 0.193185, (GLfloat) 0.400000, (GLfloat) - 0.051764, + (GLfloat) 0.193185, (GLfloat) 0.800000, (GLfloat) - 0.051764, + (GLfloat) 0.173205, (GLfloat) 0.400000, (GLfloat) - 0.100000, + (GLfloat) 0.173205, (GLfloat) 0.800000, (GLfloat) - 0.100000, + (GLfloat) 0.141421, (GLfloat) 0.800000, (GLfloat) - 0.141421, + (GLfloat) 0.141421, (GLfloat) 0.400000, (GLfloat) - 0.141421, + (GLfloat) 0.100000, (GLfloat) 0.400000, (GLfloat) - 0.173205, + (GLfloat) 0.100000, (GLfloat) 0.800000, (GLfloat) - 0.173205, + (GLfloat) 0.051764, (GLfloat) 0.800000, (GLfloat) - 0.193185, + (GLfloat) 0.051764, (GLfloat) 0.400000, (GLfloat) - 0.193185, + (GLfloat) 0.000000, (GLfloat) 0.800000, (GLfloat) - 0.200000, + (GLfloat) 0.000000, (GLfloat) 0.400000, (GLfloat) - 0.200000, + (GLfloat) - 0.051764, (GLfloat) 0.800000, (GLfloat) - 0.193185, + (GLfloat) - 0.051764, (GLfloat) 0.400000, (GLfloat) - 0.193185, + (GLfloat) - 0.100000, (GLfloat) 0.800000, (GLfloat) - 0.173205, + (GLfloat) - 0.100000, (GLfloat) 0.400000, (GLfloat) - 0.173205, + (GLfloat) - 0.141421, (GLfloat) 0.400000, (GLfloat) - 0.141421, + (GLfloat) - 0.141421, (GLfloat) 0.800000, (GLfloat) - 0.141421, + (GLfloat) - 0.173205, (GLfloat) 0.800000, (GLfloat) - 0.100000, + (GLfloat) - 0.173205, (GLfloat) 0.400000, (GLfloat) - 0.100000, + (GLfloat) - 0.193185, (GLfloat) 0.400000, (GLfloat) - 0.051764, + (GLfloat) - 0.193185, (GLfloat) 0.800000, (GLfloat) - 0.051764, + (GLfloat) - 0.200000, (GLfloat) 0.400000, (GLfloat) - 0.000000, + (GLfloat) - 0.200000, (GLfloat) 0.800000, (GLfloat) - 0.000000, + (GLfloat) - 0.193185, (GLfloat) 0.400000, (GLfloat) 0.051764, + (GLfloat) - 0.193185, (GLfloat) 0.800000, (GLfloat) 0.051764, + (GLfloat) - 0.173205, (GLfloat) 0.400000, (GLfloat) 0.100000, + (GLfloat) - 0.173205, (GLfloat) 0.800000, (GLfloat) 0.100000, + (GLfloat) - 0.141421, (GLfloat) 0.800000, (GLfloat) 0.141421, + (GLfloat) - 0.141421, (GLfloat) 0.400000, (GLfloat) 0.141421, + (GLfloat) - 0.100000, (GLfloat) 0.800000, (GLfloat) 0.173205, + (GLfloat) - 0.100000, (GLfloat) 0.400000, (GLfloat) 0.173205, + (GLfloat) - 0.051764, (GLfloat) 0.800000, (GLfloat) 0.193185, + (GLfloat) - 0.051764, (GLfloat) 0.400000, (GLfloat) 0.193185, + (GLfloat) - 0.000000, (GLfloat) 0.800000, (GLfloat) 0.200000, + (GLfloat) - 0.000000, (GLfloat) 0.400000, (GLfloat) 0.200000, + (GLfloat) 0.051764, (GLfloat) 0.800000, (GLfloat) 0.193185, + (GLfloat) 0.051764, (GLfloat) 0.400000, (GLfloat) 0.193185, + (GLfloat) 0.100000, (GLfloat) 0.400000, (GLfloat) 0.173205, + (GLfloat) 0.100000, (GLfloat) 0.800000, (GLfloat) 0.173205, + (GLfloat) 0.141421, (GLfloat) 0.400000, (GLfloat) 0.141421, + (GLfloat) 0.141421, (GLfloat) 0.800000, (GLfloat) 0.141421, + (GLfloat) 0.173205, (GLfloat) 0.800000, (GLfloat) 0.100000, + (GLfloat) 0.173205, (GLfloat) 0.400000, (GLfloat) 0.100000, + (GLfloat) 0.193185, (GLfloat) 0.400000, (GLfloat) 0.051764, + (GLfloat) 0.193185, (GLfloat) 0.800000, (GLfloat) 0.051764, + (GLfloat) 0.200000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) 0.193185, (GLfloat) 0.550000, (GLfloat) - 0.051764, + (GLfloat) 0.173205, (GLfloat) 0.550000, (GLfloat) - 0.100000, + (GLfloat) 0.141421, (GLfloat) 0.550000, (GLfloat) - 0.141421, + (GLfloat) 0.100000, (GLfloat) 0.550000, (GLfloat) - 0.173205, + (GLfloat) 0.051764, (GLfloat) 0.550000, (GLfloat) - 0.193185, + (GLfloat) 0.000000, (GLfloat) 0.550000, (GLfloat) - 0.200000, + (GLfloat) - 0.051764, (GLfloat) 0.550000, (GLfloat) - 0.193185, + (GLfloat) - 0.100000, (GLfloat) 0.550000, (GLfloat) - 0.173205, + (GLfloat) - 0.141421, (GLfloat) 0.550000, (GLfloat) - 0.141421, + (GLfloat) - 0.173205, (GLfloat) 0.550000, (GLfloat) - 0.100000, + (GLfloat) - 0.193185, (GLfloat) 0.550000, (GLfloat) - 0.051764, + (GLfloat) - 0.200000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) - 0.193185, (GLfloat) 0.550000, (GLfloat) 0.051764, + (GLfloat) - 0.173205, (GLfloat) 0.550000, (GLfloat) 0.100000, + (GLfloat) - 0.141421, (GLfloat) 0.550000, (GLfloat) 0.141421, + (GLfloat) - 0.100000, (GLfloat) 0.550000, (GLfloat) 0.173205, + (GLfloat) - 0.051764, (GLfloat) 0.550000, (GLfloat) 0.193185, + (GLfloat) - 0.000000, (GLfloat) 0.550000, (GLfloat) 0.200000, + (GLfloat) 0.051764, (GLfloat) 0.550000, (GLfloat) 0.193185, + (GLfloat) 0.100000, (GLfloat) 0.550000, (GLfloat) 0.173205, + (GLfloat) 0.141421, (GLfloat) 0.550000, (GLfloat) 0.141421, + (GLfloat) 0.173205, (GLfloat) 0.550000, (GLfloat) 0.100000, + (GLfloat) 0.193185, (GLfloat) 0.550000, (GLfloat) 0.051764, + (GLfloat) 0.150000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) 0.144889, (GLfloat) 0.550000, (GLfloat) - 0.038823, + (GLfloat) 0.129904, (GLfloat) 0.550000, (GLfloat) - 0.075000, + (GLfloat) 0.106066, (GLfloat) 0.550000, (GLfloat) - 0.106066, + (GLfloat) 0.075000, (GLfloat) 0.550000, (GLfloat) - 0.129904, + (GLfloat) 0.038823, (GLfloat) 0.550000, (GLfloat) - 0.144889, + (GLfloat) 0.000000, (GLfloat) 0.550000, (GLfloat) - 0.150000, + (GLfloat) - 0.038823, (GLfloat) 0.550000, (GLfloat) - 0.144889, + (GLfloat) - 0.075000, (GLfloat) 0.550000, (GLfloat) - 0.129904, + (GLfloat) - 0.106066, (GLfloat) 0.550000, (GLfloat) - 0.106066, + (GLfloat) - 0.129904, (GLfloat) 0.550000, (GLfloat) - 0.075000, + (GLfloat) - 0.144889, (GLfloat) 0.550000, (GLfloat) - 0.038823, + (GLfloat) - 0.150000, (GLfloat) 0.550000, (GLfloat) - 0.000000, + (GLfloat) - 0.144889, (GLfloat) 0.550000, (GLfloat) 0.038823, + (GLfloat) - 0.129904, (GLfloat) 0.550000, (GLfloat) 0.075000, + (GLfloat) - 0.106066, (GLfloat) 0.550000, (GLfloat) 0.106066, + (GLfloat) - 0.075000, (GLfloat) 0.550000, (GLfloat) 0.129904, + (GLfloat) - 0.038823, (GLfloat) 0.550000, (GLfloat) 0.144889, + (GLfloat) - 0.000000, (GLfloat) 0.550000, (GLfloat) 0.150000, + (GLfloat) 0.038823, (GLfloat) 0.550000, (GLfloat) 0.144889, + (GLfloat) 0.075000, (GLfloat) 0.550000, (GLfloat) 0.129904, + (GLfloat) 0.106066, (GLfloat) 0.550000, (GLfloat) 0.106066, + (GLfloat) 0.129904, (GLfloat) 0.550000, (GLfloat) 0.075000, + (GLfloat) 0.144889, (GLfloat) 0.550000, (GLfloat) 0.038823, + (GLfloat) 0.150000, (GLfloat) 0.800000, (GLfloat) - 0.000000, + (GLfloat) 0.144889, (GLfloat) 0.800000, (GLfloat) - 0.038823, + (GLfloat) 0.129904, (GLfloat) 0.800000, (GLfloat) - 0.075000, + (GLfloat) 0.106066, (GLfloat) 0.800000, (GLfloat) - 0.106066, + (GLfloat) 0.075000, (GLfloat) 0.800000, (GLfloat) - 0.129904, + (GLfloat) 0.038823, (GLfloat) 0.800000, (GLfloat) - 0.144889, + (GLfloat) 0.000000, (GLfloat) 0.800000, (GLfloat) - 0.150000, + (GLfloat) - 0.038823, (GLfloat) 0.800000, (GLfloat) - 0.144889, + (GLfloat) - 0.075000, (GLfloat) 0.800000, (GLfloat) - 0.129904, + (GLfloat) - 0.106066, (GLfloat) 0.800000, (GLfloat) - 0.106066, + (GLfloat) - 0.129904, (GLfloat) 0.800000, (GLfloat) - 0.075000, + (GLfloat) - 0.144889, (GLfloat) 0.800000, (GLfloat) - 0.038823, + (GLfloat) - 0.150000, (GLfloat) 0.800000, (GLfloat) - 0.000000, + (GLfloat) - 0.144889, (GLfloat) 0.800000, (GLfloat) 0.038823, + (GLfloat) - 0.129904, (GLfloat) 0.800000, (GLfloat) 0.075000, + (GLfloat) - 0.106066, (GLfloat) 0.800000, (GLfloat) 0.106066, + (GLfloat) - 0.075000, (GLfloat) 0.800000, (GLfloat) 0.129904, + (GLfloat) - 0.038823, (GLfloat) 0.800000, (GLfloat) 0.144889, + (GLfloat) - 0.000000, (GLfloat) 0.800000, (GLfloat) 0.150000, + (GLfloat) 0.038823, (GLfloat) 0.800000, (GLfloat) 0.144889, + (GLfloat) 0.075000, (GLfloat) 0.800000, (GLfloat) 0.129904, + (GLfloat) 0.106066, (GLfloat) 0.800000, (GLfloat) 0.106066, + (GLfloat) 0.129904, (GLfloat) 0.800000, (GLfloat) 0.075000, + (GLfloat) 0.144889, (GLfloat) 0.800000, (GLfloat) 0.038823, + (GLfloat) 0.200000, (GLfloat) 0.875988, (GLfloat) - 0.000000, + (GLfloat) 0.193185, (GLfloat) 0.872346, (GLfloat) - 0.051764, + (GLfloat) 0.191342, (GLfloat) 0.871360, (GLfloat) - 0.056214, + (GLfloat) 0.173205, (GLfloat) 0.865859, (GLfloat) - 0.100000, + (GLfloat) 0.141421, (GLfloat) 0.856217, (GLfloat) - 0.141421, + (GLfloat) 0.100000, (GLfloat) 0.843652, (GLfloat) - 0.173205, + (GLfloat) 0.097545, (GLfloat) 0.842907, (GLfloat) - 0.174222, + (GLfloat) 0.051764, (GLfloat) 0.838398, (GLfloat) - 0.193185, + (GLfloat) 0.000000, (GLfloat) 0.833300, (GLfloat) - 0.200000, + (GLfloat) - 0.051764, (GLfloat) 0.838398, (GLfloat) - 0.193185, + (GLfloat) - 0.097545, (GLfloat) 0.842907, (GLfloat) - 0.174222, + (GLfloat) - 0.100000, (GLfloat) 0.843652, (GLfloat) - 0.173205, + (GLfloat) - 0.141421, (GLfloat) 0.856217, (GLfloat) - 0.141421, + (GLfloat) - 0.173205, (GLfloat) 0.865859, (GLfloat) - 0.100000, + (GLfloat) - 0.191342, (GLfloat) 0.871360, (GLfloat) - 0.056214, + (GLfloat) - 0.193185, (GLfloat) 0.872346, (GLfloat) - 0.051764, + (GLfloat) - 0.200000, (GLfloat) 0.875988, (GLfloat) - 0.000000, + (GLfloat) - 0.193185, (GLfloat) 0.872346, (GLfloat) 0.051764, + (GLfloat) - 0.173205, (GLfloat) 0.865859, (GLfloat) 0.100000, + (GLfloat) - 0.191342, (GLfloat) 0.871360, (GLfloat) 0.056214, + (GLfloat) - 0.141421, (GLfloat) 0.856217, (GLfloat) 0.141421, + (GLfloat) - 0.100000, (GLfloat) 0.843652, (GLfloat) 0.173205, + (GLfloat) - 0.051764, (GLfloat) 0.838398, (GLfloat) 0.193185, + (GLfloat) - 0.097545, (GLfloat) 0.842907, (GLfloat) 0.174222, + (GLfloat) - 0.000000, (GLfloat) 0.833300, (GLfloat) 0.200000, + (GLfloat) 0.051764, (GLfloat) 0.838398, (GLfloat) 0.193185, + (GLfloat) 0.100000, (GLfloat) 0.843652, (GLfloat) 0.173205, + (GLfloat) 0.097545, (GLfloat) 0.842907, (GLfloat) 0.174222, + (GLfloat) 0.141421, (GLfloat) 0.856217, (GLfloat) 0.141421, + (GLfloat) 0.173205, (GLfloat) 0.865859, (GLfloat) 0.100000, + (GLfloat) 0.193185, (GLfloat) 0.872346, (GLfloat) 0.051764, + (GLfloat) 0.191342, (GLfloat) 0.871360, (GLfloat) 0.056214, +}; + +static GLfloat GuageConnector_normals[] = +{ + (GLfloat) 0.991445, (GLfloat) 0.000000, (GLfloat) - 0.130526, + (GLfloat) 0.923880, (GLfloat) 0.000000, (GLfloat) - 0.382683, + (GLfloat) 0.793353, (GLfloat) 0.000000, (GLfloat) - 0.608761, + (GLfloat) 0.608761, (GLfloat) 0.000000, (GLfloat) - 0.793353, + (GLfloat) 0.382683, (GLfloat) 0.000000, (GLfloat) - 0.923880, + (GLfloat) 0.130526, (GLfloat) 0.000000, (GLfloat) - 0.991445, + (GLfloat) - 0.130526, (GLfloat) - 0.000000, (GLfloat) - 0.991445, + (GLfloat) - 0.382683, (GLfloat) - 0.000000, (GLfloat) - 0.923880, + (GLfloat) - 0.608761, (GLfloat) - 0.000000, (GLfloat) - 0.793353, + (GLfloat) - 0.793353, (GLfloat) - 0.000000, (GLfloat) - 0.608761, + (GLfloat) - 0.923880, (GLfloat) - 0.000000, (GLfloat) - 0.382683, + (GLfloat) - 0.991445, (GLfloat) - 0.000000, (GLfloat) - 0.130526, + (GLfloat) - 0.991445, (GLfloat) 0.000000, (GLfloat) 0.130526, + (GLfloat) - 0.923880, (GLfloat) 0.000000, (GLfloat) 0.382683, + (GLfloat) - 0.793353, (GLfloat) 0.000000, (GLfloat) 0.608761, + (GLfloat) - 0.608761, (GLfloat) 0.000000, (GLfloat) 0.793353, + (GLfloat) - 0.382683, (GLfloat) 0.000000, (GLfloat) 0.923880, + (GLfloat) - 0.130526, (GLfloat) 0.000000, (GLfloat) 0.991445, + (GLfloat) 0.130526, (GLfloat) 0.000000, (GLfloat) 0.991445, + (GLfloat) 0.382683, (GLfloat) 0.000000, (GLfloat) 0.923880, + (GLfloat) 0.608761, (GLfloat) 0.000000, (GLfloat) 0.793353, + (GLfloat) 0.793353, (GLfloat) 0.000000, (GLfloat) 0.608761, + (GLfloat) 0.923880, (GLfloat) 0.000000, (GLfloat) 0.382683, + (GLfloat) 0.991445, (GLfloat) 0.000000, (GLfloat) 0.130526, + (GLfloat) 0.991445, (GLfloat) 0.000000, (GLfloat) - 0.130526, + (GLfloat) 0.923880, (GLfloat) 0.000000, (GLfloat) - 0.382684, + (GLfloat) 0.793353, (GLfloat) 0.000000, (GLfloat) - 0.608761, + (GLfloat) 0.608761, (GLfloat) 0.000000, (GLfloat) - 0.793353, + (GLfloat) 0.382684, (GLfloat) 0.000000, (GLfloat) - 0.923880, + (GLfloat) 0.130526, (GLfloat) 0.000000, (GLfloat) - 0.991445, + (GLfloat) - 0.130526, (GLfloat) 0.000000, (GLfloat) - 0.991445, + (GLfloat) - 0.382684, (GLfloat) 0.000000, (GLfloat) - 0.923880, + (GLfloat) - 0.608761, (GLfloat) 0.000000, (GLfloat) - 0.793353, + (GLfloat) - 0.793353, (GLfloat) 0.000000, (GLfloat) - 0.608761, + (GLfloat) - 0.923880, (GLfloat) 0.000000, (GLfloat) - 0.382684, + (GLfloat) - 0.991445, (GLfloat) 0.000000, (GLfloat) - 0.130526, + (GLfloat) - 0.991445, (GLfloat) 0.000000, (GLfloat) 0.130526, + (GLfloat) - 0.923880, (GLfloat) 0.000000, (GLfloat) 0.382684, + (GLfloat) - 0.793353, (GLfloat) 0.000000, (GLfloat) 0.608761, + (GLfloat) - 0.608761, (GLfloat) 0.000000, (GLfloat) 0.793353, + (GLfloat) - 0.382684, (GLfloat) 0.000000, (GLfloat) 0.923880, + (GLfloat) - 0.130526, (GLfloat) 0.000000, (GLfloat) 0.991445, + (GLfloat) 0.130526, (GLfloat) - 0.000000, (GLfloat) 0.991445, + (GLfloat) 0.382684, (GLfloat) - 0.000000, (GLfloat) 0.923880, + (GLfloat) 0.608761, (GLfloat) - 0.000000, (GLfloat) 0.793353, + (GLfloat) 0.793353, (GLfloat) - 0.000000, (GLfloat) 0.608761, + (GLfloat) 0.923880, (GLfloat) - 0.000000, (GLfloat) 0.382684, + (GLfloat) 0.991445, (GLfloat) - 0.000000, (GLfloat) 0.130526, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) 0.991445, (GLfloat) 0.000000, (GLfloat) - 0.130526, + (GLfloat) 0.923880, (GLfloat) 0.000000, (GLfloat) - 0.382684, + (GLfloat) 0.793353, (GLfloat) 0.000000, (GLfloat) - 0.608761, + (GLfloat) 0.608761, (GLfloat) 0.000000, (GLfloat) - 0.793353, + (GLfloat) 0.382684, (GLfloat) 0.000000, (GLfloat) - 0.923880, + (GLfloat) 0.130526, (GLfloat) 0.000000, (GLfloat) - 0.991445, + (GLfloat) - 0.130526, (GLfloat) 0.000000, (GLfloat) - 0.991445, + (GLfloat) - 0.382684, (GLfloat) 0.000000, (GLfloat) - 0.923880, + (GLfloat) - 0.608761, (GLfloat) 0.000000, (GLfloat) - 0.793353, + (GLfloat) - 0.793353, (GLfloat) 0.000000, (GLfloat) - 0.608761, + (GLfloat) - 0.923880, (GLfloat) 0.000000, (GLfloat) - 0.382684, + (GLfloat) - 0.991445, (GLfloat) 0.000000, (GLfloat) - 0.130526, + (GLfloat) - 0.991445, (GLfloat) 0.000000, (GLfloat) 0.130526, + (GLfloat) - 0.923880, (GLfloat) 0.000000, (GLfloat) 0.382684, + (GLfloat) - 0.793353, (GLfloat) 0.000000, (GLfloat) 0.608761, + (GLfloat) - 0.608761, (GLfloat) 0.000000, (GLfloat) 0.793353, + (GLfloat) - 0.382684, (GLfloat) 0.000000, (GLfloat) 0.923880, + (GLfloat) - 0.130526, (GLfloat) 0.000000, (GLfloat) 0.991445, + (GLfloat) 0.130526, (GLfloat) - 0.000000, (GLfloat) 0.991445, + (GLfloat) 0.382684, (GLfloat) - 0.000000, (GLfloat) 0.923880, + (GLfloat) 0.608761, (GLfloat) - 0.000000, (GLfloat) 0.793353, + (GLfloat) 0.793353, (GLfloat) - 0.000000, (GLfloat) 0.608761, + (GLfloat) 0.923880, (GLfloat) - 0.000000, (GLfloat) 0.382684, + (GLfloat) 0.991445, (GLfloat) - 0.000000, (GLfloat) 0.130526, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, +}; + +static unsigned short int GuageConnector_POLS[] = +{ + 4, 1, 120, 121, 3, 1, 5, 3, 121, 122, 123, 5, 1, 4, 5, 123, 124, 6, 1, 4, +6, 124, 125, 9, 1, 5, 9, 125, 126, 127, 10, 1, 4, 10, 127, 128, 12, 1, 4, 14, + 12, 128, 129, 1, 5, 16, 14, 129, 130, 131, 1, 4, 19, 16, 131, 132, 1, 4, 20, 19, + 132, 133, 1, 5, 23, 20, 133, 134, 135, 1, 4, 25, 23, 135, 136, 1, 4, 25, 136, 137, + 27, 1, 5, 27, 137, 139, 138, 29, 1, 4, 29, 138, 140, 30, 1, 4, 30, 140, 141, 32, + 1, 5, 32, 141, 143, 142, 34, 1, 4, 34, 142, 144, 36, 1, 4, 38, 36, 144, 145, 1, + 5, 41, 38, 145, 147, 146, 1, 4, 43, 41, 146, 148, 1, 4, 44, 43, 148, 149, 1, 5, +47, 44, 149, 151, 150, 1, 4, 1, 47, 150, 120, 1, 4, 96, 97, 73, 72, 1, 4, 97, + 98, 74, 73, 1, 4, 98, 99, 75, 74, 1, 4, 99, 100, 76, 75, 1, 4, 100, 101, 77, +76, 1, 4, 101, 102, 78, 77, 1, 4, 102, 103, 79, 78, 1, 4, 103, 104, 80, 79, 1, + 4, 104, 105, 81, 80, 1, 4, 105, 106, 82, 81, 1, 4, 106, 107, 83, 82, 1, 4, 107, + 108, 84, 83, 1, 4, 108, 109, 85, 84, 1, 4, 109, 110, 86, 85, 1, 4, 110, 111, 87, +86, 1, 4, 111, 112, 88, 87, 1, 4, 112, 113, 89, 88, 1, 4, 113, 114, 90, 89, 1, + 4, 114, 115, 91, 90, 1, 4, 115, 116, 92, 91, 1, 4, 116, 117, 93, 92, 1, 4, 117, + 118, 94, 93, 1, 4, 118, 119, 95, 94, 1, 4, 119, 96, 72, 95, 1, 24, 1, 3, 5, +6, 9, 10, 12, 14, 16, 19, 20, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 44, + 47, 1, 4, 48, 49, 2, 0, 1, 4, 49, 50, 4, 2, 1, 4, 50, 51, 7, 4, 1, + 4, 51, 52, 8, 7, 1, 4, 52, 53, 11, 8, 1, 4, 53, 54, 13, 11, 1, 4, 54, + 55, 15, 13, 1, 4, 55, 56, 17, 15, 1, 4, 56, 57, 18, 17, 1, 4, 57, 58, 21, + 18, 1, 4, 58, 59, 22, 21, 1, 4, 59, 60, 24, 22, 1, 4, 60, 61, 26, 24, 1, + 4, 61, 62, 28, 26, 1, 4, 62, 63, 31, 28, 1, 4, 63, 64, 33, 31, 1, 4, 64, + 65, 35, 33, 1, 4, 65, 66, 37, 35, 1, 4, 66, 67, 39, 37, 1, 4, 67, 68, 40, + 39, 1, 4, 68, 69, 42, 40, 1, 4, 69, 70, 45, 42, 1, 4, 70, 71, 46, 45, 1, + 4, 71, 48, 0, 46, 1, 24, 48, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, + 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 1, + 0 +}; + +struct lwo LWO_GuageConnector = +{ + 152, /* number of points */ + GuageConnector_PNTS, GuageConnector_normals, GuageConnector_POLS, 0L +}; + +static GLfloat GuageDial_PNTS[] = +{ + (GLfloat) 0.000000, (GLfloat) 0.050000, (GLfloat) 0.300000, + (GLfloat) 0.019134, (GLfloat) 0.046194, (GLfloat) 0.300000, + (GLfloat) 0.035355, (GLfloat) 0.035355, (GLfloat) 0.300000, + (GLfloat) 0.046194, (GLfloat) 0.019134, (GLfloat) 0.300000, + (GLfloat) 0.050000, (GLfloat) - 0.000000, (GLfloat) 0.300000, + (GLfloat) 0.046194, (GLfloat) - 0.019134, (GLfloat) 0.300000, + (GLfloat) 0.035355, (GLfloat) - 0.035400, (GLfloat) 0.275000, + (GLfloat) 0.035355, (GLfloat) - 0.035400, (GLfloat) 0.300000, + (GLfloat) 0.019134, (GLfloat) - 0.046200, (GLfloat) 0.300000, + (GLfloat) 0.000000, (GLfloat) - 0.050000, (GLfloat) 0.300000, + (GLfloat) - 0.019134, (GLfloat) - 0.046200, (GLfloat) 0.300000, + (GLfloat) - 0.035355, (GLfloat) - 0.035400, (GLfloat) 0.275000, + (GLfloat) - 0.035355, (GLfloat) - 0.035400, (GLfloat) 0.300000, + (GLfloat) - 0.046194, (GLfloat) - 0.019134, (GLfloat) 0.300000, + (GLfloat) - 0.050000, (GLfloat) - 0.000000, (GLfloat) 0.300000, + (GLfloat) - 0.046194, (GLfloat) 0.019134, (GLfloat) 0.300000, + (GLfloat) - 0.035355, (GLfloat) 0.035355, (GLfloat) 0.300000, + (GLfloat) - 0.019134, (GLfloat) 0.046194, (GLfloat) 0.300000, + (GLfloat) 0.000000, (GLfloat) 0.050000, (GLfloat) 0.200000, + (GLfloat) 0.019134, (GLfloat) 0.046194, (GLfloat) 0.200000, + (GLfloat) 0.035355, (GLfloat) 0.035355, (GLfloat) 0.200000, + (GLfloat) 0.046194, (GLfloat) 0.019134, (GLfloat) 0.200000, + (GLfloat) 0.050000, (GLfloat) - 0.000000, (GLfloat) 0.200000, + (GLfloat) 0.046194, (GLfloat) - 0.019134, (GLfloat) 0.200000, + (GLfloat) 0.035355, (GLfloat) - 0.035355, (GLfloat) 0.200000, + (GLfloat) 0.019134, (GLfloat) - 0.046194, (GLfloat) 0.200000, + (GLfloat) 0.000000, (GLfloat) - 0.050000, (GLfloat) 0.200000, + (GLfloat) - 0.019134, (GLfloat) - 0.046194, (GLfloat) 0.200000, + (GLfloat) - 0.035355, (GLfloat) - 0.035355, (GLfloat) 0.200000, + (GLfloat) - 0.046194, (GLfloat) - 0.019134, (GLfloat) 0.200000, + (GLfloat) - 0.050000, (GLfloat) - 0.000000, (GLfloat) 0.200000, + (GLfloat) - 0.046194, (GLfloat) 0.019134, (GLfloat) 0.200000, + (GLfloat) - 0.035355, (GLfloat) 0.035355, (GLfloat) 0.200000, + (GLfloat) - 0.019134, (GLfloat) 0.046194, (GLfloat) 0.200000, + (GLfloat) 0.000000, (GLfloat) - 0.373300, (GLfloat) 0.275000, +}; + +static GLfloat GuageDial_normals[] = +{ + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.195089, (GLfloat) 0.980786, (GLfloat) 0.000000, + (GLfloat) 0.555570, (GLfloat) 0.831470, (GLfloat) 0.000000, + (GLfloat) 0.831470, (GLfloat) 0.555570, (GLfloat) 0.000000, + (GLfloat) 0.980785, (GLfloat) 0.195090, (GLfloat) 0.000000, + (GLfloat) 0.980785, (GLfloat) - 0.195090, (GLfloat) - 0.000000, + (GLfloat) 0.831470, (GLfloat) - 0.555570, (GLfloat) - 0.000248, + (GLfloat) 0.555570, (GLfloat) - 0.831470, (GLfloat) - 0.000051, + (GLfloat) 0.195089, (GLfloat) - 0.980786, (GLfloat) - 0.000000, + (GLfloat) - 0.195089, (GLfloat) - 0.980786, (GLfloat) - 0.000060, + (GLfloat) - 0.555570, (GLfloat) - 0.831470, (GLfloat) - 0.000371, + (GLfloat) - 0.831470, (GLfloat) - 0.555570, (GLfloat) - 0.000000, + (GLfloat) - 0.980785, (GLfloat) - 0.195090, (GLfloat) - 0.000000, + (GLfloat) - 0.980785, (GLfloat) 0.195090, (GLfloat) - 0.000000, + (GLfloat) - 0.831470, (GLfloat) 0.555570, (GLfloat) - 0.000000, + (GLfloat) - 0.555570, (GLfloat) 0.831470, (GLfloat) - 0.000000, + (GLfloat) - 0.195089, (GLfloat) 0.980786, (GLfloat) - 0.000000, +}; + +static unsigned short int GuageDial_POLS[] = +{ + 3, 11, 6, 34, 1, 16, 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 15, + 16, 17, 1, 4, 18, 19, 1, 0, 1, 4, 19, 20, 2, 1, 1, 4, 20, 21, 3, 2, + 1, 4, 21, 22, 4, 3, 1, 4, 22, 23, 5, 4, 1, 4, 23, 24, 7, 5, 1, 4, + 24, 25, 8, 7, 1, 4, 25, 26, 9, 8, 1, 4, 26, 27, 10, 9, 1, 4, 27, 28, + 12, 10, 1, 4, 28, 29, 13, 12, 1, 4, 29, 30, 14, 13, 1, 4, 30, 31, 15, 14, + 1, 4, 31, 32, 16, 15, 1, 4, 32, 33, 17, 16, 1, 4, 33, 18, 0, 17, 1, + 0 +}; + +struct lwo LWO_GuageDial = +{ + 35, /* number of points */ + GuageDial_PNTS, GuageDial_normals, GuageDial_POLS, 0L +}; + +static GLfloat GuageFace_PNTS[] = +{ + (GLfloat) 0.000000, (GLfloat) 1.783300, (GLfloat) 0.200000, + (GLfloat) - 0.087791, (GLfloat) 1.774653, (GLfloat) 0.200000, + (GLfloat) - 0.172208, (GLfloat) 1.749046, (GLfloat) 0.200000, + (GLfloat) - 0.250007, (GLfloat) 1.707461, (GLfloat) 0.200000, + (GLfloat) - 0.318198, (GLfloat) 1.651498, (GLfloat) 0.200000, + (GLfloat) - 0.374161, (GLfloat) 1.583307, (GLfloat) 0.200000, + (GLfloat) - 0.415746, (GLfloat) 1.505508, (GLfloat) 0.200000, + (GLfloat) - 0.441353, (GLfloat) 1.421091, (GLfloat) 0.200000, + (GLfloat) - 0.450000, (GLfloat) 1.333300, (GLfloat) 0.200000, + (GLfloat) - 0.441353, (GLfloat) 1.245509, (GLfloat) 0.200000, + (GLfloat) - 0.415746, (GLfloat) 1.161092, (GLfloat) 0.200000, + (GLfloat) - 0.374161, (GLfloat) 1.083293, (GLfloat) 0.200000, + (GLfloat) - 0.318198, (GLfloat) 1.015102, (GLfloat) 0.200000, + (GLfloat) - 0.250007, (GLfloat) 0.959139, (GLfloat) 0.200000, + (GLfloat) - 0.172208, (GLfloat) 0.917554, (GLfloat) 0.200000, + (GLfloat) - 0.087791, (GLfloat) 0.891947, (GLfloat) 0.200000, + (GLfloat) 0.000000, (GLfloat) 0.883300, (GLfloat) 0.200000, + (GLfloat) 0.087791, (GLfloat) 0.891947, (GLfloat) 0.200000, + (GLfloat) 0.172208, (GLfloat) 0.917554, (GLfloat) 0.200000, + (GLfloat) 0.250007, (GLfloat) 0.959139, (GLfloat) 0.200000, + (GLfloat) 0.318198, (GLfloat) 1.015102, (GLfloat) 0.200000, + (GLfloat) 0.374161, (GLfloat) 1.083293, (GLfloat) 0.200000, + (GLfloat) 0.415746, (GLfloat) 1.161092, (GLfloat) 0.200000, + (GLfloat) 0.441353, (GLfloat) 1.245509, (GLfloat) 0.200000, + (GLfloat) 0.450000, (GLfloat) 1.333300, (GLfloat) 0.200000, + (GLfloat) 0.441353, (GLfloat) 1.421091, (GLfloat) 0.200000, + (GLfloat) 0.415746, (GLfloat) 1.505508, (GLfloat) 0.200000, + (GLfloat) 0.374161, (GLfloat) 1.583307, (GLfloat) 0.200000, + (GLfloat) 0.318198, (GLfloat) 1.651498, (GLfloat) 0.200000, + (GLfloat) 0.250007, (GLfloat) 1.707461, (GLfloat) 0.200000, + (GLfloat) 0.172208, (GLfloat) 1.749046, (GLfloat) 0.200000, + (GLfloat) 0.087791, (GLfloat) 1.774653, (GLfloat) 0.200000, +}; + +static GLfloat GuageFace_normals[] = +{ + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, +}; + +static unsigned short int GuageFace_POLS[] = +{ +32, 0, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, + 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, + 0 +}; + +struct lwo LWO_GuageFace = +{ + 32, /* number of points */ + GuageFace_PNTS, GuageFace_normals, GuageFace_POLS, 0L +}; + +static GLfloat GuageHead_PNTS[] = +{ + (GLfloat) 0.000000, (GLfloat) 1.833300, (GLfloat) 0.333330, + (GLfloat) 0.097545, (GLfloat) 1.823693, (GLfloat) 0.333330, + (GLfloat) 0.191342, (GLfloat) 1.795240, (GLfloat) 0.333330, + (GLfloat) 0.277785, (GLfloat) 1.749035, (GLfloat) 0.333330, + (GLfloat) 0.353553, (GLfloat) 1.686853, (GLfloat) 0.333330, + (GLfloat) 0.415735, (GLfloat) 1.611085, (GLfloat) 0.333330, + (GLfloat) 0.461940, (GLfloat) 1.524642, (GLfloat) 0.333330, + (GLfloat) 0.490393, (GLfloat) 1.430845, (GLfloat) 0.333330, + (GLfloat) 0.500000, (GLfloat) 1.333300, (GLfloat) 0.333330, + (GLfloat) 0.490393, (GLfloat) 1.235755, (GLfloat) 0.333330, + (GLfloat) 0.461940, (GLfloat) 1.141958, (GLfloat) 0.333330, + (GLfloat) 0.415735, (GLfloat) 1.055515, (GLfloat) 0.333330, + (GLfloat) 0.353553, (GLfloat) 0.979747, (GLfloat) 0.333330, + (GLfloat) 0.277785, (GLfloat) 0.917565, (GLfloat) 0.333330, + (GLfloat) 0.191342, (GLfloat) 0.871360, (GLfloat) 0.333330, + (GLfloat) 0.097545, (GLfloat) 0.842907, (GLfloat) 0.333330, + (GLfloat) 0.000000, (GLfloat) 0.833300, (GLfloat) 0.333330, + (GLfloat) - 0.097545, (GLfloat) 0.842907, (GLfloat) 0.333330, + (GLfloat) - 0.191342, (GLfloat) 0.871360, (GLfloat) 0.333330, + (GLfloat) - 0.277785, (GLfloat) 0.917565, (GLfloat) 0.333330, + (GLfloat) - 0.353553, (GLfloat) 0.979747, (GLfloat) 0.333330, + (GLfloat) - 0.415735, (GLfloat) 1.055515, (GLfloat) 0.333330, + (GLfloat) - 0.461940, (GLfloat) 1.141958, (GLfloat) 0.333330, + (GLfloat) - 0.490393, (GLfloat) 1.235755, (GLfloat) 0.333330, + (GLfloat) - 0.500000, (GLfloat) 1.333300, (GLfloat) 0.333330, + (GLfloat) - 0.490393, (GLfloat) 1.430845, (GLfloat) 0.333330, + (GLfloat) - 0.461940, (GLfloat) 1.524642, (GLfloat) 0.333330, + (GLfloat) - 0.415735, (GLfloat) 1.611085, (GLfloat) 0.333330, + (GLfloat) - 0.353553, (GLfloat) 1.686853, (GLfloat) 0.333330, + (GLfloat) - 0.277785, (GLfloat) 1.749035, (GLfloat) 0.333330, + (GLfloat) - 0.191342, (GLfloat) 1.795240, (GLfloat) 0.333330, + (GLfloat) - 0.097545, (GLfloat) 1.823693, (GLfloat) 0.333330, + (GLfloat) 0.000000, (GLfloat) 1.833300, (GLfloat) - 0.333330, + (GLfloat) 0.097545, (GLfloat) 1.823693, (GLfloat) - 0.333330, + (GLfloat) 0.191342, (GLfloat) 1.795240, (GLfloat) - 0.333330, + (GLfloat) 0.277785, (GLfloat) 1.749035, (GLfloat) - 0.333330, + (GLfloat) 0.353553, (GLfloat) 1.686853, (GLfloat) - 0.333330, + (GLfloat) 0.415735, (GLfloat) 1.611085, (GLfloat) - 0.333330, + (GLfloat) 0.461940, (GLfloat) 1.524642, (GLfloat) - 0.333330, + (GLfloat) 0.490393, (GLfloat) 1.430845, (GLfloat) - 0.333330, + (GLfloat) 0.500000, (GLfloat) 1.333300, (GLfloat) - 0.333330, + (GLfloat) 0.490393, (GLfloat) 1.235755, (GLfloat) - 0.333330, + (GLfloat) 0.461940, (GLfloat) 1.141958, (GLfloat) - 0.333330, + (GLfloat) 0.415735, (GLfloat) 1.055515, (GLfloat) - 0.333330, + (GLfloat) 0.353553, (GLfloat) 0.979747, (GLfloat) - 0.333330, + (GLfloat) 0.277785, (GLfloat) 0.917565, (GLfloat) - 0.333330, + (GLfloat) 0.191342, (GLfloat) 0.871360, (GLfloat) - 0.333330, + (GLfloat) 0.097545, (GLfloat) 0.842907, (GLfloat) - 0.333330, + (GLfloat) 0.000000, (GLfloat) 0.833300, (GLfloat) - 0.333330, + (GLfloat) - 0.097545, (GLfloat) 0.842907, (GLfloat) - 0.333330, + (GLfloat) - 0.191342, (GLfloat) 0.871360, (GLfloat) - 0.333330, + (GLfloat) - 0.277785, (GLfloat) 0.917565, (GLfloat) - 0.333330, + (GLfloat) - 0.353553, (GLfloat) 0.979747, (GLfloat) - 0.333330, + (GLfloat) - 0.415735, (GLfloat) 1.055515, (GLfloat) - 0.333330, + (GLfloat) - 0.461940, (GLfloat) 1.141958, (GLfloat) - 0.333330, + (GLfloat) - 0.490393, (GLfloat) 1.235755, (GLfloat) - 0.333330, + (GLfloat) - 0.500000, (GLfloat) 1.333300, (GLfloat) - 0.333330, + (GLfloat) - 0.490393, (GLfloat) 1.430845, (GLfloat) - 0.333330, + (GLfloat) - 0.461940, (GLfloat) 1.524642, (GLfloat) - 0.333330, + (GLfloat) - 0.415735, (GLfloat) 1.611085, (GLfloat) - 0.333330, + (GLfloat) - 0.353553, (GLfloat) 1.686853, (GLfloat) - 0.333330, + (GLfloat) - 0.277785, (GLfloat) 1.749035, (GLfloat) - 0.333330, + (GLfloat) - 0.191342, (GLfloat) 1.795240, (GLfloat) - 0.333330, + (GLfloat) - 0.097545, (GLfloat) 1.823693, (GLfloat) - 0.333330, + (GLfloat) 0.087791, (GLfloat) 1.774653, (GLfloat) 0.333330, + (GLfloat) 0.000000, (GLfloat) 1.783300, (GLfloat) 0.333330, + (GLfloat) 0.172208, (GLfloat) 1.749046, (GLfloat) 0.333330, + (GLfloat) 0.250007, (GLfloat) 1.707461, (GLfloat) 0.333330, + (GLfloat) 0.318198, (GLfloat) 1.651498, (GLfloat) 0.333330, + (GLfloat) 0.374161, (GLfloat) 1.583307, (GLfloat) 0.333330, + (GLfloat) 0.415746, (GLfloat) 1.505508, (GLfloat) 0.333330, + (GLfloat) 0.441353, (GLfloat) 1.421091, (GLfloat) 0.333330, + (GLfloat) 0.450000, (GLfloat) 1.333300, (GLfloat) 0.333330, + (GLfloat) 0.441353, (GLfloat) 1.245509, (GLfloat) 0.333330, + (GLfloat) 0.415746, (GLfloat) 1.161092, (GLfloat) 0.333330, + (GLfloat) 0.374161, (GLfloat) 1.083293, (GLfloat) 0.333330, + (GLfloat) 0.318198, (GLfloat) 1.015102, (GLfloat) 0.333330, + (GLfloat) 0.250007, (GLfloat) 0.959139, (GLfloat) 0.333330, + (GLfloat) 0.172208, (GLfloat) 0.917554, (GLfloat) 0.333330, + (GLfloat) 0.087791, (GLfloat) 0.891947, (GLfloat) 0.333330, + (GLfloat) 0.000000, (GLfloat) 0.883300, (GLfloat) 0.333330, + (GLfloat) - 0.087791, (GLfloat) 0.891947, (GLfloat) 0.333330, + (GLfloat) - 0.172208, (GLfloat) 0.917554, (GLfloat) 0.333330, + (GLfloat) - 0.250007, (GLfloat) 0.959139, (GLfloat) 0.333330, + (GLfloat) - 0.318198, (GLfloat) 1.015102, (GLfloat) 0.333330, + (GLfloat) - 0.374161, (GLfloat) 1.083293, (GLfloat) 0.333330, + (GLfloat) - 0.415746, (GLfloat) 1.161092, (GLfloat) 0.333330, + (GLfloat) - 0.441353, (GLfloat) 1.245509, (GLfloat) 0.333330, + (GLfloat) - 0.450000, (GLfloat) 1.333300, (GLfloat) 0.333330, + (GLfloat) - 0.441353, (GLfloat) 1.421091, (GLfloat) 0.333330, + (GLfloat) - 0.415746, (GLfloat) 1.505508, (GLfloat) 0.333330, + (GLfloat) - 0.374161, (GLfloat) 1.583307, (GLfloat) 0.333330, + (GLfloat) - 0.318198, (GLfloat) 1.651498, (GLfloat) 0.333330, + (GLfloat) - 0.250007, (GLfloat) 1.707461, (GLfloat) 0.333330, + (GLfloat) - 0.172208, (GLfloat) 1.749046, (GLfloat) 0.333330, + (GLfloat) - 0.087791, (GLfloat) 1.774653, (GLfloat) 0.333330, + (GLfloat) 0.000000, (GLfloat) 1.783300, (GLfloat) 0.200000, + (GLfloat) - 0.087791, (GLfloat) 1.774653, (GLfloat) 0.200000, + (GLfloat) - 0.172208, (GLfloat) 1.749046, (GLfloat) 0.200000, + (GLfloat) - 0.250007, (GLfloat) 1.707461, (GLfloat) 0.200000, + (GLfloat) - 0.318198, (GLfloat) 1.651498, (GLfloat) 0.200000, + (GLfloat) - 0.374161, (GLfloat) 1.583307, (GLfloat) 0.200000, + (GLfloat) - 0.415746, (GLfloat) 1.505508, (GLfloat) 0.200000, + (GLfloat) - 0.441353, (GLfloat) 1.421091, (GLfloat) 0.200000, + (GLfloat) - 0.450000, (GLfloat) 1.333300, (GLfloat) 0.200000, + (GLfloat) - 0.441353, (GLfloat) 1.245509, (GLfloat) 0.200000, + (GLfloat) - 0.415746, (GLfloat) 1.161092, (GLfloat) 0.200000, + (GLfloat) - 0.374161, (GLfloat) 1.083293, (GLfloat) 0.200000, + (GLfloat) - 0.318198, (GLfloat) 1.015102, (GLfloat) 0.200000, + (GLfloat) - 0.250007, (GLfloat) 0.959139, (GLfloat) 0.200000, + (GLfloat) - 0.172208, (GLfloat) 0.917554, (GLfloat) 0.200000, + (GLfloat) - 0.087791, (GLfloat) 0.891947, (GLfloat) 0.200000, + (GLfloat) 0.000000, (GLfloat) 0.883300, (GLfloat) 0.200000, + (GLfloat) 0.087791, (GLfloat) 0.891947, (GLfloat) 0.200000, + (GLfloat) 0.172208, (GLfloat) 0.917554, (GLfloat) 0.200000, + (GLfloat) 0.250007, (GLfloat) 0.959139, (GLfloat) 0.200000, + (GLfloat) 0.318198, (GLfloat) 1.015102, (GLfloat) 0.200000, + (GLfloat) 0.374161, (GLfloat) 1.083293, (GLfloat) 0.200000, + (GLfloat) 0.415746, (GLfloat) 1.161092, (GLfloat) 0.200000, + (GLfloat) 0.441353, (GLfloat) 1.245509, (GLfloat) 0.200000, + (GLfloat) 0.450000, (GLfloat) 1.333300, (GLfloat) 0.200000, + (GLfloat) 0.441353, (GLfloat) 1.421091, (GLfloat) 0.200000, + (GLfloat) 0.415746, (GLfloat) 1.505508, (GLfloat) 0.200000, + (GLfloat) 0.374161, (GLfloat) 1.583307, (GLfloat) 0.200000, + (GLfloat) 0.318198, (GLfloat) 1.651498, (GLfloat) 0.200000, + (GLfloat) 0.250007, (GLfloat) 1.707461, (GLfloat) 0.200000, + (GLfloat) 0.172208, (GLfloat) 1.749046, (GLfloat) 0.200000, + (GLfloat) 0.087791, (GLfloat) 1.774653, (GLfloat) 0.200000, +}; + +static GLfloat GuageHead_normals[] = +{ + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.098017, (GLfloat) - 0.995185, (GLfloat) - 0.000000, + (GLfloat) 0.290285, (GLfloat) - 0.956940, (GLfloat) - 0.000000, + (GLfloat) 0.471397, (GLfloat) - 0.881921, (GLfloat) - 0.000000, + (GLfloat) 0.634393, (GLfloat) - 0.773010, (GLfloat) - 0.000000, + (GLfloat) 0.773011, (GLfloat) - 0.634393, (GLfloat) - 0.000000, + (GLfloat) 0.881921, (GLfloat) - 0.471397, (GLfloat) - 0.000000, + (GLfloat) 0.956940, (GLfloat) - 0.290284, (GLfloat) - 0.000000, + (GLfloat) 0.995185, (GLfloat) - 0.098017, (GLfloat) - 0.000000, + (GLfloat) 0.995185, (GLfloat) 0.098017, (GLfloat) 0.000000, + (GLfloat) 0.956940, (GLfloat) 0.290284, (GLfloat) 0.000000, + (GLfloat) 0.881921, (GLfloat) 0.471397, (GLfloat) 0.000000, + (GLfloat) 0.773011, (GLfloat) 0.634393, (GLfloat) 0.000000, + (GLfloat) 0.634393, (GLfloat) 0.773011, (GLfloat) 0.000000, + (GLfloat) 0.471397, (GLfloat) 0.881921, (GLfloat) 0.000000, + (GLfloat) 0.290285, (GLfloat) 0.956940, (GLfloat) 0.000000, + (GLfloat) 0.098017, (GLfloat) 0.995185, (GLfloat) 0.000000, + (GLfloat) - 0.098017, (GLfloat) 0.995185, (GLfloat) - 0.000000, + (GLfloat) - 0.290285, (GLfloat) 0.956940, (GLfloat) - 0.000000, + (GLfloat) - 0.471397, (GLfloat) 0.881921, (GLfloat) - 0.000000, + (GLfloat) - 0.634393, (GLfloat) 0.773011, (GLfloat) - 0.000000, + (GLfloat) - 0.773011, (GLfloat) 0.634393, (GLfloat) - 0.000000, + (GLfloat) - 0.881921, (GLfloat) 0.471397, (GLfloat) - 0.000000, + (GLfloat) - 0.956940, (GLfloat) 0.290284, (GLfloat) - 0.000000, + (GLfloat) - 0.995185, (GLfloat) 0.098017, (GLfloat) - 0.000000, + (GLfloat) - 0.995185, (GLfloat) - 0.098017, (GLfloat) - 0.000000, + (GLfloat) - 0.956940, (GLfloat) - 0.290284, (GLfloat) - 0.000000, + (GLfloat) - 0.881921, (GLfloat) - 0.471397, (GLfloat) - 0.000000, + (GLfloat) - 0.773011, (GLfloat) - 0.634393, (GLfloat) - 0.000000, + (GLfloat) - 0.634393, (GLfloat) - 0.773010, (GLfloat) - 0.000000, + (GLfloat) - 0.471397, (GLfloat) - 0.881921, (GLfloat) - 0.000000, + (GLfloat) - 0.290285, (GLfloat) - 0.956940, (GLfloat) - 0.000000, + (GLfloat) - 0.098017, (GLfloat) - 0.995185, (GLfloat) - 0.000000, + (GLfloat) 0.098017, (GLfloat) 0.995185, (GLfloat) 0.000000, + (GLfloat) 0.290285, (GLfloat) 0.956940, (GLfloat) 0.000000, + (GLfloat) 0.471397, (GLfloat) 0.881921, (GLfloat) 0.000000, + (GLfloat) 0.634393, (GLfloat) 0.773011, (GLfloat) 0.000000, + (GLfloat) 0.773011, (GLfloat) 0.634393, (GLfloat) 0.000000, + (GLfloat) 0.881921, (GLfloat) 0.471397, (GLfloat) 0.000000, + (GLfloat) 0.956940, (GLfloat) 0.290284, (GLfloat) 0.000000, + (GLfloat) 0.995185, (GLfloat) 0.098017, (GLfloat) 0.000000, + (GLfloat) 0.995185, (GLfloat) - 0.098017, (GLfloat) - 0.000000, + (GLfloat) 0.956940, (GLfloat) - 0.290284, (GLfloat) - 0.000000, + (GLfloat) 0.881921, (GLfloat) - 0.471397, (GLfloat) - 0.000000, + (GLfloat) 0.773011, (GLfloat) - 0.634393, (GLfloat) - 0.000000, + (GLfloat) 0.634393, (GLfloat) - 0.773010, (GLfloat) - 0.000000, + (GLfloat) 0.471396, (GLfloat) - 0.881921, (GLfloat) - 0.000000, + (GLfloat) 0.290285, (GLfloat) - 0.956940, (GLfloat) - 0.000000, + (GLfloat) 0.098017, (GLfloat) - 0.995185, (GLfloat) - 0.000000, + (GLfloat) - 0.098017, (GLfloat) - 0.995185, (GLfloat) - 0.000000, + (GLfloat) - 0.290285, (GLfloat) - 0.956940, (GLfloat) - 0.000000, + (GLfloat) - 0.471396, (GLfloat) - 0.881921, (GLfloat) - 0.000000, + (GLfloat) - 0.634393, (GLfloat) - 0.773010, (GLfloat) - 0.000000, + (GLfloat) - 0.773011, (GLfloat) - 0.634393, (GLfloat) - 0.000000, + (GLfloat) - 0.881921, (GLfloat) - 0.471397, (GLfloat) - 0.000000, + (GLfloat) - 0.956940, (GLfloat) - 0.290284, (GLfloat) - 0.000000, + (GLfloat) - 0.995185, (GLfloat) - 0.098017, (GLfloat) - 0.000000, + (GLfloat) - 0.995185, (GLfloat) 0.098017, (GLfloat) - 0.000000, + (GLfloat) - 0.956940, (GLfloat) 0.290284, (GLfloat) - 0.000000, + (GLfloat) - 0.881921, (GLfloat) 0.471397, (GLfloat) - 0.000000, + (GLfloat) - 0.773011, (GLfloat) 0.634393, (GLfloat) - 0.000000, + (GLfloat) - 0.634393, (GLfloat) 0.773011, (GLfloat) - 0.000000, + (GLfloat) - 0.471397, (GLfloat) 0.881921, (GLfloat) - 0.000000, + (GLfloat) - 0.290285, (GLfloat) 0.956940, (GLfloat) - 0.000000, + (GLfloat) - 0.098017, (GLfloat) 0.995185, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, +}; + +static unsigned short int GuageHead_POLS[] = +{ + 3, 67, 3, 4, 1, 3, 68, 67, 4, 1, 3, 68, 4, 5, 1, 3, 69, 68, 5, 1, + 3, 70, 69, 5, 1, 3, 70, 5, 6, 1, 3, 70, 6, 7, 1, 3, 71, 70, 7, 1, + 3, 71, 7, 8, 1, 3, 72, 71, 8, 1, 3, 73, 72, 8, 1, 3, 73, 8, 9, 1, + 3, 74, 73, 9, 1, 3, 74, 9, 10, 1, 3, 74, 10, 11, 1, 3, 75, 74, 11, 1, + 3, 76, 75, 11, 1, 3, 76, 11, 12, 1, 3, 76, 12, 13, 1, 3, 77, 76, 13, 1, + 3, 78, 77, 13, 1, 3, 78, 13, 14, 1, 3, 78, 14, 15, 1, 3, 79, 78, 15, 1, + 3, 79, 15, 16, 1, 3, 80, 79, 16, 1, 3, 81, 80, 16, 1, 3, 81, 16, 17, 1, + 3, 82, 81, 17, 1, 3, 82, 17, 18, 1, 3, 82, 18, 19, 1, 3, 83, 82, 19, 1, + 3, 84, 83, 19, 1, 3, 84, 19, 20, 1, 3, 84, 20, 21, 1, 3, 85, 84, 21, 1, + 3, 86, 85, 21, 1, 3, 86, 21, 22, 1, 3, 86, 22, 23, 1, 3, 87, 86, 23, 1, + 3, 87, 23, 24, 1, 3, 88, 87, 24, 1, 3, 89, 88, 24, 1, 3, 89, 24, 25, 1, + 3, 90, 89, 25, 1, 3, 90, 25, 26, 1, 3, 90, 26, 27, 1, 3, 91, 90, 27, 1, + 3, 92, 91, 27, 1, 3, 92, 27, 28, 1, 3, 93, 92, 28, 1, 3, 93, 28, 29, 1, + 3, 2, 3, 67, 1, 3, 2, 67, 66, 1, 3, 1, 2, 66, 1, 3, 1, 66, 64, 1, + 3, 1, 64, 65, 1, 3, 0, 1, 65, 1, 3, 31, 0, 65, 1, 3, 31, 65, 95, 1, + 3, 31, 95, 94, 1, 3, 30, 31, 94, 1, 3, 30, 94, 93, 1, 3, 93, 29, 30, 1, + 4, 96, 97, 95, 65, 1, 4, 97, 98, 94, 95, 1, 4, 98, 99, 93, 94, 1, 4, 99, + 100, 92, 93, 1, 4, 100, 101, 91, 92, 1, 4, 101, 102, 90, 91, 1, 4, 102, 103, 89, +90, 1, 4, 103, 104, 88, 89, 1, 4, 104, 105, 87, 88, 1, 4, 105, 106, 86, 87, 1, + 4, 106, 107, 85, 86, 1, 4, 107, 108, 84, 85, 1, 4, 108, 109, 83, 84, 1, 4, 109, + 110, 82, 83, 1, 4, 110, 111, 81, 82, 1, 4, 111, 112, 80, 81, 1, 4, 112, 113, 79, +80, 1, 4, 113, 114, 78, 79, 1, 4, 114, 115, 77, 78, 1, 4, 115, 116, 76, 77, 1, + 4, 116, 117, 75, 76, 1, 4, 117, 118, 74, 75, 1, 4, 118, 119, 73, 74, 1, 4, 119, + 120, 72, 73, 1, 4, 120, 121, 71, 72, 1, 4, 121, 122, 70, 71, 1, 4, 122, 123, 69, +70, 1, 4, 123, 124, 68, 69, 1, 4, 124, 125, 67, 68, 1, 4, 125, 126, 66, 67, 1, + 4, 126, 127, 64, 66, 1, 4, 127, 96, 65, 64, 1, 4, 32, 33, 1, 0, 1, 4, 33, + 34, 2, 1, 1, 4, 34, 35, 3, 2, 1, 4, 35, 36, 4, 3, 1, 4, 36, 37, 5, + 4, 1, 4, 37, 38, 6, 5, 1, 4, 38, 39, 7, 6, 1, 4, 39, 40, 8, 7, 1, + 4, 40, 41, 9, 8, 1, 4, 41, 42, 10, 9, 1, 4, 42, 43, 11, 10, 1, 4, 43, + 44, 12, 11, 1, 4, 44, 45, 13, 12, 1, 4, 45, 46, 14, 13, 1, 4, 46, 47, 15, + 14, 1, 4, 47, 48, 16, 15, 1, 4, 48, 49, 17, 16, 1, 4, 49, 50, 18, 17, 1, + 4, 50, 51, 19, 18, 1, 4, 51, 52, 20, 19, 1, 4, 52, 53, 21, 20, 1, 4, 53, + 54, 22, 21, 1, 4, 54, 55, 23, 22, 1, 4, 55, 56, 24, 23, 1, 4, 56, 57, 25, + 24, 1, 4, 57, 58, 26, 25, 1, 4, 58, 59, 27, 26, 1, 4, 59, 60, 28, 27, 1, + 4, 60, 61, 29, 28, 1, 4, 61, 62, 30, 29, 1, 4, 62, 63, 31, 30, 1, 4, 63, +32, 0, 31, 1, 32, 32, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, + 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 1, + 0 +}; + +struct lwo LWO_GuageHead = +{ + 128, /* number of points */ + GuageHead_PNTS, GuageHead_normals, GuageHead_POLS, 0L +}; + +static GLfloat PipeBetweenBolts_PNTS[] = +{ + (GLfloat) 0.000000, (GLfloat) 0.500000, (GLfloat) 0.500000, + (GLfloat) 0.129410, (GLfloat) 0.482963, (GLfloat) 0.500000, + (GLfloat) 0.250000, (GLfloat) 0.433013, (GLfloat) 0.500000, + (GLfloat) 0.353553, (GLfloat) 0.353553, (GLfloat) 0.500000, + (GLfloat) 0.433013, (GLfloat) 0.250000, (GLfloat) 0.500000, + (GLfloat) 0.482963, (GLfloat) 0.129410, (GLfloat) 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.500000, + (GLfloat) 0.482963, (GLfloat) - 0.129410, (GLfloat) 0.500000, + (GLfloat) 0.433013, (GLfloat) - 0.250000, (GLfloat) 0.500000, + (GLfloat) 0.353553, (GLfloat) - 0.353553, (GLfloat) 0.500000, + (GLfloat) 0.250000, (GLfloat) - 0.433013, (GLfloat) 0.500000, + (GLfloat) 0.129410, (GLfloat) - 0.482963, (GLfloat) 0.500000, + (GLfloat) 0.000000, (GLfloat) - 0.500000, (GLfloat) 0.500000, + (GLfloat) - 0.129410, (GLfloat) - 0.482963, (GLfloat) 0.500000, + (GLfloat) - 0.250000, (GLfloat) - 0.433013, (GLfloat) 0.500000, + (GLfloat) - 0.353553, (GLfloat) - 0.353553, (GLfloat) 0.500000, + (GLfloat) - 0.433013, (GLfloat) - 0.250000, (GLfloat) 0.500000, + (GLfloat) - 0.482963, (GLfloat) - 0.129410, (GLfloat) 0.500000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) 0.500000, + (GLfloat) - 0.482963, (GLfloat) 0.129410, (GLfloat) 0.500000, + (GLfloat) - 0.433013, (GLfloat) 0.250000, (GLfloat) 0.500000, + (GLfloat) - 0.353553, (GLfloat) 0.353553, (GLfloat) 0.500000, + (GLfloat) - 0.250000, (GLfloat) 0.433013, (GLfloat) 0.500000, + (GLfloat) - 0.129410, (GLfloat) 0.482963, (GLfloat) 0.500000, + (GLfloat) 0.000000, (GLfloat) 0.500000, (GLfloat) - 0.500000, + (GLfloat) 0.129410, (GLfloat) 0.482963, (GLfloat) - 0.500000, + (GLfloat) 0.250000, (GLfloat) 0.433013, (GLfloat) - 0.500000, + (GLfloat) 0.353553, (GLfloat) 0.353553, (GLfloat) - 0.500000, + (GLfloat) 0.433013, (GLfloat) 0.250000, (GLfloat) - 0.500000, + (GLfloat) 0.482963, (GLfloat) 0.129410, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.500000, + (GLfloat) 0.482963, (GLfloat) - 0.129410, (GLfloat) - 0.500000, + (GLfloat) 0.433013, (GLfloat) - 0.250000, (GLfloat) - 0.500000, + (GLfloat) 0.353553, (GLfloat) - 0.353553, (GLfloat) - 0.500000, + (GLfloat) 0.250000, (GLfloat) - 0.433013, (GLfloat) - 0.500000, + (GLfloat) 0.129410, (GLfloat) - 0.482963, (GLfloat) - 0.500000, + (GLfloat) 0.000000, (GLfloat) - 0.500000, (GLfloat) - 0.500000, + (GLfloat) - 0.129410, (GLfloat) - 0.482963, (GLfloat) - 0.500000, + (GLfloat) - 0.250000, (GLfloat) - 0.433013, (GLfloat) - 0.500000, + (GLfloat) - 0.353553, (GLfloat) - 0.353553, (GLfloat) - 0.500000, + (GLfloat) - 0.433013, (GLfloat) - 0.250000, (GLfloat) - 0.500000, + (GLfloat) - 0.482963, (GLfloat) - 0.129410, (GLfloat) - 0.500000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.500000, + (GLfloat) - 0.482963, (GLfloat) 0.129410, (GLfloat) - 0.500000, + (GLfloat) - 0.433013, (GLfloat) 0.250000, (GLfloat) - 0.500000, + (GLfloat) - 0.353553, (GLfloat) 0.353553, (GLfloat) - 0.500000, + (GLfloat) - 0.250000, (GLfloat) 0.433013, (GLfloat) - 0.500000, + (GLfloat) - 0.129410, (GLfloat) 0.482963, (GLfloat) - 0.500000, +}; + +static GLfloat PipeBetweenBolts_normals[] = +{ + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.130526, (GLfloat) 0.991445, (GLfloat) 0.000000, + (GLfloat) 0.382683, (GLfloat) 0.923880, (GLfloat) 0.000000, + (GLfloat) 0.608761, (GLfloat) 0.793353, (GLfloat) 0.000000, + (GLfloat) 0.793353, (GLfloat) 0.608761, (GLfloat) 0.000000, + (GLfloat) 0.923880, (GLfloat) 0.382683, (GLfloat) 0.000000, + (GLfloat) 0.991445, (GLfloat) 0.130526, (GLfloat) 0.000000, + (GLfloat) 0.991445, (GLfloat) - 0.130526, (GLfloat) - 0.000000, + (GLfloat) 0.923880, (GLfloat) - 0.382683, (GLfloat) - 0.000000, + (GLfloat) 0.793353, (GLfloat) - 0.608761, (GLfloat) - 0.000000, + (GLfloat) 0.608761, (GLfloat) - 0.793353, (GLfloat) - 0.000000, + (GLfloat) 0.382683, (GLfloat) - 0.923880, (GLfloat) - 0.000000, + (GLfloat) 0.130526, (GLfloat) - 0.991445, (GLfloat) - 0.000000, + (GLfloat) - 0.130526, (GLfloat) - 0.991445, (GLfloat) - 0.000000, + (GLfloat) - 0.382683, (GLfloat) - 0.923880, (GLfloat) - 0.000000, + (GLfloat) - 0.608761, (GLfloat) - 0.793353, (GLfloat) - 0.000000, + (GLfloat) - 0.793353, (GLfloat) - 0.608761, (GLfloat) - 0.000000, + (GLfloat) - 0.923880, (GLfloat) - 0.382683, (GLfloat) - 0.000000, + (GLfloat) - 0.991445, (GLfloat) - 0.130526, (GLfloat) - 0.000000, + (GLfloat) - 0.991445, (GLfloat) 0.130526, (GLfloat) - 0.000000, + (GLfloat) - 0.923880, (GLfloat) 0.382683, (GLfloat) - 0.000000, + (GLfloat) - 0.793353, (GLfloat) 0.608761, (GLfloat) - 0.000000, + (GLfloat) - 0.608761, (GLfloat) 0.793353, (GLfloat) - 0.000000, + (GLfloat) - 0.382683, (GLfloat) 0.923880, (GLfloat) - 0.000000, + (GLfloat) - 0.130526, (GLfloat) 0.991445, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, +}; + +static unsigned short int PipeBetweenBolts_POLS[] = +{ + 24, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 1, 4, 24, 25, 1, 0, 1, 4, 25, 26, 2, 1, 1, 4, 26, + 27, 3, 2, 1, 4, 27, 28, 4, 3, 1, 4, 28, 29, 5, 4, 1, 4, 29, 30, 6, + 5, 1, 4, 30, 31, 7, 6, 1, 4, 31, 32, 8, 7, 1, 4, 32, 33, 9, 8, 1, + 4, 33, 34, 10, 9, 1, 4, 34, 35, 11, 10, 1, 4, 35, 36, 12, 11, 1, 4, 36, + 37, 13, 12, 1, 4, 37, 38, 14, 13, 1, 4, 38, 39, 15, 14, 1, 4, 39, 40, 16, + 15, 1, 4, 40, 41, 17, 16, 1, 4, 41, 42, 18, 17, 1, 4, 42, 43, 19, 18, 1, + 4, 43, 44, 20, 19, 1, 4, 44, 45, 21, 20, 1, 4, 45, 46, 22, 21, 1, 4, 46, + 47, 23, 22, 1, 4, 47, 24, 0, 23, 1, 24, 24, 47, 46, 45, 44, 43, 42, 41, 40, + 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 1, + 0 +}; + +struct lwo LWO_PipeBetweenBolts = +{ + 48, /* number of points */ + PipeBetweenBolts_PNTS, PipeBetweenBolts_normals, PipeBetweenBolts_POLS, 0L +}; + +static GLfloat ElbowBolts_PNTS[] = +{ + (GLfloat) 0.273122, (GLfloat) - 0.600000, (GLfloat) - 0.403061, + (GLfloat) 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.600000, + (GLfloat) 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.600000, + (GLfloat) 0.273122, (GLfloat) - 0.600000, (GLfloat) - 0.333061, + (GLfloat) 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.600000, + (GLfloat) 0.212500, (GLfloat) - 0.600000, (GLfloat) - 0.298061, + (GLfloat) 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.600000, + (GLfloat) 0.151878, (GLfloat) - 0.600000, (GLfloat) - 0.333061, + (GLfloat) 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.600000, + (GLfloat) 0.151878, (GLfloat) - 0.600000, (GLfloat) - 0.403061, + (GLfloat) 0.212500, (GLfloat) - 0.600000, (GLfloat) - 0.438061, + (GLfloat) 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.600000, + (GLfloat) 0.273122, (GLfloat) - 0.660000, (GLfloat) - 0.403061, + (GLfloat) 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.660000, + (GLfloat) 0.273122, (GLfloat) - 0.660000, (GLfloat) - 0.333061, + (GLfloat) 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.660000, + (GLfloat) 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.660000, + (GLfloat) 0.212500, (GLfloat) - 0.660000, (GLfloat) - 0.298061, + (GLfloat) 0.151878, (GLfloat) - 0.660000, (GLfloat) - 0.333061, + (GLfloat) 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.660000, + (GLfloat) 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.660000, + (GLfloat) 0.151878, (GLfloat) - 0.660000, (GLfloat) - 0.403061, + (GLfloat) 0.212500, (GLfloat) - 0.660000, (GLfloat) - 0.438061, + (GLfloat) 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.660000, + (GLfloat) 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.460000, + (GLfloat) 0.273122, (GLfloat) - 0.460000, (GLfloat) - 0.403061, + (GLfloat) 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.460000, + (GLfloat) 0.273122, (GLfloat) - 0.460000, (GLfloat) - 0.333061, + (GLfloat) 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.460000, + (GLfloat) 0.212500, (GLfloat) - 0.460000, (GLfloat) - 0.298061, + (GLfloat) 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.460000, + (GLfloat) 0.151878, (GLfloat) - 0.460000, (GLfloat) - 0.333061, + (GLfloat) 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.460000, + (GLfloat) 0.151878, (GLfloat) - 0.460000, (GLfloat) - 0.403061, + (GLfloat) 0.212500, (GLfloat) - 0.460000, (GLfloat) - 0.438061, + (GLfloat) 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.460000, + (GLfloat) 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.520000, + (GLfloat) 0.273122, (GLfloat) - 0.520000, (GLfloat) - 0.403061, + (GLfloat) 0.273122, (GLfloat) - 0.520000, (GLfloat) - 0.333061, + (GLfloat) 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.520000, + (GLfloat) 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.520000, + (GLfloat) 0.212500, (GLfloat) - 0.520000, (GLfloat) - 0.298061, + (GLfloat) 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.520000, + (GLfloat) 0.151878, (GLfloat) - 0.520000, (GLfloat) - 0.333061, + (GLfloat) 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.520000, + (GLfloat) 0.151878, (GLfloat) - 0.520000, (GLfloat) - 0.403061, + (GLfloat) 0.212500, (GLfloat) - 0.520000, (GLfloat) - 0.438061, + (GLfloat) 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.520000, + (GLfloat) 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.460000, + (GLfloat) 0.485622, (GLfloat) - 0.460000, (GLfloat) 0.035000, + (GLfloat) 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.460000, + (GLfloat) 0.425000, (GLfloat) - 0.460000, (GLfloat) 0.070000, + (GLfloat) 0.364378, (GLfloat) - 0.460000, (GLfloat) 0.035000, + (GLfloat) 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.460000, + (GLfloat) 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.460000, + (GLfloat) 0.364378, (GLfloat) - 0.460000, (GLfloat) - 0.035000, + (GLfloat) 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.460000, + (GLfloat) 0.425000, (GLfloat) - 0.460000, (GLfloat) - 0.070000, + (GLfloat) 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.460000, + (GLfloat) 0.485622, (GLfloat) - 0.460000, (GLfloat) - 0.035000, + (GLfloat) 0.485622, (GLfloat) - 0.520000, (GLfloat) 0.035000, + (GLfloat) 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.520000, + (GLfloat) 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.520000, + (GLfloat) 0.425000, (GLfloat) - 0.520000, (GLfloat) 0.070000, + (GLfloat) 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.520000, + (GLfloat) 0.364378, (GLfloat) - 0.520000, (GLfloat) 0.035000, + (GLfloat) 0.364378, (GLfloat) - 0.520000, (GLfloat) - 0.035000, + (GLfloat) 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.520000, + (GLfloat) 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.520000, + (GLfloat) 0.425000, (GLfloat) - 0.520000, (GLfloat) - 0.070000, + (GLfloat) 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.520000, + (GLfloat) 0.485622, (GLfloat) - 0.520000, (GLfloat) - 0.035000, + (GLfloat) 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.600000, + (GLfloat) 0.485622, (GLfloat) - 0.600000, (GLfloat) 0.035000, + (GLfloat) 0.425000, (GLfloat) - 0.600000, (GLfloat) 0.070000, + (GLfloat) 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.600000, + (GLfloat) 0.364378, (GLfloat) - 0.600000, (GLfloat) 0.035000, + (GLfloat) 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.600000, + (GLfloat) 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.600000, + (GLfloat) 0.364378, (GLfloat) - 0.600000, (GLfloat) - 0.035000, + (GLfloat) 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.600000, + (GLfloat) 0.425000, (GLfloat) - 0.600000, (GLfloat) - 0.070000, + (GLfloat) 0.485622, (GLfloat) - 0.600000, (GLfloat) - 0.035000, + (GLfloat) 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.600000, + (GLfloat) 0.485622, (GLfloat) - 0.660000, (GLfloat) 0.035000, + (GLfloat) 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.660000, + (GLfloat) 0.425000, (GLfloat) - 0.660000, (GLfloat) 0.070000, + (GLfloat) 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.660000, + (GLfloat) 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.660000, + (GLfloat) 0.364378, (GLfloat) - 0.660000, (GLfloat) 0.035000, + (GLfloat) 0.364378, (GLfloat) - 0.660000, (GLfloat) - 0.035000, + (GLfloat) 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.660000, + (GLfloat) 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.660000, + (GLfloat) 0.425000, (GLfloat) - 0.660000, (GLfloat) - 0.070000, + (GLfloat) 0.485622, (GLfloat) - 0.660000, (GLfloat) - 0.035000, + (GLfloat) 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.660000, + (GLfloat) 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.460000, + (GLfloat) 0.212500, (GLfloat) - 0.460000, (GLfloat) 0.438061, + (GLfloat) 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.460000, + (GLfloat) 0.151878, (GLfloat) - 0.460000, (GLfloat) 0.403061, + (GLfloat) 0.151878, (GLfloat) - 0.460000, (GLfloat) 0.333061, + (GLfloat) 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.460000, + (GLfloat) 0.212500, (GLfloat) - 0.460000, (GLfloat) 0.298061, + (GLfloat) 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.460000, + (GLfloat) 0.273122, (GLfloat) - 0.460000, (GLfloat) 0.333061, + (GLfloat) 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.460000, + (GLfloat) 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.460000, + (GLfloat) 0.273122, (GLfloat) - 0.460000, (GLfloat) 0.403061, + (GLfloat) 0.212500, (GLfloat) - 0.520000, (GLfloat) 0.438061, + (GLfloat) 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.520000, + (GLfloat) 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.520000, + (GLfloat) 0.151878, (GLfloat) - 0.520000, (GLfloat) 0.403061, + (GLfloat) 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.520000, + (GLfloat) 0.151878, (GLfloat) - 0.520000, (GLfloat) 0.333061, + (GLfloat) 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.520000, + (GLfloat) 0.212500, (GLfloat) - 0.520000, (GLfloat) 0.298061, + (GLfloat) 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.520000, + (GLfloat) 0.273122, (GLfloat) - 0.520000, (GLfloat) 0.333061, + (GLfloat) 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.520000, + (GLfloat) 0.273122, (GLfloat) - 0.520000, (GLfloat) 0.403061, + (GLfloat) 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.600000, + (GLfloat) 0.212500, (GLfloat) - 0.600000, (GLfloat) 0.438061, + (GLfloat) 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.600000, + (GLfloat) 0.151878, (GLfloat) - 0.600000, (GLfloat) 0.403061, + (GLfloat) 0.151878, (GLfloat) - 0.600000, (GLfloat) 0.333061, + (GLfloat) 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.600000, + (GLfloat) 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.600000, + (GLfloat) 0.212500, (GLfloat) - 0.600000, (GLfloat) 0.298061, + (GLfloat) 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.600000, + (GLfloat) 0.273122, (GLfloat) - 0.600000, (GLfloat) 0.333061, + (GLfloat) 0.273122, (GLfloat) - 0.600000, (GLfloat) 0.403061, + (GLfloat) 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.600000, + (GLfloat) 0.212500, (GLfloat) - 0.660000, (GLfloat) 0.438061, + (GLfloat) 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.660000, + (GLfloat) 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.660000, + (GLfloat) 0.151878, (GLfloat) - 0.660000, (GLfloat) 0.403061, + (GLfloat) 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.660000, + (GLfloat) 0.151878, (GLfloat) - 0.660000, (GLfloat) 0.333061, + (GLfloat) 0.212500, (GLfloat) - 0.660000, (GLfloat) 0.298061, + (GLfloat) 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.660000, + (GLfloat) 0.273122, (GLfloat) - 0.660000, (GLfloat) 0.333061, + (GLfloat) 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.660000, + (GLfloat) 0.273122, (GLfloat) - 0.660000, (GLfloat) 0.403061, + (GLfloat) 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.660000, + (GLfloat) - 0.273122, (GLfloat) - 0.460000, (GLfloat) 0.403061, + (GLfloat) - 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.460000, + (GLfloat) - 0.273122, (GLfloat) - 0.460000, (GLfloat) 0.333061, + (GLfloat) - 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.460000, + (GLfloat) - 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.460000, + (GLfloat) - 0.212500, (GLfloat) - 0.460000, (GLfloat) 0.298061, + (GLfloat) - 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.460000, + (GLfloat) - 0.151878, (GLfloat) - 0.460000, (GLfloat) 0.333061, + (GLfloat) - 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.460000, + (GLfloat) - 0.151878, (GLfloat) - 0.460000, (GLfloat) 0.403061, + (GLfloat) - 0.212500, (GLfloat) - 0.460000, (GLfloat) 0.438061, + (GLfloat) - 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.460000, + (GLfloat) - 0.273122, (GLfloat) - 0.520000, (GLfloat) 0.403061, + (GLfloat) - 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.520000, + (GLfloat) - 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.520000, + (GLfloat) - 0.273122, (GLfloat) - 0.520000, (GLfloat) 0.333061, + (GLfloat) - 0.212500, (GLfloat) - 0.520000, (GLfloat) 0.298061, + (GLfloat) - 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.520000, + (GLfloat) - 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.520000, + (GLfloat) - 0.151878, (GLfloat) - 0.520000, (GLfloat) 0.333061, + (GLfloat) - 0.151878, (GLfloat) - 0.520000, (GLfloat) 0.403061, + (GLfloat) - 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.520000, + (GLfloat) - 0.212500, (GLfloat) - 0.520000, (GLfloat) 0.438061, + (GLfloat) - 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.520000, + (GLfloat) - 0.273122, (GLfloat) - 0.600000, (GLfloat) 0.403061, + (GLfloat) - 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.600000, + (GLfloat) - 0.273122, (GLfloat) - 0.600000, (GLfloat) 0.333061, + (GLfloat) - 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.600000, + (GLfloat) - 0.212500, (GLfloat) - 0.600000, (GLfloat) 0.298061, + (GLfloat) - 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.600000, + (GLfloat) - 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.600000, + (GLfloat) - 0.151878, (GLfloat) - 0.600000, (GLfloat) 0.333061, + (GLfloat) - 0.151878, (GLfloat) - 0.600000, (GLfloat) 0.403061, + (GLfloat) - 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.600000, + (GLfloat) - 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.600000, + (GLfloat) - 0.212500, (GLfloat) - 0.600000, (GLfloat) 0.438061, + (GLfloat) - 0.273122, (GLfloat) - 0.660000, (GLfloat) 0.403061, + (GLfloat) - 0.273122, (GLfloat) - 0.403061, (GLfloat) - 0.660000, + (GLfloat) - 0.273122, (GLfloat) - 0.333061, (GLfloat) - 0.660000, + (GLfloat) - 0.273122, (GLfloat) - 0.660000, (GLfloat) 0.333061, + (GLfloat) - 0.212500, (GLfloat) - 0.298061, (GLfloat) - 0.660000, + (GLfloat) - 0.212500, (GLfloat) - 0.660000, (GLfloat) 0.298061, + (GLfloat) - 0.151878, (GLfloat) - 0.660000, (GLfloat) 0.333061, + (GLfloat) - 0.151878, (GLfloat) - 0.333061, (GLfloat) - 0.660000, + (GLfloat) - 0.151878, (GLfloat) - 0.660000, (GLfloat) 0.403061, + (GLfloat) - 0.151878, (GLfloat) - 0.403061, (GLfloat) - 0.660000, + (GLfloat) - 0.212500, (GLfloat) - 0.438061, (GLfloat) - 0.660000, + (GLfloat) - 0.212500, (GLfloat) - 0.660000, (GLfloat) 0.438061, + (GLfloat) - 0.485622, (GLfloat) - 0.460000, (GLfloat) - 0.035000, + (GLfloat) - 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.460000, + (GLfloat) - 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.460000, + (GLfloat) - 0.425000, (GLfloat) - 0.460000, (GLfloat) - 0.070000, + (GLfloat) - 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.460000, + (GLfloat) - 0.364378, (GLfloat) - 0.460000, (GLfloat) - 0.035000, + (GLfloat) - 0.364378, (GLfloat) - 0.460000, (GLfloat) 0.035000, + (GLfloat) - 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.460000, + (GLfloat) - 0.425000, (GLfloat) - 0.460000, (GLfloat) 0.070000, + (GLfloat) - 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.460000, + (GLfloat) - 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.460000, + (GLfloat) - 0.485622, (GLfloat) - 0.460000, (GLfloat) 0.035000, + (GLfloat) - 0.485622, (GLfloat) - 0.520000, (GLfloat) - 0.035000, + (GLfloat) - 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.520000, + (GLfloat) - 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.520000, + (GLfloat) - 0.425000, (GLfloat) - 0.520000, (GLfloat) - 0.070000, + (GLfloat) - 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.520000, + (GLfloat) - 0.364378, (GLfloat) - 0.520000, (GLfloat) - 0.035000, + (GLfloat) - 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.520000, + (GLfloat) - 0.364378, (GLfloat) - 0.520000, (GLfloat) 0.035000, + (GLfloat) - 0.425000, (GLfloat) - 0.520000, (GLfloat) 0.070000, + (GLfloat) - 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.520000, + (GLfloat) - 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.520000, + (GLfloat) - 0.485622, (GLfloat) - 0.520000, (GLfloat) 0.035000, + (GLfloat) - 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.600000, + (GLfloat) - 0.485622, (GLfloat) - 0.600000, (GLfloat) - 0.035000, + (GLfloat) - 0.425000, (GLfloat) - 0.600000, (GLfloat) - 0.070000, + (GLfloat) - 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.600000, + (GLfloat) - 0.364378, (GLfloat) - 0.600000, (GLfloat) - 0.035000, + (GLfloat) - 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.600000, + (GLfloat) - 0.364378, (GLfloat) - 0.600000, (GLfloat) 0.035000, + (GLfloat) - 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.600000, + (GLfloat) - 0.425000, (GLfloat) - 0.600000, (GLfloat) 0.070000, + (GLfloat) - 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.600000, + (GLfloat) - 0.485622, (GLfloat) - 0.600000, (GLfloat) 0.035000, + (GLfloat) - 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.600000, + (GLfloat) - 0.485622, (GLfloat) - 0.660000, (GLfloat) - 0.035000, + (GLfloat) - 0.485622, (GLfloat) 0.035000, (GLfloat) - 0.660000, + (GLfloat) - 0.425000, (GLfloat) - 0.660000, (GLfloat) - 0.070000, + (GLfloat) - 0.425000, (GLfloat) 0.070000, (GLfloat) - 0.660000, + (GLfloat) - 0.364378, (GLfloat) 0.035000, (GLfloat) - 0.660000, + (GLfloat) - 0.364378, (GLfloat) - 0.660000, (GLfloat) - 0.035000, + (GLfloat) - 0.364378, (GLfloat) - 0.660000, (GLfloat) 0.035000, + (GLfloat) - 0.364378, (GLfloat) - 0.035000, (GLfloat) - 0.660000, + (GLfloat) - 0.425000, (GLfloat) - 0.070000, (GLfloat) - 0.660000, + (GLfloat) - 0.425000, (GLfloat) - 0.660000, (GLfloat) 0.070000, + (GLfloat) - 0.485622, (GLfloat) - 0.660000, (GLfloat) 0.035000, + (GLfloat) - 0.485622, (GLfloat) - 0.035000, (GLfloat) - 0.660000, + (GLfloat) - 0.212500, (GLfloat) - 0.460000, (GLfloat) - 0.438061, + (GLfloat) - 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.460000, + (GLfloat) - 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.460000, + (GLfloat) - 0.151878, (GLfloat) - 0.460000, (GLfloat) - 0.403061, + (GLfloat) - 0.151878, (GLfloat) - 0.460000, (GLfloat) - 0.333061, + (GLfloat) - 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.460000, + (GLfloat) - 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.460000, + (GLfloat) - 0.212500, (GLfloat) - 0.460000, (GLfloat) - 0.298061, + (GLfloat) - 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.460000, + (GLfloat) - 0.273122, (GLfloat) - 0.460000, (GLfloat) - 0.333061, + (GLfloat) - 0.273122, (GLfloat) - 0.460000, (GLfloat) - 0.403061, + (GLfloat) - 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.460000, + (GLfloat) - 0.212500, (GLfloat) - 0.520000, (GLfloat) - 0.438061, + (GLfloat) - 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.520000, + (GLfloat) - 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.520000, + (GLfloat) - 0.151878, (GLfloat) - 0.520000, (GLfloat) - 0.403061, + (GLfloat) - 0.151878, (GLfloat) - 0.520000, (GLfloat) - 0.333061, + (GLfloat) - 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.520000, + (GLfloat) - 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.520000, + (GLfloat) - 0.212500, (GLfloat) - 0.520000, (GLfloat) - 0.298061, + (GLfloat) - 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.520000, + (GLfloat) - 0.273122, (GLfloat) - 0.520000, (GLfloat) - 0.333061, + (GLfloat) - 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.520000, + (GLfloat) - 0.273122, (GLfloat) - 0.520000, (GLfloat) - 0.403061, + (GLfloat) - 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.600000, + (GLfloat) - 0.212500, (GLfloat) - 0.600000, (GLfloat) - 0.438061, + (GLfloat) - 0.151878, (GLfloat) - 0.600000, (GLfloat) - 0.403061, + (GLfloat) - 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.600000, + (GLfloat) - 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.600000, + (GLfloat) - 0.151878, (GLfloat) - 0.600000, (GLfloat) - 0.333061, + (GLfloat) - 0.212500, (GLfloat) - 0.600000, (GLfloat) - 0.298061, + (GLfloat) - 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.600000, + (GLfloat) - 0.273122, (GLfloat) - 0.600000, (GLfloat) - 0.333061, + (GLfloat) - 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.600000, + (GLfloat) - 0.273122, (GLfloat) - 0.600000, (GLfloat) - 0.403061, + (GLfloat) - 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.600000, + (GLfloat) - 0.212500, (GLfloat) - 0.660000, (GLfloat) - 0.438061, + (GLfloat) - 0.212500, (GLfloat) 0.438061, (GLfloat) - 0.660000, + (GLfloat) - 0.151878, (GLfloat) - 0.660000, (GLfloat) - 0.403061, + (GLfloat) - 0.151878, (GLfloat) 0.403061, (GLfloat) - 0.660000, + (GLfloat) - 0.151878, (GLfloat) - 0.660000, (GLfloat) - 0.333061, + (GLfloat) - 0.151878, (GLfloat) 0.333061, (GLfloat) - 0.660000, + (GLfloat) - 0.212500, (GLfloat) - 0.660000, (GLfloat) - 0.298061, + (GLfloat) - 0.212500, (GLfloat) 0.298061, (GLfloat) - 0.660000, + (GLfloat) - 0.273122, (GLfloat) - 0.660000, (GLfloat) - 0.333061, + (GLfloat) - 0.273122, (GLfloat) 0.333061, (GLfloat) - 0.660000, + (GLfloat) - 0.273122, (GLfloat) 0.403061, (GLfloat) - 0.660000, + (GLfloat) - 0.273122, (GLfloat) - 0.660000, (GLfloat) - 0.403061, +}; + +static GLfloat ElbowBolts_normals[] = +{ + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.500000, (GLfloat) 0.866026, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.499999, (GLfloat) 0.866026, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866026, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866026, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866026, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866026, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) - 0.499999, (GLfloat) - 0.866026, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866026, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866026, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) - 0.000000, (GLfloat) 1.000000, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) - 0.866026, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.866025, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.866025, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.866025, (GLfloat) 0.000000, + (GLfloat) 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866026, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) 0.000000, + (GLfloat) 0.499999, (GLfloat) 0.000000, (GLfloat) - 0.866026, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866026, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866026, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866026, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866026, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.499999, (GLfloat) 0.000000, (GLfloat) 0.866026, + (GLfloat) - 1.000000, (GLfloat) - 0.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866026, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866026, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) 0.000000, + (GLfloat) 1.000000, (GLfloat) 0.000000, (GLfloat) - 0.000000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866026, + (GLfloat) - 0.500000, (GLfloat) 0.000000, (GLfloat) 0.866025, + (GLfloat) - 1.000000, (GLfloat) 0.000000, (GLfloat) 0.000000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.866025, + (GLfloat) 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, +}; + +static unsigned short int ElbowBolts_POLS[] = +{ + 6, 241, 242, 245, 246, 248, 251, 1, 4, 253, 254, 242, 241, 1, 4, 254, 257, 245, 242, 1, + 4, 257, 258, 246, 245, 1, 4, 258, 260, 248, 246, 1, 4, 260, 262, 251, 248, 1, 4, 262, + 253, 241, 251, 1, 6, 253, 262, 260, 258, 257, 254, 1, 6, 264, 267, 268, 271, 273, 275, 1, + 4, 277, 279, 267, 264, 1, 4, 279, 281, 268, 267, 1, 4, 281, 283, 271, 268, 1, 4, 283, + 285, 273, 271, 1, 4, 285, 286, 275, 273, 1, 4, 286, 277, 264, 275, 1, 6, 277, 286, 285, + 283, 281, 279, 1, 6, 193, 194, 196, 199, 201, 202, 1, 4, 205, 206, 194, 193, 1, 4, 206, + 208, 196, 194, 1, 4, 208, 210, 199, 196, 1, 4, 210, 213, 201, 199, 1, 4, 213, 214, 202, + 201, 1, 4, 214, 205, 193, 202, 1, 6, 205, 214, 213, 210, 208, 206, 1, 6, 216, 219, 221, + 223, 225, 227, 1, 4, 229, 231, 219, 216, 1, 4, 231, 232, 221, 219, 1, 4, 232, 235, 223, + 221, 1, 4, 235, 236, 225, 223, 1, 4, 236, 239, 227, 225, 1, 4, 239, 229, 216, 227, 1, + 6, 229, 239, 236, 235, 232, 231, 1, 6, 145, 147, 148, 150, 152, 155, 1, 4, 157, 158, 147, + 145, 1, 4, 158, 161, 148, 147, 1, 4, 161, 162, 150, 148, 1, 4, 162, 165, 152, 150, 1, + 4, 165, 167, 155, 152, 1, 4, 167, 157, 145, 155, 1, 6, 157, 167, 165, 162, 161, 158, 1, + 6, 169, 171, 173, 174, 177, 178, 1, 4, 181, 182, 171, 169, 1, 4, 182, 184, 173, 171, 1, + 4, 184, 187, 174, 173, 1, 4, 187, 189, 177, 174, 1, 4, 189, 190, 178, 177, 1, 4, 190, + 181, 169, 178, 1, 6, 181, 190, 189, 187, 184, 182, 1, 6, 96, 98, 101, 103, 105, 106, 1, + 4, 109, 110, 98, 96, 1, 4, 110, 112, 101, 98, 1, 4, 112, 114, 103, 101, 1, 4, 114, + 116, 105, 103, 1, 4, 116, 118, 106, 105, 1, 4, 118, 109, 96, 106, 1, 6, 109, 118, 116, + 114, 112, 110, 1, 6, 120, 122, 125, 126, 128, 131, 1, 4, 133, 134, 122, 120, 1, 4, 134, + 136, 125, 122, 1, 4, 136, 139, 126, 125, 1, 4, 139, 141, 128, 126, 1, 4, 141, 143, 131, + 128, 1, 4, 143, 133, 120, 131, 1, 6, 133, 143, 141, 139, 136, 134, 1, 6, 48, 50, 53, + 54, 56, 58, 1, 4, 61, 62, 50, 48, 1, 4, 62, 64, 53, 50, 1, 4, 64, 67, 54, + 53, 1, 4, 67, 68, 56, 54, 1, 4, 68, 70, 58, 56, 1, 4, 70, 61, 48, 58, 1, + 6, 61, 70, 68, 67, 64, 62, 1, 6, 72, 75, 77, 78, 80, 83, 1, 4, 85, 87, 75, + 72, 1, 4, 87, 88, 77, 75, 1, 4, 88, 91, 78, 77, 1, 4, 91, 92, 80, 78, 1, + 4, 92, 95, 83, 80, 1, 4, 95, 85, 72, 83, 1, 6, 85, 95, 92, 91, 88, 87, 1, + 6, 24, 26, 28, 30, 32, 35, 1, 4, 36, 39, 26, 24, 1, 4, 39, 40, 28, 26, 1, + 4, 40, 42, 30, 28, 1, 4, 42, 44, 32, 30, 1, 4, 44, 47, 35, 32, 1, 4, 47, + 36, 24, 35, 1, 6, 36, 47, 44, 42, 40, 39, 1, 6, 1, 2, 4, 6, 8, 11, 1, + 4, 13, 15, 2, 1, 1, 4, 15, 16, 4, 2, 1, 4, 16, 19, 6, 4, 1, 4, 19, + 20, 8, 6, 1, 4, 20, 23, 11, 8, 1, 4, 23, 13, 1, 11, 1, 6, 13, 23, 20, + 19, 16, 15, 1, 6, 240, 243, 244, 247, 249, 250, 1, 4, 252, 255, 243, 240, 1, 4, 255, + 256, 244, 243, 1, 4, 256, 259, 247, 244, 1, 4, 259, 261, 249, 247, 1, 4, 261, 263, 250, + 249, 1, 4, 263, 252, 240, 250, 1, 6, 252, 263, 261, 259, 256, 255, 1, 6, 265, 266, 269, + 270, 272, 274, 1, 4, 276, 278, 266, 265, 1, 4, 278, 280, 269, 266, 1, 4, 280, 282, 270, + 269, 1, 4, 282, 284, 272, 270, 1, 4, 284, 287, 274, 272, 1, 4, 287, 276, 265, 274, 1, + 6, 276, 287, 284, 282, 280, 278, 1, 6, 192, 195, 197, 198, 200, 203, 1, 4, 204, 207, 195, + 192, 1, 4, 207, 209, 197, 195, 1, 4, 209, 211, 198, 197, 1, 4, 211, 212, 200, 198, 1, + 4, 212, 215, 203, 200, 1, 4, 215, 204, 192, 203, 1, 6, 204, 215, 212, 211, 209, 207, 1, + 6, 217, 218, 220, 222, 224, 226, 1, 4, 228, 230, 218, 217, 1, 4, 230, 233, 220, 218, 1, + 4, 233, 234, 222, 220, 1, 4, 234, 237, 224, 222, 1, 4, 237, 238, 226, 224, 1, 4, 238, + 228, 217, 226, 1, 6, 228, 238, 237, 234, 233, 230, 1, 6, 144, 146, 149, 151, 153, 154, 1, + 4, 156, 159, 146, 144, 1, 4, 159, 160, 149, 146, 1, 4, 160, 163, 151, 149, 1, 4, 163, + 164, 153, 151, 1, 4, 164, 166, 154, 153, 1, 4, 166, 156, 144, 154, 1, 6, 156, 166, 164, + 163, 160, 159, 1, 6, 168, 170, 172, 175, 176, 179, 1, 4, 180, 183, 170, 168, 1, 4, 183, + 185, 172, 170, 1, 4, 185, 186, 175, 172, 1, 4, 186, 188, 176, 175, 1, 4, 188, 191, 179, + 176, 1, 4, 191, 180, 168, 179, 1, 6, 180, 191, 188, 186, 185, 183, 1, 6, 97, 99, 100, + 102, 104, 107, 1, 4, 108, 111, 99, 97, 1, 4, 111, 113, 100, 99, 1, 4, 113, 115, 102, + 100, 1, 4, 115, 117, 104, 102, 1, 4, 117, 119, 107, 104, 1, 4, 119, 108, 97, 107, 1, + 6, 108, 119, 117, 115, 113, 111, 1, 6, 121, 123, 124, 127, 129, 130, 1, 4, 132, 135, 123, + 121, 1, 4, 135, 137, 124, 123, 1, 4, 137, 138, 127, 124, 1, 4, 138, 140, 129, 127, 1, + 4, 140, 142, 130, 129, 1, 4, 142, 132, 121, 130, 1, 6, 132, 142, 140, 138, 137, 135, 1, + 6, 49, 51, 52, 55, 57, 59, 1, 4, 60, 63, 51, 49, 1, 4, 63, 65, 52, 51, 1, + 4, 65, 66, 55, 52, 1, 4, 66, 69, 57, 55, 1, 4, 69, 71, 59, 57, 1, 4, 71, + 60, 49, 59, 1, 6, 60, 71, 69, 66, 65, 63, 1, 6, 73, 74, 76, 79, 81, 82, 1, + 4, 84, 86, 74, 73, 1, 4, 86, 89, 76, 74, 1, 4, 89, 90, 79, 76, 1, 4, 90, + 93, 81, 79, 1, 4, 93, 94, 82, 81, 1, 4, 94, 84, 73, 82, 1, 6, 84, 94, 93, + 90, 89, 86, 1, 6, 25, 27, 29, 31, 33, 34, 1, 4, 37, 38, 27, 25, 1, 4, 38, + 41, 29, 27, 1, 4, 41, 43, 31, 29, 1, 4, 43, 45, 33, 31, 1, 4, 45, 46, 34, + 33, 1, 4, 46, 37, 25, 34, 1, 6, 37, 46, 45, 43, 41, 38, 1, 6, 0, 3, 5, + 7, 9, 10, 1, 4, 12, 14, 3, 0, 1, 4, 14, 17, 5, 3, 1, 4, 17, 18, 7, + 5, 1, 4, 18, 21, 9, 7, 1, 4, 21, 22, 10, 9, 1, 4, 22, 12, 0, 10, 1, + 6, 12, 22, 21, 18, 17, 14, 1, + 0 +}; + +struct lwo LWO_ElbowBolts = +{ + 288, /* number of points */ + ElbowBolts_PNTS, ElbowBolts_normals, ElbowBolts_POLS, 0L +}; + +static GLfloat ElbowCoins_PNTS[] = +{ + (GLfloat) 0.000000, (GLfloat) - 0.520000, (GLfloat) - 0.500000, + (GLfloat) 0.097545, (GLfloat) - 0.520000, (GLfloat) - 0.490393, + (GLfloat) 0.191342, (GLfloat) - 0.520000, (GLfloat) - 0.461940, + (GLfloat) 0.277785, (GLfloat) - 0.520000, (GLfloat) - 0.415735, + (GLfloat) 0.353553, (GLfloat) - 0.520000, (GLfloat) - 0.353553, + (GLfloat) 0.415735, (GLfloat) - 0.520000, (GLfloat) - 0.277785, + (GLfloat) 0.461940, (GLfloat) - 0.520000, (GLfloat) - 0.191342, + (GLfloat) 0.490393, (GLfloat) - 0.520000, (GLfloat) - 0.097545, + (GLfloat) 0.500000, (GLfloat) - 0.520000, (GLfloat) - 0.000000, + (GLfloat) 0.490393, (GLfloat) - 0.520000, (GLfloat) 0.097545, + (GLfloat) 0.461940, (GLfloat) - 0.520000, (GLfloat) 0.191342, + (GLfloat) 0.415735, (GLfloat) - 0.520000, (GLfloat) 0.277785, + (GLfloat) 0.353553, (GLfloat) - 0.520000, (GLfloat) 0.353553, + (GLfloat) 0.277785, (GLfloat) - 0.520000, (GLfloat) 0.415735, + (GLfloat) 0.191342, (GLfloat) - 0.520000, (GLfloat) 0.461940, + (GLfloat) 0.097545, (GLfloat) - 0.520000, (GLfloat) 0.490393, + (GLfloat) 0.000000, (GLfloat) - 0.520000, (GLfloat) 0.500000, + (GLfloat) - 0.097545, (GLfloat) - 0.520000, (GLfloat) 0.490393, + (GLfloat) - 0.191342, (GLfloat) - 0.520000, (GLfloat) 0.461940, + (GLfloat) - 0.277785, (GLfloat) - 0.520000, (GLfloat) 0.415735, + (GLfloat) - 0.353553, (GLfloat) - 0.520000, (GLfloat) 0.353553, + (GLfloat) - 0.415735, (GLfloat) - 0.520000, (GLfloat) 0.277785, + (GLfloat) - 0.461940, (GLfloat) - 0.520000, (GLfloat) 0.191342, + (GLfloat) - 0.490393, (GLfloat) - 0.520000, (GLfloat) 0.097545, + (GLfloat) - 0.500000, (GLfloat) - 0.520000, (GLfloat) 0.000000, + (GLfloat) - 0.490393, (GLfloat) - 0.520000, (GLfloat) - 0.097545, + (GLfloat) - 0.461940, (GLfloat) - 0.520000, (GLfloat) - 0.191342, + (GLfloat) - 0.415735, (GLfloat) - 0.520000, (GLfloat) - 0.277785, + (GLfloat) - 0.353553, (GLfloat) - 0.520000, (GLfloat) - 0.353553, + (GLfloat) - 0.277785, (GLfloat) - 0.520000, (GLfloat) - 0.415735, + (GLfloat) - 0.191342, (GLfloat) - 0.520000, (GLfloat) - 0.461940, + (GLfloat) - 0.097545, (GLfloat) - 0.520000, (GLfloat) - 0.490393, + (GLfloat) 0.000000, (GLfloat) - 0.600000, (GLfloat) - 0.500000, + (GLfloat) 0.097545, (GLfloat) - 0.600000, (GLfloat) - 0.490393, + (GLfloat) 0.191342, (GLfloat) - 0.600000, (GLfloat) - 0.461940, + (GLfloat) 0.277785, (GLfloat) - 0.600000, (GLfloat) - 0.415735, + (GLfloat) 0.353553, (GLfloat) - 0.600000, (GLfloat) - 0.353553, + (GLfloat) 0.415735, (GLfloat) - 0.600000, (GLfloat) - 0.277785, + (GLfloat) 0.461940, (GLfloat) - 0.600000, (GLfloat) - 0.191342, + (GLfloat) 0.490393, (GLfloat) - 0.600000, (GLfloat) - 0.097545, + (GLfloat) 0.500000, (GLfloat) - 0.600000, (GLfloat) - 0.000000, + (GLfloat) 0.490393, (GLfloat) - 0.600000, (GLfloat) 0.097545, + (GLfloat) 0.461940, (GLfloat) - 0.600000, (GLfloat) 0.191342, + (GLfloat) 0.415735, (GLfloat) - 0.600000, (GLfloat) 0.277785, + (GLfloat) 0.353553, (GLfloat) - 0.600000, (GLfloat) 0.353553, + (GLfloat) 0.277785, (GLfloat) - 0.600000, (GLfloat) 0.415735, + (GLfloat) 0.191342, (GLfloat) - 0.600000, (GLfloat) 0.461940, + (GLfloat) 0.097545, (GLfloat) - 0.600000, (GLfloat) 0.490393, + (GLfloat) 0.000000, (GLfloat) - 0.600000, (GLfloat) 0.500000, + (GLfloat) - 0.097545, (GLfloat) - 0.600000, (GLfloat) 0.490393, + (GLfloat) - 0.191342, (GLfloat) - 0.600000, (GLfloat) 0.461940, + (GLfloat) - 0.277785, (GLfloat) - 0.600000, (GLfloat) 0.415735, + (GLfloat) - 0.353553, (GLfloat) - 0.600000, (GLfloat) 0.353553, + (GLfloat) - 0.415735, (GLfloat) - 0.600000, (GLfloat) 0.277785, + (GLfloat) - 0.461940, (GLfloat) - 0.600000, (GLfloat) 0.191342, + (GLfloat) - 0.490393, (GLfloat) - 0.600000, (GLfloat) 0.097545, + (GLfloat) - 0.500000, (GLfloat) - 0.600000, (GLfloat) 0.000000, + (GLfloat) - 0.490393, (GLfloat) - 0.600000, (GLfloat) - 0.097545, + (GLfloat) - 0.461940, (GLfloat) - 0.600000, (GLfloat) - 0.191342, + (GLfloat) - 0.415735, (GLfloat) - 0.600000, (GLfloat) - 0.277785, + (GLfloat) - 0.353553, (GLfloat) - 0.600000, (GLfloat) - 0.353553, + (GLfloat) - 0.277785, (GLfloat) - 0.600000, (GLfloat) - 0.415735, + (GLfloat) - 0.191342, (GLfloat) - 0.600000, (GLfloat) - 0.461940, + (GLfloat) - 0.097545, (GLfloat) - 0.600000, (GLfloat) - 0.490393, + (GLfloat) 0.000000, (GLfloat) 0.500000, (GLfloat) - 0.520000, + (GLfloat) 0.097545, (GLfloat) 0.490393, (GLfloat) - 0.520000, + (GLfloat) 0.191342, (GLfloat) 0.461940, (GLfloat) - 0.520000, + (GLfloat) 0.277785, (GLfloat) 0.415735, (GLfloat) - 0.520000, + (GLfloat) 0.353553, (GLfloat) 0.353553, (GLfloat) - 0.520000, + (GLfloat) 0.415735, (GLfloat) 0.277785, (GLfloat) - 0.520000, + (GLfloat) 0.461940, (GLfloat) 0.191342, (GLfloat) - 0.520000, + (GLfloat) 0.490393, (GLfloat) 0.097545, (GLfloat) - 0.520000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.520000, + (GLfloat) 0.490393, (GLfloat) - 0.097545, (GLfloat) - 0.520000, + (GLfloat) 0.461940, (GLfloat) - 0.191342, (GLfloat) - 0.520000, + (GLfloat) 0.415735, (GLfloat) - 0.277785, (GLfloat) - 0.520000, + (GLfloat) 0.353553, (GLfloat) - 0.353553, (GLfloat) - 0.520000, + (GLfloat) 0.277785, (GLfloat) - 0.415735, (GLfloat) - 0.520000, + (GLfloat) 0.191342, (GLfloat) - 0.461940, (GLfloat) - 0.520000, + (GLfloat) 0.097545, (GLfloat) - 0.490393, (GLfloat) - 0.520000, + (GLfloat) 0.000000, (GLfloat) - 0.500000, (GLfloat) - 0.520000, + (GLfloat) - 0.097545, (GLfloat) - 0.490393, (GLfloat) - 0.520000, + (GLfloat) - 0.191342, (GLfloat) - 0.461940, (GLfloat) - 0.520000, + (GLfloat) - 0.277785, (GLfloat) - 0.415735, (GLfloat) - 0.520000, + (GLfloat) - 0.353553, (GLfloat) - 0.353553, (GLfloat) - 0.520000, + (GLfloat) - 0.415735, (GLfloat) - 0.277785, (GLfloat) - 0.520000, + (GLfloat) - 0.461940, (GLfloat) - 0.191342, (GLfloat) - 0.520000, + (GLfloat) - 0.490393, (GLfloat) - 0.097545, (GLfloat) - 0.520000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.520000, + (GLfloat) - 0.490393, (GLfloat) 0.097545, (GLfloat) - 0.520000, + (GLfloat) - 0.461940, (GLfloat) 0.191342, (GLfloat) - 0.520000, + (GLfloat) - 0.415735, (GLfloat) 0.277785, (GLfloat) - 0.520000, + (GLfloat) - 0.353553, (GLfloat) 0.353553, (GLfloat) - 0.520000, + (GLfloat) - 0.277785, (GLfloat) 0.415735, (GLfloat) - 0.520000, + (GLfloat) - 0.191342, (GLfloat) 0.461940, (GLfloat) - 0.520000, + (GLfloat) - 0.097545, (GLfloat) 0.490393, (GLfloat) - 0.520000, + (GLfloat) 0.000000, (GLfloat) 0.500000, (GLfloat) - 0.600000, + (GLfloat) 0.097545, (GLfloat) 0.490393, (GLfloat) - 0.600000, + (GLfloat) 0.191342, (GLfloat) 0.461940, (GLfloat) - 0.600000, + (GLfloat) 0.277785, (GLfloat) 0.415735, (GLfloat) - 0.600000, + (GLfloat) 0.353553, (GLfloat) 0.353553, (GLfloat) - 0.600000, + (GLfloat) 0.415735, (GLfloat) 0.277785, (GLfloat) - 0.600000, + (GLfloat) 0.461940, (GLfloat) 0.191342, (GLfloat) - 0.600000, + (GLfloat) 0.490393, (GLfloat) 0.097545, (GLfloat) - 0.600000, + (GLfloat) 0.500000, (GLfloat) 0.000000, (GLfloat) - 0.600000, + (GLfloat) 0.490393, (GLfloat) - 0.097545, (GLfloat) - 0.600000, + (GLfloat) 0.461940, (GLfloat) - 0.191342, (GLfloat) - 0.600000, + (GLfloat) 0.415735, (GLfloat) - 0.277785, (GLfloat) - 0.600000, + (GLfloat) 0.353553, (GLfloat) - 0.353553, (GLfloat) - 0.600000, + (GLfloat) 0.277785, (GLfloat) - 0.415735, (GLfloat) - 0.600000, + (GLfloat) 0.191342, (GLfloat) - 0.461940, (GLfloat) - 0.600000, + (GLfloat) 0.097545, (GLfloat) - 0.490393, (GLfloat) - 0.600000, + (GLfloat) 0.000000, (GLfloat) - 0.500000, (GLfloat) - 0.600000, + (GLfloat) - 0.097545, (GLfloat) - 0.490393, (GLfloat) - 0.600000, + (GLfloat) - 0.191342, (GLfloat) - 0.461940, (GLfloat) - 0.600000, + (GLfloat) - 0.277785, (GLfloat) - 0.415735, (GLfloat) - 0.600000, + (GLfloat) - 0.353553, (GLfloat) - 0.353553, (GLfloat) - 0.600000, + (GLfloat) - 0.415735, (GLfloat) - 0.277785, (GLfloat) - 0.600000, + (GLfloat) - 0.461940, (GLfloat) - 0.191342, (GLfloat) - 0.600000, + (GLfloat) - 0.490393, (GLfloat) - 0.097545, (GLfloat) - 0.600000, + (GLfloat) - 0.500000, (GLfloat) - 0.000000, (GLfloat) - 0.600000, + (GLfloat) - 0.490393, (GLfloat) 0.097545, (GLfloat) - 0.600000, + (GLfloat) - 0.461940, (GLfloat) 0.191342, (GLfloat) - 0.600000, + (GLfloat) - 0.415735, (GLfloat) 0.277785, (GLfloat) - 0.600000, + (GLfloat) - 0.353553, (GLfloat) 0.353553, (GLfloat) - 0.600000, + (GLfloat) - 0.277785, (GLfloat) 0.415735, (GLfloat) - 0.600000, + (GLfloat) - 0.191342, (GLfloat) 0.461940, (GLfloat) - 0.600000, + (GLfloat) - 0.097545, (GLfloat) 0.490393, (GLfloat) - 0.600000, +}; + +static GLfloat ElbowCoins_normals[] = +{ + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) 1.000000, + (GLfloat) 0.098017, (GLfloat) 0.995185, (GLfloat) 0.000000, + (GLfloat) 0.290285, (GLfloat) 0.956940, (GLfloat) 0.000000, + (GLfloat) 0.471397, (GLfloat) 0.881921, (GLfloat) 0.000000, + (GLfloat) 0.634393, (GLfloat) 0.773010, (GLfloat) 0.000000, + (GLfloat) 0.773010, (GLfloat) 0.634393, (GLfloat) 0.000000, + (GLfloat) 0.881921, (GLfloat) 0.471397, (GLfloat) 0.000000, + (GLfloat) 0.956940, (GLfloat) 0.290285, (GLfloat) 0.000000, + (GLfloat) 0.995185, (GLfloat) 0.098017, (GLfloat) 0.000000, + (GLfloat) 0.995185, (GLfloat) - 0.098017, (GLfloat) - 0.000000, + (GLfloat) 0.956940, (GLfloat) - 0.290285, (GLfloat) - 0.000000, + (GLfloat) 0.881921, (GLfloat) - 0.471397, (GLfloat) - 0.000000, + (GLfloat) 0.773010, (GLfloat) - 0.634393, (GLfloat) - 0.000000, + (GLfloat) 0.634393, (GLfloat) - 0.773010, (GLfloat) - 0.000000, + (GLfloat) 0.471397, (GLfloat) - 0.881921, (GLfloat) - 0.000000, + (GLfloat) 0.290285, (GLfloat) - 0.956940, (GLfloat) - 0.000000, + (GLfloat) 0.098017, (GLfloat) - 0.995185, (GLfloat) - 0.000000, + (GLfloat) - 0.098017, (GLfloat) - 0.995185, (GLfloat) - 0.000000, + (GLfloat) - 0.290285, (GLfloat) - 0.956940, (GLfloat) - 0.000000, + (GLfloat) - 0.471397, (GLfloat) - 0.881921, (GLfloat) - 0.000000, + (GLfloat) - 0.634393, (GLfloat) - 0.773010, (GLfloat) - 0.000000, + (GLfloat) - 0.773010, (GLfloat) - 0.634393, (GLfloat) - 0.000000, + (GLfloat) - 0.881921, (GLfloat) - 0.471397, (GLfloat) - 0.000000, + (GLfloat) - 0.956940, (GLfloat) - 0.290285, (GLfloat) - 0.000000, + (GLfloat) - 0.995185, (GLfloat) - 0.098017, (GLfloat) - 0.000000, + (GLfloat) - 0.995185, (GLfloat) 0.098017, (GLfloat) - 0.000000, + (GLfloat) - 0.956940, (GLfloat) 0.290285, (GLfloat) - 0.000000, + (GLfloat) - 0.881921, (GLfloat) 0.471397, (GLfloat) - 0.000000, + (GLfloat) - 0.773010, (GLfloat) 0.634393, (GLfloat) - 0.000000, + (GLfloat) - 0.634393, (GLfloat) 0.773010, (GLfloat) - 0.000000, + (GLfloat) - 0.471397, (GLfloat) 0.881921, (GLfloat) - 0.000000, + (GLfloat) - 0.290285, (GLfloat) 0.956940, (GLfloat) - 0.000000, + (GLfloat) - 0.098017, (GLfloat) 0.995185, (GLfloat) - 0.000000, + (GLfloat) - 0.000000, (GLfloat) 0.000000, (GLfloat) - 1.000000, + (GLfloat) - 0.000000, (GLfloat) 1.000000, (GLfloat) - 0.000000, + (GLfloat) 0.098017, (GLfloat) 0.000000, (GLfloat) - 0.995185, + (GLfloat) 0.290285, (GLfloat) 0.000000, (GLfloat) - 0.956940, + (GLfloat) 0.471397, (GLfloat) 0.000000, (GLfloat) - 0.881921, + (GLfloat) 0.634393, (GLfloat) 0.000000, (GLfloat) - 0.773010, + (GLfloat) 0.773010, (GLfloat) 0.000000, (GLfloat) - 0.634393, + (GLfloat) 0.881921, (GLfloat) 0.000000, (GLfloat) - 0.471397, + (GLfloat) 0.956940, (GLfloat) 0.000000, (GLfloat) - 0.290285, + (GLfloat) 0.995185, (GLfloat) 0.000000, (GLfloat) - 0.098017, + (GLfloat) 0.995185, (GLfloat) 0.000000, (GLfloat) 0.098017, + (GLfloat) 0.956940, (GLfloat) 0.000000, (GLfloat) 0.290285, + (GLfloat) 0.881921, (GLfloat) 0.000000, (GLfloat) 0.471397, + (GLfloat) 0.773010, (GLfloat) 0.000000, (GLfloat) 0.634393, + (GLfloat) 0.634393, (GLfloat) 0.000000, (GLfloat) 0.773010, + (GLfloat) 0.471397, (GLfloat) 0.000000, (GLfloat) 0.881921, + (GLfloat) 0.290285, (GLfloat) 0.000000, (GLfloat) 0.956940, + (GLfloat) 0.098017, (GLfloat) 0.000000, (GLfloat) 0.995185, + (GLfloat) - 0.098017, (GLfloat) 0.000000, (GLfloat) 0.995185, + (GLfloat) - 0.290285, (GLfloat) 0.000000, (GLfloat) 0.956940, + (GLfloat) - 0.471397, (GLfloat) 0.000000, (GLfloat) 0.881921, + (GLfloat) - 0.634393, (GLfloat) 0.000000, (GLfloat) 0.773010, + (GLfloat) - 0.773010, (GLfloat) 0.000000, (GLfloat) 0.634393, + (GLfloat) - 0.881921, (GLfloat) 0.000000, (GLfloat) 0.471397, + (GLfloat) - 0.956940, (GLfloat) 0.000000, (GLfloat) 0.290285, + (GLfloat) - 0.995185, (GLfloat) - 0.000000, (GLfloat) 0.098017, + (GLfloat) - 0.995185, (GLfloat) - 0.000000, (GLfloat) - 0.098017, + (GLfloat) - 0.956940, (GLfloat) - 0.000000, (GLfloat) - 0.290285, + (GLfloat) - 0.881921, (GLfloat) - 0.000000, (GLfloat) - 0.471397, + (GLfloat) - 0.773010, (GLfloat) - 0.000000, (GLfloat) - 0.634393, + (GLfloat) - 0.634393, (GLfloat) - 0.000000, (GLfloat) - 0.773010, + (GLfloat) - 0.471397, (GLfloat) - 0.000000, (GLfloat) - 0.881921, + (GLfloat) - 0.290285, (GLfloat) - 0.000000, (GLfloat) - 0.956940, + (GLfloat) - 0.098017, (GLfloat) - 0.000000, (GLfloat) - 0.995185, + (GLfloat) - 0.000000, (GLfloat) - 1.000000, (GLfloat) - 0.000000, +}; + +static unsigned short int ElbowCoins_POLS[] = +{ + 32, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 1, 4, 96, 97, 65, 64, 1, + 4, 97, 98, 66, 65, 1, 4, 98, 99, 67, 66, 1, 4, 99, 100, 68, 67, 1, 4, 100, + 101, 69, 68, 1, 4, 101, 102, 70, 69, 1, 4, 102, 103, 71, 70, 1, 4, 103, 104, 72, +71, 1, 4, 104, 105, 73, 72, 1, 4, 105, 106, 74, 73, 1, 4, 106, 107, 75, 74, 1, + 4, 107, 108, 76, 75, 1, 4, 108, 109, 77, 76, 1, 4, 109, 110, 78, 77, 1, 4, 110, + 111, 79, 78, 1, 4, 111, 112, 80, 79, 1, 4, 112, 113, 81, 80, 1, 4, 113, 114, 82, +81, 1, 4, 114, 115, 83, 82, 1, 4, 115, 116, 84, 83, 1, 4, 116, 117, 85, 84, 1, + 4, 117, 118, 86, 85, 1, 4, 118, 119, 87, 86, 1, 4, 119, 120, 88, 87, 1, 4, 120, + 121, 89, 88, 1, 4, 121, 122, 90, 89, 1, 4, 122, 123, 91, 90, 1, 4, 123, 124, 92, +91, 1, 4, 124, 125, 93, 92, 1, 4, 125, 126, 94, 93, 1, 4, 126, 127, 95, 94, 1, + 4, 127, 96, 64, 95, 1, 32, 96, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, + 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 1, + 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1, 4, 32, 33, 1, 0, 1, + 4, 33, 34, 2, 1, 1, 4, 34, 35, 3, 2, 1, 4, 35, 36, 4, 3, 1, 4, 36, + 37, 5, 4, 1, 4, 37, 38, 6, 5, 1, 4, 38, 39, 7, 6, 1, 4, 39, 40, 8, + 7, 1, 4, 40, 41, 9, 8, 1, 4, 41, 42, 10, 9, 1, 4, 42, 43, 11, 10, 1, + 4, 43, 44, 12, 11, 1, 4, 44, 45, 13, 12, 1, 4, 45, 46, 14, 13, 1, 4, 46, + 47, 15, 14, 1, 4, 47, 48, 16, 15, 1, 4, 48, 49, 17, 16, 1, 4, 49, 50, 18, + 17, 1, 4, 50, 51, 19, 18, 1, 4, 51, 52, 20, 19, 1, 4, 52, 53, 21, 20, 1, + 4, 53, 54, 22, 21, 1, 4, 54, 55, 23, 22, 1, 4, 55, 56, 24, 23, 1, 4, 56, + 57, 25, 24, 1, 4, 57, 58, 26, 25, 1, 4, 58, 59, 27, 26, 1, 4, 59, 60, 28, + 27, 1, 4, 60, 61, 29, 28, 1, 4, 61, 62, 30, 29, 1, 4, 62, 63, 31, 30, 1, + 4, 63, 32, 0, 31, 1, 32, 32, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, +51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 1, + 0 +}; + +struct lwo LWO_ElbowCoins = +{ + 128, /* number of points */ + ElbowCoins_PNTS, ElbowCoins_normals, ElbowCoins_POLS, 0L +}; + +#endif /* USE_GL */ + +/* End of pipeobjs.c */ diff --git a/hacks/glx/pipes.c b/hacks/glx/pipes.c new file mode 100644 index 00000000..c6f35d90 --- /dev/null +++ b/hacks/glx/pipes.c @@ -0,0 +1,1008 @@ +/* -*- Mode: C; tab-width: 4 -*- + * pipes.c - Shows 3D selfbuiding pipe system (xlock Version) + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)pipes.c 4.04 97/07/28 xlockmore"; +#endif +/* 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. + * + * This program was inspired on a WindowsNT(R)'s screen saver. It was written + * from scratch and it was not based on any other source code. + * + * ========================================================================== + * The routine myElbow is derivated from the doughnut routine from the MesaGL + * library (more especifically the Mesaaux library) written by Brian Paul. + * ========================================================================== + * + * Thanks goes 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 + * mistake. + * + * My e-mail addresses are + * + * vianna@cat.cbpf.br + * and + * marcelo@venus.rdc.puc-rio.br + * + * Marcelo F. Vianna (Apr-09-1997) + * + * Revision History: + * 29-Apr-97: Factory equipment by Ed Mackey. Productive day today, eh? + * 29-Apr-97: Less tight turns Jeff Epler + * 29-Apr-97: Efficiency speed-ups by Marcelo F. Vianna + */ + +/*- + * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock. + * otherwise caddr_t is not defined correctly + */ + +#include + +#ifdef STANDALONE +# define PROGCLASS "Pipes" +# define HACK_INIT init_pipes +# define HACK_DRAW draw_pipes +# define pipes_opts xlockmore_opts +# define DEFAULTS "*count: 2 \n" \ + "*cycles: 5 \n" \ + "*size: 500 \n" \ + "*delay: 100 \n" \ + "*fisheye: True \n" \ + "*tightturns: False \n" \ + "*rotatepipes: True \n" \ + "*noBuffer: True \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +#include +#include "buildlwo.h" + +#define DEF_FACTORY "2" +#define DEF_FISHEYE "True" +#define DEF_TIGHTTURNS "False" +#define DEF_ROTATEPIPES "True" +#define NofSysTypes 3 + +static int factory; +static Bool fisheye, tightturns, rotatepipes; + +static XrmOptionDescRec opts[] = +{ + {"-factory", ".pipes.factory", XrmoptionSepArg, (caddr_t) NULL}, + {"-fisheye", ".pipes.fisheye", XrmoptionNoArg, (caddr_t) "on"}, + {"+fisheye", ".pipes.fisheye", XrmoptionNoArg, (caddr_t) "off"}, + {"-tightturns", ".pipes.tightturns", XrmoptionNoArg, (caddr_t) "on"}, + {"+tightturns", ".pipes.tightturns", XrmoptionNoArg, (caddr_t) "off"}, + {"-rotatepipes", ".pipes.rotatepipes", XrmoptionNoArg, (caddr_t) "on"}, + {"+rotatepipes", ".pipes.rotatepipes", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & factory, "factory", "Factory", DEF_FACTORY, t_Int}, + {(caddr_t *) & fisheye, "fisheye", "Fisheye", DEF_FISHEYE, t_Bool}, + {(caddr_t *) & tightturns, "tightturns", "Tightturns", DEF_TIGHTTURNS, t_Bool}, + {(caddr_t *) & rotatepipes, "rotatepipes", "Rotatepipes", DEF_ROTATEPIPES, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-factory num", "how much extra equipment in pipes (0 for none)"}, + {"-/+fisheye", "turn on/off zoomed-in view of pipes"}, + {"-/+tightturns", "turn on/off tight turns"}, + {"-/+rotatepipes", "turn on/off pipe system rotation per screenful"} +}; + +ModeSpecOpt pipes_opts = +{7, opts, 4, vars, desc}; + +#define Scale4Window 0.1 +#define Scale4Iconic 0.07 + +#define one_third 0.3333333333333333333 + +#define dirNone -1 +#define dirUP 0 +#define dirDOWN 1 +#define dirLEFT 2 +#define dirRIGHT 3 +#define dirNEAR 4 +#define dirFAR 5 + +#define HCELLS 33 +#define VCELLS 25 +#define DEFINEDCOLORS 7 +#define elbowradius 0.5 + +/*************************************************************************/ + +typedef struct { +#if defined( MESA ) && defined( SLOW ) + int flip; +#endif + GLint WindH, WindW; + int Cells[HCELLS][VCELLS][HCELLS]; + int usedcolors[DEFINEDCOLORS]; + int directions[6]; + int ndirections; + int nowdir, olddir; + int system_number; + int counter; + int PX, PY, PZ; + int number_of_systems; + int system_type; + int system_length; + int turncounter; + float *system_color; + GLfloat initial_rotation; + GLuint valve, bolts, betweenbolts, elbowbolts, elbowcoins; + GLuint guagehead, guageface, guagedial, guageconnector; + GLXContext glx_context; +} pipesstruct; + +extern struct lwo LWO_BigValve, LWO_PipeBetweenBolts, LWO_Bolts3D; +extern struct lwo LWO_GuageHead, LWO_GuageFace, LWO_GuageDial, LWO_GuageConnector; +extern struct lwo LWO_ElbowBolts, LWO_ElbowCoins; + +static float front_shininess[] = +{60.0}; +static float front_specular[] = +{0.7, 0.7, 0.7, 1.0}; +static float ambient0[] = +{0.4, 0.4, 0.4, 1.0}; +static float diffuse0[] = +{1.0, 1.0, 1.0, 1.0}; +static float ambient1[] = +{0.2, 0.2, 0.2, 1.0}; +static float diffuse1[] = +{0.5, 0.5, 0.5, 1.0}; +static float position0[] = +{1.0, 1.0, 1.0, 0.0}; +static float position1[] = +{-1.0, -1.0, 1.0, 0.0}; +static float lmodel_ambient[] = +{0.5, 0.5, 0.5, 1.0}; +static float lmodel_twoside[] = +{GL_TRUE}; + +static float MaterialRed[] = +{0.7, 0.0, 0.0, 1.0}; +static float MaterialGreen[] = +{0.1, 0.5, 0.2, 1.0}; +static float MaterialBlue[] = +{0.0, 0.0, 0.7, 1.0}; +static float MaterialCyan[] = +{0.2, 0.5, 0.7, 1.0}; +static float MaterialYellow[] = +{0.7, 0.7, 0.0, 1.0}; +static float MaterialMagenta[] = +{0.6, 0.2, 0.5, 1.0}; +static float MaterialWhite[] = +{0.7, 0.7, 0.7, 1.0}; +static float MaterialGray[] = +{0.2, 0.2, 0.2, 1.0}; + +static pipesstruct *pipes = NULL; + + +static void +MakeTube(int direction) +{ + float an; + float SINan_3, COSan_3; + + /*dirUP = 00000000 */ + /*dirDOWN = 00000001 */ + /*dirLEFT = 00000010 */ + /*dirRIGHT = 00000011 */ + /*dirNEAR = 00000100 */ + /*dirFAR = 00000101 */ + + glRotatef(90.0, (direction & 6) ? 0.0 : 1.0, (direction & 2) ? 1.0 : 0.0, 0.0); + + glBegin(GL_QUAD_STRIP); + for (an = 0.0; an <= 2.0 * M_PI; an += M_PI / 12.0) { + glNormal3f((COSan_3 = cos(an) / 3.0), (SINan_3 = sin(an) / 3.0), 0.0); + glVertex3f(COSan_3, SINan_3, one_third); + glVertex3f(COSan_3, SINan_3, -one_third); + } + glEnd(); +} + +static void +mySphere(float radius) +{ + GLUquadricObj *quadObj; + + quadObj = gluNewQuadric(); + gluQuadricDrawStyle(quadObj, (GLenum) GLU_FILL); + gluSphere(quadObj, radius, 16, 16); + gluDeleteQuadric(quadObj); +} + +static void +myElbow(ModeInfo * mi, int bolted) +{ +#define nsides 25 +#define rings 25 +#define r one_third +#define R one_third + + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + int i, j; + GLfloat p0[3], p1[3], p2[3], p3[3]; + GLfloat n0[3], n1[3], n2[3], n3[3]; + GLfloat COSphi, COSphi1, COStheta, COStheta1; + GLfloat _SINtheta, _SINtheta1; + + for (i = 0; i <= rings / 4; i++) { + GLfloat theta, theta1; + + theta = (GLfloat) i *2.0 * M_PI / rings; + + theta1 = (GLfloat) (i + 1) * 2.0 * M_PI / rings; + for (j = 0; j < nsides; j++) { + GLfloat phi, phi1; + + phi = (GLfloat) j *2.0 * M_PI / nsides; + + phi1 = (GLfloat) (j + 1) * 2.0 * M_PI / nsides; + + p0[0] = (COStheta = cos(theta)) * (R + r * (COSphi = cos(phi))); + p0[1] = (_SINtheta = -sin(theta)) * (R + r * COSphi); + + p1[0] = (COStheta1 = cos(theta1)) * (R + r * COSphi); + p1[1] = (_SINtheta1 = -sin(theta1)) * (R + r * COSphi); + + p2[0] = COStheta1 * (R + r * (COSphi1 = cos(phi1))); + p2[1] = _SINtheta1 * (R + r * COSphi1); + + p3[0] = COStheta * (R + r * COSphi1); + p3[1] = _SINtheta * (R + r * COSphi1); + + n0[0] = COStheta * COSphi; + n0[1] = _SINtheta * COSphi; + + n1[0] = COStheta1 * COSphi; + n1[1] = _SINtheta1 * COSphi; + + n2[0] = COStheta1 * COSphi1; + n2[1] = _SINtheta1 * COSphi1; + + n3[0] = COStheta * COSphi1; + n3[1] = _SINtheta * COSphi1; + + p0[2] = p1[2] = r * (n0[2] = n1[2] = sin(phi)); + p2[2] = p3[2] = r * (n2[2] = n3[2] = sin(phi1)); + + glBegin(GL_QUADS); + glNormal3fv(n3); + glVertex3fv(p3); + glNormal3fv(n2); + glVertex3fv(p2); + glNormal3fv(n1); + glVertex3fv(p1); + glNormal3fv(n0); + glVertex3fv(p0); + glEnd(); + } + } + + if (factory > 0 && bolted) { + /* Bolt the elbow onto the pipe system */ + glFrontFace(GL_CW); + glPushMatrix(); + glRotatef(90.0, 0.0, 0.0, -1.0); + glRotatef(90.0, 0.0, 1.0, 0.0); + glTranslatef(0.0, one_third, one_third); + glCallList(pp->elbowcoins); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + glCallList(pp->elbowbolts); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, pp->system_color); + glPopMatrix(); + glFrontFace(GL_CCW); + } +#undef r +#undef R +#undef nsides +#undef rings +} + +static void +FindNeighbors(ModeInfo * mi) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + pp->ndirections = 0; + pp->directions[dirUP] = (!pp->Cells[pp->PX][pp->PY + 1][pp->PZ]) ? 1 : 0; + pp->ndirections += pp->directions[dirUP]; + pp->directions[dirDOWN] = (!pp->Cells[pp->PX][pp->PY - 1][pp->PZ]) ? 1 : 0; + pp->ndirections += pp->directions[dirDOWN]; + pp->directions[dirLEFT] = (!pp->Cells[pp->PX - 1][pp->PY][pp->PZ]) ? 1 : 0; + pp->ndirections += pp->directions[dirLEFT]; + pp->directions[dirRIGHT] = (!pp->Cells[pp->PX + 1][pp->PY][pp->PZ]) ? 1 : 0; + pp->ndirections += pp->directions[dirRIGHT]; + pp->directions[dirFAR] = (!pp->Cells[pp->PX][pp->PY][pp->PZ - 1]) ? 1 : 0; + pp->ndirections += pp->directions[dirFAR]; + pp->directions[dirNEAR] = (!pp->Cells[pp->PX][pp->PY][pp->PZ + 1]) ? 1 : 0; + pp->ndirections += pp->directions[dirNEAR]; +} + +static int +SelectNeighbor(ModeInfo * mi) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + int dirlist[6]; + int i, j; + + for (i = 0, j = 0; i < 6; i++) { + if (pp->directions[i]) { + dirlist[j] = i; + j++; + } + } + + return dirlist[NRAND(pp->ndirections)]; +} + +static void +MakeValve(ModeInfo * mi, int newdir) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + /* There is a glPopMatrix() right after this subroutine returns. */ + switch (newdir) { + case dirUP: + case dirDOWN: + glRotatef(90.0, 1.0, 0.0, 0.0); + glRotatef(NRAND(3) * 90.0, 0.0, 0.0, 1.0); + break; + case dirLEFT: + case dirRIGHT: + glRotatef(90.0, 0.0, -1.0, 0.0); + glRotatef((NRAND(3) * 90.0) - 90.0, 0.0, 0.0, 1.0); + break; + case dirNEAR: + case dirFAR: + glRotatef(NRAND(4) * 90.0, 0.0, 0.0, 1.0); + break; + } + glFrontFace(GL_CW); + glCallList(pp->betweenbolts); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + glCallList(pp->bolts); + if (!MI_WIN_IS_MONO(mi)) { + if (pp->system_color == MaterialRed) { + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, NRAND(2) ? MaterialYellow : MaterialBlue); + } else if (pp->system_color == MaterialBlue) { + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, NRAND(2) ? MaterialRed : MaterialYellow); + } else if (pp->system_color == MaterialYellow) { + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, NRAND(2) ? MaterialBlue : MaterialRed); + } else { + switch ((NRAND(3))) { + case 0: + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed); + break; + case 1: + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialBlue); + break; + case 2: + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialYellow); + } + } + } + glRotatef((GLfloat) (NRAND(90)), 1.0, 0.0, 0.0); + glCallList(pp->valve); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, pp->system_color); + glFrontFace(GL_CCW); +} + +static int +MakeGuage(ModeInfo * mi, int newdir) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + /* Can't have a guage on a vertical pipe. */ + if ((newdir == dirUP) || (newdir == dirDOWN)) + return (0); + + /* Is there space above this pipe for a guage? */ + if (!pp->directions[dirUP]) + return (0); + + /* Yes! Mark the space as used. */ + pp->Cells[pp->PX][pp->PY + 1][pp->PZ] = 1; + + glFrontFace(GL_CW); + glPushMatrix(); + if ((newdir == dirLEFT) || (newdir == dirRIGHT)) + glRotatef(90.0, 0.0, 1.0, 0.0); + glCallList(pp->betweenbolts); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + glCallList(pp->bolts); + glPopMatrix(); + + glCallList(pp->guageconnector); + glPushMatrix(); + glTranslatef(0.0, 1.33333, 0.0); + /* Do not change the above to 1 + ONE_THIRD, because */ + /* the object really is centered on 1.3333300000. */ + glRotatef(NRAND(270) + 45.0, 0.0, 0.0, -1.0); + /* Random rotation for the dial. I love it. */ + glCallList(pp->guagedial); + glPopMatrix(); + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, pp->system_color); + glCallList(pp->guagehead); + + /* GuageFace is drawn last, in case of low-res depth buffers. */ + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + glCallList(pp->guageface); + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, pp->system_color); + glFrontFace(GL_CCW); + + return (1); +} + +static void +MakeShape(ModeInfo * mi, int newdir) +{ + switch (NRAND(2)) { + case 1: + if (!MakeGuage(mi, newdir)) + MakeTube(newdir); + break; + default: + MakeValve(mi, newdir); + break; + } +} + +static void pinit(ModeInfo * mi, int zera); + +void +draw_pipes(ModeInfo * mi) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + int newdir; + int OPX, OPY, OPZ; + + glXMakeCurrent(display, window, pp->glx_context); + +#if defined( MESA ) && defined( SLOW ) + glDrawBuffer(GL_BACK); +#else + glDrawBuffer(GL_FRONT); +#endif + glPushMatrix(); + + glTranslatef(0.0, 0.0, fisheye ? -3.8 : -4.8); + if (rotatepipes) + glRotatef(pp->initial_rotation, 0.0, 1.0, 0.0); + + if (!MI_WIN_IS_ICONIC(mi)) { + /* Width/height ratio handled by gluPerspective() now. */ + glScalef(Scale4Window, Scale4Window, Scale4Window); + } else { + glScalef(Scale4Iconic, Scale4Iconic, Scale4Iconic); + } + + FindNeighbors(mi); + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, pp->system_color); + + /* If it's the begining of a system, draw a sphere */ + if (pp->olddir == dirNone) { + glPushMatrix(); + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0); + mySphere(0.6); + glPopMatrix(); + } + /* Check for stop conditions */ + if (pp->ndirections == 0 || pp->counter > pp->system_length) { + glPushMatrix(); + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0); + /* Finish the system with another sphere */ + mySphere(0.6); +#if defined( MESA ) && defined( SLOW ) + glXSwapBuffers(display, window); +#endif + glPopMatrix(); + + /* If the maximum number of system was drawn, restart (clearing the screen), */ + /* else start a new system. */ + if (++pp->system_number > pp->number_of_systems) { + (void) sleep(1); + pinit(mi, 1); + } else { + pinit(mi, 0); + } + + glPopMatrix(); + return; + } + pp->counter++; + pp->turncounter++; + + /* Do will the direction change? if so, determine the new one */ + newdir = pp->nowdir; + if (!pp->directions[newdir]) { /* cannot proceed in the current direction */ + newdir = SelectNeighbor(mi); + } else { + if (tightturns) { + /* random change (20% chance) */ + if ((pp->counter > 1) && (NRAND(100) < 20)) { + newdir = SelectNeighbor(mi); + } + } else { + /* Chance to turn increases after each length of pipe drawn */ + if ((pp->counter > 1) && NRAND(50) < NRAND(pp->turncounter + 1)) { + newdir = SelectNeighbor(mi); + pp->turncounter = 0; + } + } + } + + /* Has the direction changed? */ + if (newdir == pp->nowdir) { + /* If not, draw the cell's center pipe */ + glPushMatrix(); + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0); + /* Chance of factory shape here, if enabled. */ + if ((pp->counter > 1) && (NRAND(100) < factory)) { + MakeShape(mi, newdir); + } else { + MakeTube(newdir); + } + glPopMatrix(); + } else { + /* If so, draw the cell's center elbow/sphere */ + int sysT = pp->system_type; + + if (sysT == NofSysTypes + 1) { + sysT = ((pp->system_number - 1) % NofSysTypes) + 1; + } + glPushMatrix(); + + switch (sysT) { + case 1: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0); + mySphere(elbowradius); + break; + case 2: + case 3: + switch (pp->nowdir) { + case dirUP: + switch (newdir) { + case dirLEFT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0); + glRotatef(180.0, 1.0, 0.0, 0.0); + break; + case dirRIGHT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0); + glRotatef(180.0, 1.0, 0.0, 0.0); + glRotatef(180.0, 0.0, 1.0, 0.0); + break; + case dirFAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(90.0, 0.0, 1.0, 0.0); + glRotatef(180.0, 0.0, 0.0, 1.0); + break; + case dirNEAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(90.0, 0.0, 1.0, 0.0); + glRotatef(180.0, 1.0, 0.0, 0.0); + break; + } + break; + case dirDOWN: + switch (newdir) { + case dirLEFT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0); + break; + case dirRIGHT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0); + glRotatef(180.0, 0.0, 1.0, 0.0); + break; + case dirFAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(270.0, 0.0, 1.0, 0.0); + break; + case dirNEAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(90.0, 0.0, 1.0, 0.0); + break; + } + break; + case dirLEFT: + switch (newdir) { + case dirUP: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0); + glRotatef(180.0, 0.0, 1.0, 0.0); + break; + case dirDOWN: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0); + glRotatef(180.0, 1.0, 0.0, 0.0); + glRotatef(180.0, 0.0, 1.0, 0.0); + break; + case dirFAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(270.0, 1.0, 0.0, 0.0); + glRotatef(180.0, 0.0, 1.0, 0.0); + break; + case dirNEAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(270.0, 1.0, 0.0, 0.0); + glRotatef(180.0, 0.0, 0.0, 1.0); + break; + } + break; + case dirRIGHT: + switch (newdir) { + case dirUP: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0); + break; + case dirDOWN: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0); + glRotatef(180.0, 1.0, 0.0, 0.0); + break; + case dirFAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(270.0, 1.0, 0.0, 0.0); + break; + case dirNEAR: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(90.0, 1.0, 0.0, 0.0); + break; + } + break; + case dirNEAR: + switch (newdir) { + case dirLEFT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(270.0, 1.0, 0.0, 0.0); + break; + case dirRIGHT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(270.0, 1.0, 0.0, 0.0); + glRotatef(180.0, 0.0, 1.0, 0.0); + break; + case dirUP: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(270.0, 0.0, 1.0, 0.0); + break; + case dirDOWN: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0 - (one_third)); + glRotatef(90.0, 0.0, 1.0, 0.0); + glRotatef(180.0, 0.0, 0.0, 1.0); + break; + } + break; + case dirFAR: + switch (newdir) { + case dirUP: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 + (one_third), (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(90.0, 0.0, 1.0, 0.0); + break; + case dirDOWN: + glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0 - (one_third), (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(90.0, 0.0, 1.0, 0.0); + glRotatef(180.0, 1.0, 0.0, 0.0); + break; + case dirLEFT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 - (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(90.0, 1.0, 0.0, 0.0); + break; + case dirRIGHT: + glTranslatef((pp->PX - 16) / 3.0 * 4.0 + (one_third), (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0 + (one_third)); + glRotatef(270.0, 1.0, 0.0, 0.0); + glRotatef(180.0, 0.0, 0.0, 1.0); + break; + } + break; + } + myElbow(mi, (sysT == 2)); + break; + } + glPopMatrix(); + } + + OPX = pp->PX; + OPY = pp->PY; + OPZ = pp->PZ; + pp->olddir = pp->nowdir; + pp->nowdir = newdir; + switch (pp->nowdir) { + case dirUP: + pp->PY++; + break; + case dirDOWN: + pp->PY--; + break; + case dirLEFT: + pp->PX--; + break; + case dirRIGHT: + pp->PX++; + break; + case dirNEAR: + pp->PZ++; + break; + case dirFAR: + pp->PZ--; + break; + } + pp->Cells[pp->PX][pp->PY][pp->PZ] = 1; + + /* Cells'face pipe */ + glTranslatef(((pp->PX + OPX) / 2.0 - 16) / 3.0 * 4.0, ((pp->PY + OPY) / 2.0 - 12) / 3.0 * 4.0, ((pp->PZ + OPZ) / 2.0 - 16) / 3.0 * 4.0); + MakeTube(newdir); + + glPopMatrix(); + + glFlush(); + +#if defined( MESA ) && defined( SLOW ) + pp->flip = !pp->flip; + if (pp->flip) + glXSwapBuffers(display, window); +#endif +} + +static void +reshape(ModeInfo * mi, int width, int height) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + glViewport(0, 0, pp->WindW = (GLint) width, pp->WindH = (GLint) height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + /*glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); */ + gluPerspective(65.0, (GLfloat) width / (GLfloat) height, 0.1, 20.0); + glMatrixMode(GL_MODELVIEW); +} + +static void +pinit(ModeInfo * mi, int zera) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + int X, Y, Z; + + glClearDepth(1.0); + glClearColor(0.0, 0.0, 0.0, 1.0); + glColor3f(1.0, 1.0, 1.0); + + glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0); + glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0); + glLightfv(GL_LIGHT0, GL_POSITION, position0); + glLightfv(GL_LIGHT1, GL_AMBIENT, ambient1); + glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse1); + 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_SMOOTH); + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular); + + if (zera) { + pp->system_number = 1; + glDrawBuffer(GL_FRONT_AND_BACK); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + (void) memset(pp->Cells, 0, sizeof (pp->Cells)); + for (X = 0; X < HCELLS; X++) { + for (Y = 0; Y < VCELLS; Y++) { + pp->Cells[X][Y][0] = 1; + pp->Cells[X][Y][HCELLS - 1] = 1; + pp->Cells[0][Y][X] = 1; + pp->Cells[HCELLS - 1][Y][X] = 1; + } + } + for (X = 0; X < HCELLS; X++) { + for (Z = 0; Z < HCELLS; Z++) { + pp->Cells[X][0][Z] = 1; + pp->Cells[X][VCELLS - 1][Z] = 1; + } + } + (void) memset(pp->usedcolors, 0, sizeof (pp->usedcolors)); + if ((pp->initial_rotation += 10.0) > 45.0) { + pp->initial_rotation -= 90.0; + } + } + pp->counter = 0; + pp->turncounter = 0; + + if (!MI_WIN_IS_MONO(mi)) { + int collist[DEFINEDCOLORS]; + int i, j, lower = 1000; + + /* Avoid repeating colors on the same screen unless necessary */ + for (i = 0; i < DEFINEDCOLORS; i++) { + if (lower > pp->usedcolors[i]) + lower = pp->usedcolors[i]; + } + for (i = 0, j = 0; i < DEFINEDCOLORS; i++) { + if (pp->usedcolors[i] == lower) { + collist[j] = i; + j++; + } + } + i = collist[NRAND(j)]; + pp->usedcolors[i]++; + switch (i) { + case 0: + pp->system_color = MaterialRed; + break; + case 1: + pp->system_color = MaterialGreen; + break; + case 2: + pp->system_color = MaterialBlue; + break; + case 3: + pp->system_color = MaterialCyan; + break; + case 4: + pp->system_color = MaterialYellow; + break; + case 5: + pp->system_color = MaterialMagenta; + break; + case 6: + pp->system_color = MaterialWhite; + break; + } + } else { + pp->system_color = MaterialGray; + } + + do { + pp->PX = NRAND((HCELLS - 1)) + 1; + pp->PY = NRAND((VCELLS - 1)) + 1; + pp->PZ = NRAND((HCELLS - 1)) + 1; + } while (pp->Cells[pp->PX][pp->PY][pp->PZ] || + (pp->Cells[pp->PX + 1][pp->PY][pp->PZ] && pp->Cells[pp->PX - 1][pp->PY][pp->PZ] && + pp->Cells[pp->PX][pp->PY + 1][pp->PZ] && pp->Cells[pp->PX][pp->PY - 1][pp->PZ] && + pp->Cells[pp->PX][pp->PY][pp->PZ + 1] && pp->Cells[pp->PX][pp->PY][pp->PZ - 1])); + pp->Cells[pp->PX][pp->PY][pp->PZ] = 1; + pp->olddir = dirNone; + + FindNeighbors(mi); + + pp->nowdir = SelectNeighbor(mi); +} + +void +init_pipes(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + pipesstruct *pp; + + if (pipes == NULL) { + if ((pipes = (pipesstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (pipesstruct))) == NULL) + return; + } + pp = &pipes[screen]; + + pp->glx_context = init_GL(mi); + + reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + pp->initial_rotation = -10.0; + pinit(mi, 1); + + if (factory > 0) { + pp->valve = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_BigValve); + pp->bolts = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_Bolts3D); + pp->betweenbolts = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_PipeBetweenBolts); + + pp->elbowbolts = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_ElbowBolts); + pp->elbowcoins = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_ElbowCoins); + + pp->guagehead = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageHead); + pp->guageface = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageFace); + pp->guagedial = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageDial); + pp->guageconnector = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageConnector); + } + /* else they are all 0, thanks to calloc(). */ + + if (MI_BATCHCOUNT(mi) < 1 || MI_BATCHCOUNT(mi) > NofSysTypes + 1) { + pp->system_type = NRAND(NofSysTypes) + 1; + } else { + pp->system_type = MI_BATCHCOUNT(mi); + } + + if (MI_CYCLES(mi) > 0 && MI_CYCLES(mi) < 11) { + pp->number_of_systems = MI_CYCLES(mi); + } else { + pp->number_of_systems = 5; + } + + if (MI_SIZE(mi) < 10) { + pp->system_length = 10; + } else if (MI_SIZE(mi) > 1000) { + pp->system_length = 1000; + } else { + pp->system_length = MI_SIZE(mi); + } + +} + +void +change_pipes(ModeInfo * mi) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), pp->glx_context); + pinit(mi, 1); +} + +void +release_pipes(ModeInfo * mi) +{ + if (pipes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + pipesstruct *pp = &pipes[screen]; + + /* Display lists MUST be freed while their glXContext is current. */ + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), pp->glx_context); + + if (pp->valve) + glDeleteLists(pp->valve, 1); + if (pp->bolts) + glDeleteLists(pp->bolts, 1); + if (pp->betweenbolts) + glDeleteLists(pp->betweenbolts, 1); + + if (pp->elbowbolts) + glDeleteLists(pp->elbowbolts, 1); + if (pp->elbowcoins) + glDeleteLists(pp->elbowcoins, 1); + + if (pp->guagehead) + glDeleteLists(pp->guagehead, 1); + if (pp->guageface) + glDeleteLists(pp->guageface, 1); + if (pp->guagedial) + glDeleteLists(pp->guagedial, 1); + if (pp->guageconnector) + glDeleteLists(pp->guageconnector, 1); + } + + /* Don't destroy the glXContext. init_GL does that. */ + + (void) free((void *) pipes); + pipes = NULL; + } +} + +#endif diff --git a/hacks/glx/rubik.c b/hacks/glx/rubik.c new file mode 100644 index 00000000..00f8bfc3 --- /dev/null +++ b/hacks/glx/rubik.c @@ -0,0 +1,1402 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* rubik --- Shows a self-solving Rubik's cube */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)rubik.c 4.04 97/07/28 xlockmore"; + +#endif + +#undef DEBUG_LISTS + +/*- + * 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. + * + * This mode shows a self 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 + * mistake. + * + * My e-mail addresses are + * vianna@cat.cbpf.br + * and + * marcelo@venus.rdc.puc-rio.br + * + * Marcelo F. Vianna (Jul-31-1997) + * + * Revision History: + * 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 + * only the solution is shown). + * The color labels corners are now rounded. + * Optimized the cubit() routine using glLists. + * 01-Aug-97: Shuffling now avoids movements that undoes the previous movement + * and three consecutive identical moves (which is pretty stupid). + * improved the "cycles" option in replacement of David's hack, + * now rp->anglestep is a GLfloat, so this option selects the + * "exact" number of frames that a rotation (movement) takes to + * complete. + * 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... :) + * + */ + +/*- + * Color labels mapping: + * ===================== + * + * +------------+ + * | 22| + * | | + * | | + * | TOP(0) | + * |^ | + * || | + * |00--> | + * +-----------+------------+-----------+ + * | 22| 22| 22| + * | | | | + * | | | | + * | LEFT(1) | FRONT(2) | RIGHT(3) | + * |^ |^ |^ | + * || || || | + * |00--> |00--> |00--> | + * +-----------+------------+-----------+ + * | 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 | + * +------------+ +---+---+---+ + * + * Map to 3d + * FRONT => X, Y + * BACK => X, Y + * LEFT => Z, Y + * RIGHT => Z, Y + * TOP => X, Z + * BOTTOM => X, Z + */ + +/*- + * PURIFY 3.0a on SunOS4 reports an unitialized memory read on each of + * the glCallList() functions below when using MesaGL 2.1. This has + * been fixed in MesaGL 2.2 and later releases. + */ + +/*- + * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock. + * otherwise caddr_t is not defined correctly + */ +#include +#include + +#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" \ + "*count: -30 \n" \ + "*cycles: 5 \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +#define DEF_HIDESHUFFLING "False" + +static Bool hideshuffling; + +static XrmOptionDescRec opts[] = +{ + {"-hideshuffling", ".rubik.hideshuffling", XrmoptionNoArg, (caddr_t) "on"}, + {"+hideshuffling", ".rubik.hideshuffling", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & hideshuffling, "hideshuffling", "Hideshuffling", DEF_HIDESHUFFLING, t_Bool} +}; + +static OptionStruct desc[] = +{ + {"-/+hideshuffling", "turn on/off hidden shuffle phase"} +}; + +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)) + +#ifndef Pi +#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 + +#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 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) + +typedef struct { + GLint WindH, WindW; + GLfloat step; + char *movedfaces; + char *movedorient; + int storedmoves; + int shufflingmoves; + int action; + int done; + GLfloat anglestep; + char faces[6][MAXSIZE][MAXSIZE]; + int movement; + int orientation; + GLfloat rotatestep; + GLXContext glx_context; + int AreObjectsDefined[1]; +} rubikstruct; + +static float front_shininess[] = +{60.0}; +static float front_specular[] = +{0.7, 0.7, 0.7, 1.0}; +static float ambient[] = +{0.0, 0.0, 0.0, 1.0}; +static float diffuse[] = +{1.0, 1.0, 1.0, 1.0}; +static float position0[] = +{1.0, 1.0, 1.0, 0.0}; +static float position1[] = +{-1.0, -1.0, 1.0, 0.0}; +static float lmodel_ambient[] = +{0.5, 0.5, 0.5, 1.0}; +static float lmodel_twoside[] = +{GL_TRUE}; + +static float MaterialRed[] = +{0.5, 0.0, 0.0, 1.0}; +static float MaterialGreen[] = +{0.0, 0.5, 0.0, 1.0}; +static float MaterialBlue[] = +{0.0, 0.0, 0.5, 1.0}; +static float MaterialYellow[] = +{0.7, 0.7, 0.0, 1.0}; +static float MaterialOrange[] = +{1.0, 0.5, 0.4, 1.0}; + +#if 0 +static float MaterialMagenta[] = +{0.7, 0.0, 0.7, 1.0}; +static float MaterialCyan[] = +{0.0, 0.7, 0.7, 1.0}; + +#endif +static float MaterialWhite[] = +{0.8, 0.8, 0.8, 1.0}; +static float MaterialGray[] = +{0.2, 0.2, 0.2, 1.0}; + +static rubikstruct *rubik = NULL; +static GLuint objects; + +#define ObjCubit 0 + +static void +pickcolor(char C) +{ + switch (C) { + case 'R': + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed); + break; + case 'G': + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGreen); + break; + case 'B': + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialBlue); + break; + case 'Y': + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialYellow); + 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) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + + if (!rp->AreObjectsDefined[ObjCubit]) { + glNewList(objects + ObjCubit, GL_COMPILE_AND_EXECUTE); + glBegin(GL_QUADS); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + glNormal3f(0.00, 0.00, 1.00); + glVertex3f(-0.45, -0.45, 0.50); + glVertex3f(0.45, -0.45, 0.50); + glVertex3f(0.45, 0.45, 0.50); + glVertex3f(-0.45, 0.45, 0.50); + glNormal3f(0.00, 0.00, -1.00); + glVertex3f(-0.45, 0.45, -0.50); + glVertex3f(0.45, 0.45, -0.50); + glVertex3f(0.45, -0.45, -0.50); + glVertex3f(-0.45, -0.45, -0.50); + glNormal3f(-1.00, 0.00, 0.00); + glVertex3f(-0.50, -0.45, 0.45); + glVertex3f(-0.50, 0.45, 0.45); + glVertex3f(-0.50, 0.45, -0.45); + glVertex3f(-0.50, -0.45, -0.45); + glNormal3f(1.00, 0.00, 0.00); + glVertex3f(0.50, -0.45, -0.45); + glVertex3f(0.50, 0.45, -0.45); + glVertex3f(0.50, 0.45, 0.45); + glVertex3f(0.50, -0.45, 0.45); + glNormal3f(0.00, -1.00, 0.00); + glVertex3f(0.45, -0.50, -0.45); + glVertex3f(0.45, -0.50, 0.45); + glVertex3f(-0.45, -0.50, 0.45); + glVertex3f(-0.45, -0.50, -0.45); + glNormal3f(0.00, 1.00, 0.00); + glVertex3f(-0.45, 0.50, -0.45); + glVertex3f(-0.45, 0.50, 0.45); + glVertex3f(0.45, 0.50, 0.45); + glVertex3f(0.45, 0.50, -0.45); + glNormal3f(-1.00, -1.00, 0.00); + glVertex3f(-0.45, -0.50, -0.45); + glVertex3f(-0.45, -0.50, 0.45); + glVertex3f(-0.50, -0.45, 0.45); + glVertex3f(-0.50, -0.45, -0.45); + glNormal3f(1.00, 1.00, 0.00); + glVertex3f(0.45, 0.50, -0.45); + glVertex3f(0.45, 0.50, 0.45); + glVertex3f(0.50, 0.45, 0.45); + glVertex3f(0.50, 0.45, -0.45); + glNormal3f(-1.00, 1.00, 0.00); + glVertex3f(-0.50, 0.45, -0.45); + glVertex3f(-0.50, 0.45, 0.45); + glVertex3f(-0.45, 0.50, 0.45); + glVertex3f(-0.45, 0.50, -0.45); + glNormal3f(1.00, -1.00, 0.00); + glVertex3f(0.50, -0.45, -0.45); + glVertex3f(0.50, -0.45, 0.45); + glVertex3f(0.45, -0.50, 0.45); + glVertex3f(0.45, -0.50, -0.45); + glNormal3f(0.00, -1.00, -1.00); + glVertex3f(-0.45, -0.45, -0.50); + glVertex3f(0.45, -0.45, -0.50); + glVertex3f(0.45, -0.50, -0.45); + glVertex3f(-0.45, -0.50, -0.45); + glNormal3f(0.00, 1.00, 1.00); + glVertex3f(-0.45, 0.45, 0.50); + glVertex3f(0.45, 0.45, 0.50); + glVertex3f(0.45, 0.50, 0.45); + glVertex3f(-0.45, 0.50, 0.45); + glNormal3f(0.00, -1.00, 1.00); + glVertex3f(-0.45, -0.50, 0.45); + glVertex3f(0.45, -0.50, 0.45); + glVertex3f(0.45, -0.45, 0.50); + glVertex3f(-0.45, -0.45, 0.50); + glNormal3f(0.00, 1.00, -1.00); + glVertex3f(-0.45, 0.50, -0.45); + glVertex3f(0.45, 0.50, -0.45); + glVertex3f(0.45, 0.45, -0.50); + glVertex3f(-0.45, 0.45, -0.50); + glNormal3f(-1.00, 0.00, -1.00); + glVertex3f(-0.50, -0.45, -0.45); + glVertex3f(-0.50, 0.45, -0.45); + glVertex3f(-0.45, 0.45, -0.50); + glVertex3f(-0.45, -0.45, -0.50); + glNormal3f(1.00, 0.00, 1.00); + glVertex3f(0.50, -0.45, 0.45); + glVertex3f(0.50, 0.45, 0.45); + glVertex3f(0.45, 0.45, 0.50); + glVertex3f(0.45, -0.45, 0.50); + glNormal3f(1.00, 0.00, -1.00); + glVertex3f(0.45, -0.45, -0.50); + glVertex3f(0.45, 0.45, -0.50); + glVertex3f(0.50, 0.45, -0.45); + glVertex3f(0.50, -0.45, -0.45); + glNormal3f(-1.00, 0.00, 1.00); + glVertex3f(-0.45, -0.45, 0.50); + glVertex3f(-0.45, 0.45, 0.50); + glVertex3f(-0.50, 0.45, 0.45); + glVertex3f(-0.50, -0.45, 0.45); + glEnd(); + glBegin(GL_TRIANGLES); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); + glNormal3f(1.00, 1.00, 1.00); + glVertex3f(0.45, 0.45, 0.50); + glVertex3f(0.50, 0.45, 0.45); + glVertex3f(0.45, 0.50, 0.45); + glNormal3f(-1.00, -1.00, -1.00); + glVertex3f(-0.45, -0.50, -0.45); + glVertex3f(-0.50, -0.45, -0.45); + glVertex3f(-0.45, -0.45, -0.50); + glNormal3f(-1.00, 1.00, 1.00); + glVertex3f(-0.45, 0.45, 0.50); + glVertex3f(-0.45, 0.50, 0.45); + glVertex3f(-0.50, 0.45, 0.45); + glNormal3f(1.00, -1.00, -1.00); + glVertex3f(0.50, -0.45, -0.45); + glVertex3f(0.45, -0.50, -0.45); + glVertex3f(0.45, -0.45, -0.50); + glNormal3f(1.00, -1.00, 1.00); + glVertex3f(0.45, -0.45, 0.50); + glVertex3f(0.45, -0.50, 0.45); + glVertex3f(0.50, -0.45, 0.45); + glNormal3f(-1.00, 1.00, -1.00); + glVertex3f(-0.50, 0.45, -0.45); + glVertex3f(-0.45, 0.50, -0.45); + glVertex3f(-0.45, 0.45, -0.50); + glNormal3f(-1.00, -1.00, 1.00); + glVertex3f(-0.45, -0.45, 0.50); + glVertex3f(-0.50, -0.45, 0.45); + glVertex3f(-0.45, -0.50, 0.45); + glNormal3f(1.00, 1.00, -1.00); + glVertex3f(0.50, 0.45, -0.45); + glVertex3f(0.45, 0.45, -0.50); + glVertex3f(0.45, 0.50, -0.45); + glEnd(); + glEndList(); + rp->AreObjectsDefined[ObjCubit] = 1; +#ifdef DEBUG_LISTS + (void) printf("Cubit drawn SLOWLY\n"); +#endif + } else { + glCallList(objects + ObjCubit); +#ifdef DEBUG_LISTS + (void) printf("Cubit drawn quickly\n"); +#endif + } + + if (BACK != ' ') { + glBegin(GL_POLYGON); + pickcolor(BACK); + glNormal3f(0.00, 0.00, -1.00); + glVertex3f(-0.35, 0.40, -0.51); + glVertex3f(0.35, 0.40, -0.51); + glVertex3f(0.40, 0.35, -0.51); + glVertex3f(0.40, -0.35, -0.51); + glVertex3f(0.35, -0.40, -0.51); + glVertex3f(-0.35, -0.40, -0.51); + glVertex3f(-0.40, -0.35, -0.51); + glVertex3f(-0.40, 0.35, -0.51); + glEnd(); + } + if (FRONT != ' ') { + glBegin(GL_POLYGON); + pickcolor(FRONT); + glNormal3f(0.00, 0.00, 1.00); + glVertex3f(-0.35, -0.40, 0.51); + glVertex3f(0.35, -0.40, 0.51); + glVertex3f(0.40, -0.35, 0.51); + glVertex3f(0.40, 0.35, 0.51); + glVertex3f(0.35, 0.40, 0.51); + glVertex3f(-0.35, 0.40, 0.51); + glVertex3f(-0.40, 0.35, 0.51); + glVertex3f(-0.40, -0.35, 0.51); + glEnd(); + } + if (LEFT != ' ') { + glBegin(GL_POLYGON); + pickcolor(LEFT); + glNormal3f(-1.00, 0.00, 0.00); + glVertex3f(-0.51, -0.35, 0.40); + glVertex3f(-0.51, 0.35, 0.40); + glVertex3f(-0.51, 0.40, 0.35); + glVertex3f(-0.51, 0.40, -0.35); + glVertex3f(-0.51, 0.35, -0.40); + glVertex3f(-0.51, -0.35, -0.40); + glVertex3f(-0.51, -0.40, -0.35); + glVertex3f(-0.51, -0.40, 0.35); + glEnd(); + } + if (RIGHT != ' ') { + glBegin(GL_POLYGON); + pickcolor(RIGHT); + glNormal3f(1.00, 0.00, 0.00); + glVertex3f(0.51, -0.35, -0.40); + glVertex3f(0.51, 0.35, -0.40); + glVertex3f(0.51, 0.40, -0.35); + glVertex3f(0.51, 0.40, 0.35); + glVertex3f(0.51, 0.35, 0.40); + glVertex3f(0.51, -0.35, 0.40); + glVertex3f(0.51, -0.40, 0.35); + glVertex3f(0.51, -0.40, -0.35); + glEnd(); + } + if (BOTTOM != ' ') { + glBegin(GL_POLYGON); + pickcolor(BOTTOM); + glNormal3f(0.00, -1.00, 0.00); + glVertex3f(0.40, -0.51, -0.35); + glVertex3f(0.40, -0.51, 0.35); + glVertex3f(0.35, -0.51, 0.40); + glVertex3f(-0.35, -0.51, 0.40); + glVertex3f(-0.40, -0.51, 0.35); + glVertex3f(-0.40, -0.51, -0.35); + glVertex3f(-0.35, -0.51, -0.40); + glVertex3f(0.35, -0.51, -0.40); + glEnd(); + } + if (TOP != ' ') { + glBegin(GL_POLYGON); + pickcolor(TOP); + glNormal3f(0.00, 1.00, 0.00); + glVertex3f(-0.40, 0.51, -0.35); + glVertex3f(-0.40, 0.51, 0.35); + glVertex3f(-0.35, 0.51, 0.40); + glVertex3f(0.35, 0.51, 0.40); + glVertex3f(0.40, 0.51, 0.35); + glVertex3f(0.40, 0.51, -0.35); + glVertex3f(0.35, 0.51, -0.40); + glVertex3f(-0.35, 0.51, -0.40); + glEnd(); + } + glEnd(); +} + +static void +draw_cube(ModeInfo * mi) +{ +#define S1 1 +#define S2 (S1*2) + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + + 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(); + 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]); + 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]); + break; + case LEFT_ROTATION: + case RIGHT_ROTATION: + 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], ' '); + glTranslatef(0, S1, 0); + draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][1], + ' ', ' ', + ' ', ' '); + glTranslatef(0, S1, 0); + draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][LASTY], + ' ', ' ', + ' ', F_[TOP_ROTATION][1][0]); + 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], ' '); + glTranslatef(0, S1, 0); + draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][1], + ' ', F_[RIGHT_ROTATION][0][1], + ' ', ' '); + glTranslatef(0, S1, 0); + draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][LASTY], + ' ', F_[RIGHT_ROTATION][0][LAST], + ' ', F_[TOP_ROTATION][LAST][0]); + break; + case BOTTOM_ROTATION: + case TOP_ROTATION: + 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], + ' ', ' '); + 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]); + break; + } +#undef S1 +#undef S2 +} + +static void +evalmovement(ModeInfo * mi, int face, char orient) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + char T1, T2, T3; + + if (face < 0 || face > 5) + 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]; */ + } + + 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 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); + + 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; + 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, + "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 { + rp->anglestep = 90.0 / (GLfloat) (MI_CYCLES(mi)); + } + + for (i = 0; i < rp->storedmoves; i++) { + int condition; + + do { + mov = NRAND(6); + ori = NRAND(2); + condition = 1; + if (i > 0) /* avoid immediate undoing moves */ + if (mov == rp->movedfaces[i - 1] && + ori == rp->movedorient[i - 1]) + 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]) + condition = 0; + } while (!condition); + if (hideshuffling) + evalmovement(mi, mov, ori); + rp->movedfaces[i] = mov; + rp->movedorient[i] = (ori == CLOCK_WISE) ? C_CLOCK_WISE : CLOCK_WISE; + } + rp->movement = NO_ROTATION; + rp->rotatestep = 0; + rp->action = hideshuffling ? ACTION_SOLVE : ACTION_SHUFFLE; + rp->shufflingmoves = 0; + rp->done = 0; +} + +void +draw_rubik(ModeInfo * mi) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + glDrawBuffer(GL_BACK); + glXMakeCurrent(display, window, rp->glx_context); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + glTranslatef(0.0, 0.0, -10.0); + + if (!MI_WIN_IS_ICONIC(mi)) { + glScalef(Scale4Window * rp->WindH / rp->WindW, Scale4Window, Scale4Window); + } else { + glScalef(Scale4Iconic * rp->WindH / rp->WindW, Scale4Iconic, Scale4Iconic); + } + + glRotatef(rp->step * 100, 1, 0, 0); + glRotatef(rp->step * 95, 0, 1, 0); + glRotatef(rp->step * 90, 0, 0, 1); + + if (rp->action == ACTION_SHUFFLE) { + if (rp->done) { + if (++rp->rotatestep > DELAY_AFTER_SHUFFLING) { + rp->movement = NO_ROTATION; + rp->rotatestep = 0; + rp->action = ACTION_SOLVE; + rp->done = 0; + } + } else { + if (rp->movement == NO_ROTATION) { + 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; + } 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->shufflingmoves++; + rp->movement = NO_ROTATION; + } + } + } + } else { + if (rp->done) { + if (++rp->rotatestep > DELAY_AFTER_SOLVING) + shuffle(mi); + } else { + if (rp->movement == NO_ROTATION) { + if (rp->storedmoves > 0) { + rp->rotatestep = 0; + rp->movement = rp->movedfaces[rp->storedmoves - 1]; + rp->orientation = rp->movedorient[rp->storedmoves - 1]; + } 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->storedmoves--; + rp->movement = NO_ROTATION; + } + } + } + } + + draw_cube(mi); + + glPopMatrix(); + + glFlush(); + + glXSwapBuffers(display, window); + + 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) +{ + pinit(mi); +} + +void +release_rubik(ModeInfo * mi) +{ + if (rubik != NULL) { + int screen; + + 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); + } + (void) free((void *) rubik); + rubik = NULL; + } +} + +#undef F_ +#endif diff --git a/hacks/glx/s1_1.c b/hacks/glx/s1_1.c new file mode 100644 index 00000000..b7e22271 --- /dev/null +++ b/hacks/glx/s1_1.c @@ -0,0 +1,1058 @@ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_1.c 4.2 97/04/20 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render "s1_1" in 3D. + * + * Generated by lw2ogl. Link this with your program but do + * not edit by hand. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat s1_1_PNTS[] = +{ + (GLfloat) 0.332422, (GLfloat) 0.132531, (GLfloat) - 0.332422, + (GLfloat) 0.332422, (GLfloat) 0.132531, (GLfloat) - 0.667578, + (GLfloat) 0.667578, (GLfloat) 0.132531, (GLfloat) - 0.332422, + (GLfloat) 0.667578, (GLfloat) 0.132531, (GLfloat) - 0.667578, + (GLfloat) 0.638667, (GLfloat) 0.007537, (GLfloat) - 0.638667, + (GLfloat) 0.361333, (GLfloat) 0.007537, (GLfloat) - 0.638667, + (GLfloat) 0.361333, (GLfloat) 0.007537, (GLfloat) - 0.361333, + (GLfloat) 0.638667, (GLfloat) 0.007537, (GLfloat) - 0.361333, + (GLfloat) 0.653656, (GLfloat) 0.494688, (GLfloat) - 0.653656, + (GLfloat) 0.346344, (GLfloat) 0.494688, (GLfloat) - 0.653656, + (GLfloat) 0.346344, (GLfloat) 0.494688, (GLfloat) - 0.346344, + (GLfloat) 0.653656, (GLfloat) 0.494688, (GLfloat) - 0.346344, + (GLfloat) 0.667578, (GLfloat) 0.838781, (GLfloat) - 0.667578, + (GLfloat) 0.667578, (GLfloat) 0.838781, (GLfloat) - 0.332422, + (GLfloat) 0.638667, (GLfloat) 0.958463, (GLfloat) - 0.361333, + (GLfloat) 0.638667, (GLfloat) 0.958463, (GLfloat) - 0.638667, + (GLfloat) 0.332422, (GLfloat) 0.838781, (GLfloat) - 0.332422, + (GLfloat) 0.361333, (GLfloat) 0.958463, (GLfloat) - 0.361333, + (GLfloat) 0.332422, (GLfloat) 0.838781, (GLfloat) - 0.667578, + (GLfloat) 0.361333, (GLfloat) 0.958463, (GLfloat) - 0.638667, + (GLfloat) 0.738539, (GLfloat) 0.926712, (GLfloat) - 0.500000, + (GLfloat) 0.714805, (GLfloat) 0.686547, (GLfloat) - 0.500000, + (GLfloat) 0.728516, (GLfloat) 0.838781, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.926712, (GLfloat) - 0.261461, + (GLfloat) 0.674539, (GLfloat) 0.926104, (GLfloat) - 0.325461, + (GLfloat) 0.500000, (GLfloat) 0.976924, (GLfloat) - 0.500000, + (GLfloat) 0.677562, (GLfloat) 0.965162, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.926712, (GLfloat) - 0.738539, + (GLfloat) 0.674539, (GLfloat) 0.926104, (GLfloat) - 0.674539, + (GLfloat) 0.500000, (GLfloat) 0.686547, (GLfloat) - 0.285195, + (GLfloat) 0.500000, (GLfloat) 0.838781, (GLfloat) - 0.271484, + (GLfloat) 0.261461, (GLfloat) 0.926712, (GLfloat) - 0.500000, + (GLfloat) 0.325461, (GLfloat) 0.926104, (GLfloat) - 0.325461, + (GLfloat) 0.500000, (GLfloat) 0.965162, (GLfloat) - 0.322437, + (GLfloat) 0.285195, (GLfloat) 0.686547, (GLfloat) - 0.500000, + (GLfloat) 0.271484, (GLfloat) 0.838781, (GLfloat) - 0.500000, + (GLfloat) 0.325461, (GLfloat) 0.926104, (GLfloat) - 0.674539, + (GLfloat) 0.322437, (GLfloat) 0.965162, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.686547, (GLfloat) - 0.714805, + (GLfloat) 0.500000, (GLfloat) 0.838781, (GLfloat) - 0.728516, + (GLfloat) 0.500000, (GLfloat) 0.965162, (GLfloat) - 0.677562, + (GLfloat) 0.657523, (GLfloat) 0.686547, (GLfloat) - 0.657523, + (GLfloat) 0.714805, (GLfloat) 0.295922, (GLfloat) - 0.500000, + (GLfloat) 0.709531, (GLfloat) 0.494688, (GLfloat) - 0.500000, + (GLfloat) 0.657523, (GLfloat) 0.686547, (GLfloat) - 0.342477, + (GLfloat) 0.342477, (GLfloat) 0.686547, (GLfloat) - 0.657523, + (GLfloat) 0.500000, (GLfloat) 0.295922, (GLfloat) - 0.714805, + (GLfloat) 0.500000, (GLfloat) 0.494688, (GLfloat) - 0.709531, + (GLfloat) 0.500000, (GLfloat) 0.295922, (GLfloat) - 0.285195, + (GLfloat) 0.500000, (GLfloat) 0.494688, (GLfloat) - 0.290469, + (GLfloat) 0.342477, (GLfloat) 0.686547, (GLfloat) - 0.342477, + (GLfloat) 0.285195, (GLfloat) 0.295922, (GLfloat) - 0.500000, + (GLfloat) 0.290469, (GLfloat) 0.494688, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.039819, (GLfloat) - 0.738539, + (GLfloat) 0.500000, (GLfloat) 0.132531, (GLfloat) - 0.728516, + (GLfloat) 0.657523, (GLfloat) 0.295922, (GLfloat) - 0.657523, + (GLfloat) 0.342477, (GLfloat) 0.295922, (GLfloat) - 0.657523, + (GLfloat) 0.342477, (GLfloat) 0.295922, (GLfloat) - 0.342477, + (GLfloat) 0.261461, (GLfloat) 0.039819, (GLfloat) - 0.500000, + (GLfloat) 0.271484, (GLfloat) 0.132531, (GLfloat) - 0.500000, + (GLfloat) 0.657523, (GLfloat) 0.295922, (GLfloat) - 0.342477, + (GLfloat) 0.500000, (GLfloat) 0.039819, (GLfloat) - 0.261461, + (GLfloat) 0.500000, (GLfloat) 0.132531, (GLfloat) - 0.271484, + (GLfloat) 0.738539, (GLfloat) 0.039819, (GLfloat) - 0.500000, + (GLfloat) 0.728516, (GLfloat) 0.132531, (GLfloat) - 0.500000, + (GLfloat) 0.674539, (GLfloat) 0.040427, (GLfloat) - 0.674539, + (GLfloat) 0.500000, (GLfloat) - 0.010924, (GLfloat) - 0.500000, + (GLfloat) 0.677562, (GLfloat) 0.000839, (GLfloat) - 0.500000, + (GLfloat) 0.674539, (GLfloat) 0.040427, (GLfloat) - 0.325461, + (GLfloat) 0.325461, (GLfloat) 0.040427, (GLfloat) - 0.674539, + (GLfloat) 0.500000, (GLfloat) 0.000839, (GLfloat) - 0.677562, + (GLfloat) 0.325461, (GLfloat) 0.040427, (GLfloat) - 0.325461, + (GLfloat) 0.322437, (GLfloat) 0.000839, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.000839, (GLfloat) - 0.322437, + (GLfloat) 0.721812, (GLfloat) 0.890313, (GLfloat) - 0.595062, + (GLfloat) 0.706063, (GLfloat) 0.769563, (GLfloat) - 0.588313, + (GLfloat) 0.713281, (GLfloat) 0.838781, (GLfloat) - 0.591406, + (GLfloat) 0.721812, (GLfloat) 0.890313, (GLfloat) - 0.404938, + (GLfloat) 0.737656, (GLfloat) 0.890313, (GLfloat) - 0.500000, + (GLfloat) 0.706000, (GLfloat) 0.949319, (GLfloat) - 0.587500, + (GLfloat) 0.722453, (GLfloat) 0.926408, (GLfloat) - 0.595141, + (GLfloat) 0.595062, (GLfloat) 0.890313, (GLfloat) - 0.721812, + (GLfloat) 0.674281, (GLfloat) 0.890313, (GLfloat) - 0.674281, + (GLfloat) 0.595062, (GLfloat) 0.890313, (GLfloat) - 0.278187, + (GLfloat) 0.674281, (GLfloat) 0.890313, (GLfloat) - 0.325719, + (GLfloat) 0.706000, (GLfloat) 0.949319, (GLfloat) - 0.412500, + (GLfloat) 0.722453, (GLfloat) 0.926408, (GLfloat) - 0.404859, + (GLfloat) 0.706063, (GLfloat) 0.769563, (GLfloat) - 0.411687, + (GLfloat) 0.713281, (GLfloat) 0.838781, (GLfloat) - 0.408594, + (GLfloat) 0.590500, (GLfloat) 0.971195, (GLfloat) - 0.409500, + (GLfloat) 0.664625, (GLfloat) 0.962948, (GLfloat) - 0.417500, + (GLfloat) 0.721500, (GLfloat) 0.950535, (GLfloat) - 0.500000, + (GLfloat) 0.587500, (GLfloat) 0.949319, (GLfloat) - 0.294000, + (GLfloat) 0.660875, (GLfloat) 0.948104, (GLfloat) - 0.339125, + (GLfloat) 0.587500, (GLfloat) 0.949319, (GLfloat) - 0.706000, + (GLfloat) 0.660875, (GLfloat) 0.948104, (GLfloat) - 0.660875, + (GLfloat) 0.590500, (GLfloat) 0.971195, (GLfloat) - 0.590500, + (GLfloat) 0.664625, (GLfloat) 0.962948, (GLfloat) - 0.582500, + (GLfloat) 0.588313, (GLfloat) 0.769563, (GLfloat) - 0.293938, + (GLfloat) 0.591406, (GLfloat) 0.838781, (GLfloat) - 0.286719, + (GLfloat) 0.404938, (GLfloat) 0.890313, (GLfloat) - 0.278187, + (GLfloat) 0.500000, (GLfloat) 0.890313, (GLfloat) - 0.262344, + (GLfloat) 0.595141, (GLfloat) 0.926408, (GLfloat) - 0.277547, + (GLfloat) 0.278187, (GLfloat) 0.890313, (GLfloat) - 0.404938, + (GLfloat) 0.325719, (GLfloat) 0.890313, (GLfloat) - 0.325719, + (GLfloat) 0.412500, (GLfloat) 0.949319, (GLfloat) - 0.294000, + (GLfloat) 0.404859, (GLfloat) 0.926408, (GLfloat) - 0.277547, + (GLfloat) 0.411687, (GLfloat) 0.769563, (GLfloat) - 0.293938, + (GLfloat) 0.408594, (GLfloat) 0.838781, (GLfloat) - 0.286719, + (GLfloat) 0.409500, (GLfloat) 0.971195, (GLfloat) - 0.409500, + (GLfloat) 0.417500, (GLfloat) 0.962948, (GLfloat) - 0.335375, + (GLfloat) 0.500000, (GLfloat) 0.950535, (GLfloat) - 0.278500, + (GLfloat) 0.294000, (GLfloat) 0.949319, (GLfloat) - 0.412500, + (GLfloat) 0.339125, (GLfloat) 0.948104, (GLfloat) - 0.339125, + (GLfloat) 0.582500, (GLfloat) 0.962948, (GLfloat) - 0.335375, + (GLfloat) 0.293938, (GLfloat) 0.769563, (GLfloat) - 0.411687, + (GLfloat) 0.286719, (GLfloat) 0.838781, (GLfloat) - 0.408594, + (GLfloat) 0.278187, (GLfloat) 0.890313, (GLfloat) - 0.595062, + (GLfloat) 0.262344, (GLfloat) 0.890313, (GLfloat) - 0.500000, + (GLfloat) 0.277547, (GLfloat) 0.926408, (GLfloat) - 0.404859, + (GLfloat) 0.404938, (GLfloat) 0.890313, (GLfloat) - 0.721812, + (GLfloat) 0.325719, (GLfloat) 0.890313, (GLfloat) - 0.674281, + (GLfloat) 0.294000, (GLfloat) 0.949319, (GLfloat) - 0.587500, + (GLfloat) 0.277547, (GLfloat) 0.926408, (GLfloat) - 0.595141, + (GLfloat) 0.293938, (GLfloat) 0.769563, (GLfloat) - 0.588313, + (GLfloat) 0.286719, (GLfloat) 0.838781, (GLfloat) - 0.591406, + (GLfloat) 0.409500, (GLfloat) 0.971195, (GLfloat) - 0.590500, + (GLfloat) 0.335375, (GLfloat) 0.962948, (GLfloat) - 0.582500, + (GLfloat) 0.278500, (GLfloat) 0.950535, (GLfloat) - 0.500000, + (GLfloat) 0.412500, (GLfloat) 0.949319, (GLfloat) - 0.706000, + (GLfloat) 0.339125, (GLfloat) 0.948104, (GLfloat) - 0.660875, + (GLfloat) 0.335375, (GLfloat) 0.962948, (GLfloat) - 0.417500, + (GLfloat) 0.411687, (GLfloat) 0.769563, (GLfloat) - 0.706063, + (GLfloat) 0.408594, (GLfloat) 0.838781, (GLfloat) - 0.713281, + (GLfloat) 0.500000, (GLfloat) 0.890313, (GLfloat) - 0.737656, + (GLfloat) 0.404859, (GLfloat) 0.926408, (GLfloat) - 0.722453, + (GLfloat) 0.595141, (GLfloat) 0.926408, (GLfloat) - 0.722453, + (GLfloat) 0.588313, (GLfloat) 0.769563, (GLfloat) - 0.706063, + (GLfloat) 0.591406, (GLfloat) 0.838781, (GLfloat) - 0.713281, + (GLfloat) 0.582500, (GLfloat) 0.962948, (GLfloat) - 0.664625, + (GLfloat) 0.500000, (GLfloat) 0.950535, (GLfloat) - 0.721500, + (GLfloat) 0.417500, (GLfloat) 0.962948, (GLfloat) - 0.664625, + (GLfloat) 0.500000, (GLfloat) 0.973972, (GLfloat) - 0.402250, + (GLfloat) 0.597750, (GLfloat) 0.973972, (GLfloat) - 0.500000, + (GLfloat) 0.402250, (GLfloat) 0.973972, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.973972, (GLfloat) - 0.597750, + (GLfloat) 0.661906, (GLfloat) 0.769563, (GLfloat) - 0.661906, + (GLfloat) 0.696875, (GLfloat) 0.593625, (GLfloat) - 0.584375, + (GLfloat) 0.700484, (GLfloat) 0.686547, (GLfloat) - 0.585922, + (GLfloat) 0.720781, (GLfloat) 0.769563, (GLfloat) - 0.500000, + (GLfloat) 0.696875, (GLfloat) 0.393625, (GLfloat) - 0.584375, + (GLfloat) 0.695563, (GLfloat) 0.494688, (GLfloat) - 0.583813, + (GLfloat) 0.696875, (GLfloat) 0.593625, (GLfloat) - 0.415625, + (GLfloat) 0.710938, (GLfloat) 0.593625, (GLfloat) - 0.500000, + (GLfloat) 0.584375, (GLfloat) 0.593625, (GLfloat) - 0.696875, + (GLfloat) 0.654688, (GLfloat) 0.593625, (GLfloat) - 0.654688, + (GLfloat) 0.584375, (GLfloat) 0.593625, (GLfloat) - 0.303125, + (GLfloat) 0.654688, (GLfloat) 0.593625, (GLfloat) - 0.345313, + (GLfloat) 0.700484, (GLfloat) 0.686547, (GLfloat) - 0.414078, + (GLfloat) 0.696875, (GLfloat) 0.393625, (GLfloat) - 0.415625, + (GLfloat) 0.695563, (GLfloat) 0.494688, (GLfloat) - 0.416187, + (GLfloat) 0.661906, (GLfloat) 0.769563, (GLfloat) - 0.338094, + (GLfloat) 0.338094, (GLfloat) 0.769563, (GLfloat) - 0.661906, + (GLfloat) 0.415625, (GLfloat) 0.593625, (GLfloat) - 0.696875, + (GLfloat) 0.414078, (GLfloat) 0.686547, (GLfloat) - 0.700484, + (GLfloat) 0.500000, (GLfloat) 0.769563, (GLfloat) - 0.720781, + (GLfloat) 0.415625, (GLfloat) 0.393625, (GLfloat) - 0.696875, + (GLfloat) 0.416187, (GLfloat) 0.494688, (GLfloat) - 0.695563, + (GLfloat) 0.500000, (GLfloat) 0.593625, (GLfloat) - 0.710938, + (GLfloat) 0.303125, (GLfloat) 0.593625, (GLfloat) - 0.584375, + (GLfloat) 0.345313, (GLfloat) 0.593625, (GLfloat) - 0.654688, + (GLfloat) 0.585922, (GLfloat) 0.686547, (GLfloat) - 0.700484, + (GLfloat) 0.584375, (GLfloat) 0.393625, (GLfloat) - 0.696875, + (GLfloat) 0.583813, (GLfloat) 0.494688, (GLfloat) - 0.695563, + (GLfloat) 0.500000, (GLfloat) 0.769563, (GLfloat) - 0.279219, + (GLfloat) 0.415625, (GLfloat) 0.593625, (GLfloat) - 0.303125, + (GLfloat) 0.414078, (GLfloat) 0.686547, (GLfloat) - 0.299516, + (GLfloat) 0.338094, (GLfloat) 0.769563, (GLfloat) - 0.338094, + (GLfloat) 0.585922, (GLfloat) 0.686547, (GLfloat) - 0.299516, + (GLfloat) 0.584375, (GLfloat) 0.393625, (GLfloat) - 0.303125, + (GLfloat) 0.583813, (GLfloat) 0.494688, (GLfloat) - 0.304437, + (GLfloat) 0.500000, (GLfloat) 0.593625, (GLfloat) - 0.289063, + (GLfloat) 0.303125, (GLfloat) 0.593625, (GLfloat) - 0.415625, + (GLfloat) 0.345313, (GLfloat) 0.593625, (GLfloat) - 0.345313, + (GLfloat) 0.415625, (GLfloat) 0.393625, (GLfloat) - 0.303125, + (GLfloat) 0.416187, (GLfloat) 0.494688, (GLfloat) - 0.304437, + (GLfloat) 0.279219, (GLfloat) 0.769563, (GLfloat) - 0.500000, + (GLfloat) 0.299516, (GLfloat) 0.686547, (GLfloat) - 0.585922, + (GLfloat) 0.299516, (GLfloat) 0.686547, (GLfloat) - 0.414078, + (GLfloat) 0.303125, (GLfloat) 0.393625, (GLfloat) - 0.415625, + (GLfloat) 0.304437, (GLfloat) 0.494688, (GLfloat) - 0.416187, + (GLfloat) 0.289063, (GLfloat) 0.593625, (GLfloat) - 0.500000, + (GLfloat) 0.303125, (GLfloat) 0.393625, (GLfloat) - 0.584375, + (GLfloat) 0.304437, (GLfloat) 0.494688, (GLfloat) - 0.583813, + (GLfloat) 0.411687, (GLfloat) 0.207062, (GLfloat) - 0.706063, + (GLfloat) 0.404938, (GLfloat) 0.077813, (GLfloat) - 0.721812, + (GLfloat) 0.408594, (GLfloat) 0.132531, (GLfloat) - 0.713281, + (GLfloat) 0.588313, (GLfloat) 0.207062, (GLfloat) - 0.706063, + (GLfloat) 0.500000, (GLfloat) 0.207062, (GLfloat) - 0.720781, + (GLfloat) 0.414078, (GLfloat) 0.295922, (GLfloat) - 0.700484, + (GLfloat) 0.293938, (GLfloat) 0.207062, (GLfloat) - 0.588313, + (GLfloat) 0.338094, (GLfloat) 0.207062, (GLfloat) - 0.661906, + (GLfloat) 0.706063, (GLfloat) 0.207062, (GLfloat) - 0.588313, + (GLfloat) 0.661906, (GLfloat) 0.207062, (GLfloat) - 0.661906, + (GLfloat) 0.585922, (GLfloat) 0.295922, (GLfloat) - 0.700484, + (GLfloat) 0.595062, (GLfloat) 0.077813, (GLfloat) - 0.721812, + (GLfloat) 0.591406, (GLfloat) 0.132531, (GLfloat) - 0.713281, + (GLfloat) 0.500000, (GLfloat) 0.393625, (GLfloat) - 0.710938, + (GLfloat) 0.654688, (GLfloat) 0.393625, (GLfloat) - 0.654688, + (GLfloat) 0.345313, (GLfloat) 0.393625, (GLfloat) - 0.654688, + (GLfloat) 0.299516, (GLfloat) 0.295922, (GLfloat) - 0.585922, + (GLfloat) 0.293938, (GLfloat) 0.207062, (GLfloat) - 0.411687, + (GLfloat) 0.279219, (GLfloat) 0.207062, (GLfloat) - 0.500000, + (GLfloat) 0.278187, (GLfloat) 0.077813, (GLfloat) - 0.595062, + (GLfloat) 0.286719, (GLfloat) 0.132531, (GLfloat) - 0.591406, + (GLfloat) 0.289063, (GLfloat) 0.393625, (GLfloat) - 0.500000, + (GLfloat) 0.345313, (GLfloat) 0.393625, (GLfloat) - 0.345313, + (GLfloat) 0.299516, (GLfloat) 0.295922, (GLfloat) - 0.414078, + (GLfloat) 0.278187, (GLfloat) 0.077813, (GLfloat) - 0.404938, + (GLfloat) 0.286719, (GLfloat) 0.132531, (GLfloat) - 0.408594, + (GLfloat) 0.411687, (GLfloat) 0.207062, (GLfloat) - 0.293938, + (GLfloat) 0.338094, (GLfloat) 0.207062, (GLfloat) - 0.338094, + (GLfloat) 0.414078, (GLfloat) 0.295922, (GLfloat) - 0.299516, + (GLfloat) 0.588313, (GLfloat) 0.207062, (GLfloat) - 0.293938, + (GLfloat) 0.500000, (GLfloat) 0.207062, (GLfloat) - 0.279219, + (GLfloat) 0.404938, (GLfloat) 0.077813, (GLfloat) - 0.278187, + (GLfloat) 0.408594, (GLfloat) 0.132531, (GLfloat) - 0.286719, + (GLfloat) 0.500000, (GLfloat) 0.393625, (GLfloat) - 0.289063, + (GLfloat) 0.654688, (GLfloat) 0.393625, (GLfloat) - 0.345313, + (GLfloat) 0.585922, (GLfloat) 0.295922, (GLfloat) - 0.299516, + (GLfloat) 0.595062, (GLfloat) 0.077813, (GLfloat) - 0.278187, + (GLfloat) 0.591406, (GLfloat) 0.132531, (GLfloat) - 0.286719, + (GLfloat) 0.706063, (GLfloat) 0.207062, (GLfloat) - 0.411687, + (GLfloat) 0.661906, (GLfloat) 0.207062, (GLfloat) - 0.338094, + (GLfloat) 0.700484, (GLfloat) 0.295922, (GLfloat) - 0.414078, + (GLfloat) 0.720781, (GLfloat) 0.207062, (GLfloat) - 0.500000, + (GLfloat) 0.721812, (GLfloat) 0.077813, (GLfloat) - 0.404938, + (GLfloat) 0.713281, (GLfloat) 0.132531, (GLfloat) - 0.408594, + (GLfloat) 0.710938, (GLfloat) 0.393625, (GLfloat) - 0.500000, + (GLfloat) 0.700484, (GLfloat) 0.295922, (GLfloat) - 0.585922, + (GLfloat) 0.721812, (GLfloat) 0.077813, (GLfloat) - 0.595062, + (GLfloat) 0.713281, (GLfloat) 0.132531, (GLfloat) - 0.591406, + (GLfloat) 0.737656, (GLfloat) 0.077813, (GLfloat) - 0.500000, + (GLfloat) 0.706000, (GLfloat) 0.016681, (GLfloat) - 0.412500, + (GLfloat) 0.722453, (GLfloat) 0.040123, (GLfloat) - 0.404859, + (GLfloat) 0.674281, (GLfloat) 0.077813, (GLfloat) - 0.325719, + (GLfloat) 0.674281, (GLfloat) 0.077813, (GLfloat) - 0.674281, + (GLfloat) 0.706000, (GLfloat) 0.016681, (GLfloat) - 0.587500, + (GLfloat) 0.722453, (GLfloat) 0.040123, (GLfloat) - 0.595141, + (GLfloat) 0.590500, (GLfloat) - 0.005194, (GLfloat) - 0.590500, + (GLfloat) 0.664625, (GLfloat) 0.003052, (GLfloat) - 0.582500, + (GLfloat) 0.721500, (GLfloat) 0.015465, (GLfloat) - 0.500000, + (GLfloat) 0.587500, (GLfloat) 0.016681, (GLfloat) - 0.706000, + (GLfloat) 0.660875, (GLfloat) 0.017896, (GLfloat) - 0.660875, + (GLfloat) 0.587500, (GLfloat) 0.016681, (GLfloat) - 0.294000, + (GLfloat) 0.660875, (GLfloat) 0.017896, (GLfloat) - 0.339125, + (GLfloat) 0.590500, (GLfloat) - 0.005194, (GLfloat) - 0.409500, + (GLfloat) 0.664625, (GLfloat) 0.003052, (GLfloat) - 0.417500, + (GLfloat) 0.500000, (GLfloat) 0.077813, (GLfloat) - 0.737656, + (GLfloat) 0.595141, (GLfloat) 0.040123, (GLfloat) - 0.722453, + (GLfloat) 0.325719, (GLfloat) 0.077813, (GLfloat) - 0.674281, + (GLfloat) 0.412500, (GLfloat) 0.016681, (GLfloat) - 0.706000, + (GLfloat) 0.404859, (GLfloat) 0.040123, (GLfloat) - 0.722453, + (GLfloat) 0.409500, (GLfloat) - 0.005194, (GLfloat) - 0.590500, + (GLfloat) 0.417500, (GLfloat) 0.003052, (GLfloat) - 0.664625, + (GLfloat) 0.500000, (GLfloat) 0.015465, (GLfloat) - 0.721500, + (GLfloat) 0.294000, (GLfloat) 0.016681, (GLfloat) - 0.587500, + (GLfloat) 0.339125, (GLfloat) 0.017896, (GLfloat) - 0.660875, + (GLfloat) 0.582500, (GLfloat) 0.003052, (GLfloat) - 0.664625, + (GLfloat) 0.262344, (GLfloat) 0.077813, (GLfloat) - 0.500000, + (GLfloat) 0.277547, (GLfloat) 0.040123, (GLfloat) - 0.595141, + (GLfloat) 0.325719, (GLfloat) 0.077813, (GLfloat) - 0.325719, + (GLfloat) 0.294000, (GLfloat) 0.016681, (GLfloat) - 0.412500, + (GLfloat) 0.277547, (GLfloat) 0.040123, (GLfloat) - 0.404859, + (GLfloat) 0.409500, (GLfloat) - 0.005194, (GLfloat) - 0.409500, + (GLfloat) 0.335375, (GLfloat) 0.003052, (GLfloat) - 0.417500, + (GLfloat) 0.278500, (GLfloat) 0.015465, (GLfloat) - 0.500000, + (GLfloat) 0.412500, (GLfloat) 0.016681, (GLfloat) - 0.294000, + (GLfloat) 0.339125, (GLfloat) 0.017896, (GLfloat) - 0.339125, + (GLfloat) 0.335375, (GLfloat) 0.003052, (GLfloat) - 0.582500, + (GLfloat) 0.500000, (GLfloat) 0.077813, (GLfloat) - 0.262344, + (GLfloat) 0.404859, (GLfloat) 0.040123, (GLfloat) - 0.277547, + (GLfloat) 0.595141, (GLfloat) 0.040123, (GLfloat) - 0.277547, + (GLfloat) 0.582500, (GLfloat) 0.003052, (GLfloat) - 0.335375, + (GLfloat) 0.500000, (GLfloat) 0.015465, (GLfloat) - 0.278500, + (GLfloat) 0.417500, (GLfloat) 0.003052, (GLfloat) - 0.335375, + (GLfloat) 0.500000, (GLfloat) - 0.007972, (GLfloat) - 0.597750, + (GLfloat) 0.597750, (GLfloat) - 0.007972, (GLfloat) - 0.500000, + (GLfloat) 0.402250, (GLfloat) - 0.007972, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) - 0.007972, (GLfloat) - 0.402250, +}; + +static GLfloat s1_1_normals[] = +{ + (GLfloat) 0.844155, (GLfloat) - 0.175691, (GLfloat) - 0.506493, + (GLfloat) 0.844155, (GLfloat) - 0.175690, (GLfloat) - 0.506493, + (GLfloat) 0.971634, (GLfloat) - 0.172349, (GLfloat) - 0.161939, + (GLfloat) 0.971634, (GLfloat) - 0.172348, (GLfloat) - 0.161939, + (GLfloat) 0.985737, (GLfloat) - 0.023907, (GLfloat) - 0.166587, + (GLfloat) 0.986237, (GLfloat) - 0.017860, (GLfloat) - 0.164373, + (GLfloat) 0.856157, (GLfloat) - 0.009890, (GLfloat) - 0.516621, + (GLfloat) 0.857379, (GLfloat) - 0.016331, (GLfloat) - 0.514427, + (GLfloat) 0.844155, (GLfloat) - 0.175690, (GLfloat) 0.506493, + (GLfloat) 0.844155, (GLfloat) - 0.175690, (GLfloat) 0.506493, + (GLfloat) 0.856157, (GLfloat) - 0.009889, (GLfloat) 0.516621, + (GLfloat) 0.857379, (GLfloat) - 0.016331, (GLfloat) 0.514427, + (GLfloat) 0.985737, (GLfloat) - 0.023907, (GLfloat) 0.166587, + (GLfloat) 0.986237, (GLfloat) - 0.017860, (GLfloat) 0.164373, + (GLfloat) 0.971634, (GLfloat) - 0.172348, (GLfloat) 0.161939, + (GLfloat) 0.971634, (GLfloat) - 0.172348, (GLfloat) 0.161939, + (GLfloat) 0.283621, (GLfloat) 0.936578, (GLfloat) 0.205866, + (GLfloat) 0.264056, (GLfloat) 0.947923, (GLfloat) 0.178092, + (GLfloat) 0.315105, (GLfloat) 0.946548, (GLfloat) 0.068965, + (GLfloat) 0.304029, (GLfloat) 0.949849, (GLfloat) 0.073162, + (GLfloat) 0.783125, (GLfloat) 0.607180, (GLfloat) 0.134346, + (GLfloat) 0.804111, (GLfloat) 0.575131, (GLfloat) 0.150431, + (GLfloat) 0.650208, (GLfloat) 0.649088, (GLfloat) 0.394860, + (GLfloat) 0.665312, (GLfloat) 0.617634, (GLfloat) 0.419391, + (GLfloat) 0.264056, (GLfloat) 0.947923, (GLfloat) - 0.178092, + (GLfloat) 0.283621, (GLfloat) 0.936578, (GLfloat) - 0.205866, + (GLfloat) 0.650207, (GLfloat) 0.649089, (GLfloat) - 0.394860, + (GLfloat) 0.665311, (GLfloat) 0.617634, (GLfloat) - 0.419391, + (GLfloat) 0.804111, (GLfloat) 0.575131, (GLfloat) - 0.150431, + (GLfloat) 0.783125, (GLfloat) 0.607180, (GLfloat) - 0.134346, + (GLfloat) 0.304029, (GLfloat) 0.949849, (GLfloat) - 0.073162, + (GLfloat) 0.315105, (GLfloat) 0.946548, (GLfloat) - 0.068965, + (GLfloat) 0.506493, (GLfloat) - 0.175691, (GLfloat) 0.844155, + (GLfloat) 0.506493, (GLfloat) - 0.175691, (GLfloat) 0.844155, + (GLfloat) 0.161939, (GLfloat) - 0.172349, (GLfloat) 0.971633, + (GLfloat) 0.161939, (GLfloat) - 0.172349, (GLfloat) 0.971633, + (GLfloat) 0.166587, (GLfloat) - 0.023907, (GLfloat) 0.985737, + (GLfloat) 0.164373, (GLfloat) - 0.017860, (GLfloat) 0.986237, + (GLfloat) 0.516622, (GLfloat) - 0.009888, (GLfloat) 0.856157, + (GLfloat) 0.514427, (GLfloat) - 0.016331, (GLfloat) 0.857379, + (GLfloat) - 0.506493, (GLfloat) - 0.175691, (GLfloat) 0.844155, + (GLfloat) - 0.506493, (GLfloat) - 0.175691, (GLfloat) 0.844155, + (GLfloat) - 0.516622, (GLfloat) - 0.009887, (GLfloat) 0.856157, + (GLfloat) - 0.514427, (GLfloat) - 0.016331, (GLfloat) 0.857379, + (GLfloat) - 0.166587, (GLfloat) - 0.023907, (GLfloat) 0.985737, + (GLfloat) - 0.164373, (GLfloat) - 0.017860, (GLfloat) 0.986237, + (GLfloat) - 0.161939, (GLfloat) - 0.172349, (GLfloat) 0.971633, + (GLfloat) - 0.161939, (GLfloat) - 0.172349, (GLfloat) 0.971633, + (GLfloat) - 0.205866, (GLfloat) 0.936578, (GLfloat) 0.283621, + (GLfloat) - 0.178092, (GLfloat) 0.947923, (GLfloat) 0.264055, + (GLfloat) - 0.068965, (GLfloat) 0.946548, (GLfloat) 0.315105, + (GLfloat) - 0.073162, (GLfloat) 0.949849, (GLfloat) 0.304029, + (GLfloat) - 0.134346, (GLfloat) 0.607180, (GLfloat) 0.783125, + (GLfloat) - 0.150431, (GLfloat) 0.575131, (GLfloat) 0.804111, + (GLfloat) - 0.394861, (GLfloat) 0.649087, (GLfloat) 0.650209, + (GLfloat) - 0.419390, (GLfloat) 0.617634, (GLfloat) 0.665312, + (GLfloat) 0.178092, (GLfloat) 0.947923, (GLfloat) 0.264056, + (GLfloat) 0.205866, (GLfloat) 0.936578, (GLfloat) 0.283621, + (GLfloat) 0.394861, (GLfloat) 0.649087, (GLfloat) 0.650208, + (GLfloat) 0.419390, (GLfloat) 0.617634, (GLfloat) 0.665312, + (GLfloat) 0.150431, (GLfloat) 0.575131, (GLfloat) 0.804111, + (GLfloat) 0.134346, (GLfloat) 0.607180, (GLfloat) 0.783125, + (GLfloat) 0.073162, (GLfloat) 0.949849, (GLfloat) 0.304029, + (GLfloat) 0.068965, (GLfloat) 0.946548, (GLfloat) 0.315105, + (GLfloat) - 0.844155, (GLfloat) - 0.175691, (GLfloat) 0.506493, + (GLfloat) - 0.844155, (GLfloat) - 0.175691, (GLfloat) 0.506493, + (GLfloat) - 0.971633, (GLfloat) - 0.172349, (GLfloat) 0.161939, + (GLfloat) - 0.971633, (GLfloat) - 0.172349, (GLfloat) 0.161939, + (GLfloat) - 0.985737, (GLfloat) - 0.023907, (GLfloat) 0.166587, + (GLfloat) - 0.986237, (GLfloat) - 0.017860, (GLfloat) 0.164373, + (GLfloat) - 0.856157, (GLfloat) - 0.009887, (GLfloat) 0.516622, + (GLfloat) - 0.857379, (GLfloat) - 0.016331, (GLfloat) 0.514427, + (GLfloat) - 0.844155, (GLfloat) - 0.175691, (GLfloat) - 0.506493, + (GLfloat) - 0.844155, (GLfloat) - 0.175691, (GLfloat) - 0.506493, + (GLfloat) - 0.856157, (GLfloat) - 0.009888, (GLfloat) - 0.516622, + (GLfloat) - 0.857379, (GLfloat) - 0.016331, (GLfloat) - 0.514427, + (GLfloat) - 0.985737, (GLfloat) - 0.023907, (GLfloat) - 0.166587, + (GLfloat) - 0.986237, (GLfloat) - 0.017860, (GLfloat) - 0.164373, + (GLfloat) - 0.971633, (GLfloat) - 0.172349, (GLfloat) - 0.161939, + (GLfloat) - 0.971633, (GLfloat) - 0.172349, (GLfloat) - 0.161939, + (GLfloat) - 0.283621, (GLfloat) 0.936578, (GLfloat) - 0.205866, + (GLfloat) - 0.264056, (GLfloat) 0.947923, (GLfloat) - 0.178092, + (GLfloat) - 0.315105, (GLfloat) 0.946548, (GLfloat) - 0.068965, + (GLfloat) - 0.304029, (GLfloat) 0.949849, (GLfloat) - 0.073162, + (GLfloat) - 0.783125, (GLfloat) 0.607180, (GLfloat) - 0.134346, + (GLfloat) - 0.804111, (GLfloat) 0.575131, (GLfloat) - 0.150431, + (GLfloat) - 0.650208, (GLfloat) 0.649087, (GLfloat) - 0.394861, + (GLfloat) - 0.665312, (GLfloat) 0.617634, (GLfloat) - 0.419390, + (GLfloat) - 0.264055, (GLfloat) 0.947923, (GLfloat) 0.178092, + (GLfloat) - 0.283621, (GLfloat) 0.936578, (GLfloat) 0.205866, + (GLfloat) - 0.650209, (GLfloat) 0.649087, (GLfloat) 0.394861, + (GLfloat) - 0.665312, (GLfloat) 0.617634, (GLfloat) 0.419390, + (GLfloat) - 0.804111, (GLfloat) 0.575131, (GLfloat) 0.150431, + (GLfloat) - 0.783125, (GLfloat) 0.607180, (GLfloat) 0.134346, + (GLfloat) - 0.304029, (GLfloat) 0.949849, (GLfloat) 0.073162, + (GLfloat) - 0.315105, (GLfloat) 0.946548, (GLfloat) 0.068965, + (GLfloat) - 0.506493, (GLfloat) - 0.175690, (GLfloat) - 0.844155, + (GLfloat) - 0.506493, (GLfloat) - 0.175690, (GLfloat) - 0.844155, + (GLfloat) - 0.161939, (GLfloat) - 0.172348, (GLfloat) - 0.971634, + (GLfloat) - 0.161939, (GLfloat) - 0.172348, (GLfloat) - 0.971634, + (GLfloat) - 0.166587, (GLfloat) - 0.023907, (GLfloat) - 0.985737, + (GLfloat) - 0.164373, (GLfloat) - 0.017860, (GLfloat) - 0.986237, + (GLfloat) - 0.516621, (GLfloat) - 0.009889, (GLfloat) - 0.856157, + (GLfloat) - 0.514427, (GLfloat) - 0.016331, (GLfloat) - 0.857379, + (GLfloat) 0.506493, (GLfloat) - 0.175690, (GLfloat) - 0.844155, + (GLfloat) 0.506493, (GLfloat) - 0.175691, (GLfloat) - 0.844155, + (GLfloat) 0.516621, (GLfloat) - 0.009890, (GLfloat) - 0.856157, + (GLfloat) 0.514427, (GLfloat) - 0.016331, (GLfloat) - 0.857379, + (GLfloat) 0.166587, (GLfloat) - 0.023907, (GLfloat) - 0.985737, + (GLfloat) 0.164373, (GLfloat) - 0.017860, (GLfloat) - 0.986237, + (GLfloat) 0.161939, (GLfloat) - 0.172349, (GLfloat) - 0.971634, + (GLfloat) 0.161939, (GLfloat) - 0.172348, (GLfloat) - 0.971634, + (GLfloat) 0.205866, (GLfloat) 0.936578, (GLfloat) - 0.283621, + (GLfloat) 0.178092, (GLfloat) 0.947923, (GLfloat) - 0.264056, + (GLfloat) 0.068965, (GLfloat) 0.946548, (GLfloat) - 0.315105, + (GLfloat) 0.073162, (GLfloat) 0.949849, (GLfloat) - 0.304029, + (GLfloat) 0.134346, (GLfloat) 0.607180, (GLfloat) - 0.783125, + (GLfloat) 0.150431, (GLfloat) 0.575131, (GLfloat) - 0.804111, + (GLfloat) 0.394860, (GLfloat) 0.649089, (GLfloat) - 0.650207, + (GLfloat) 0.419391, (GLfloat) 0.617634, (GLfloat) - 0.665311, + (GLfloat) - 0.178092, (GLfloat) 0.947923, (GLfloat) - 0.264056, + (GLfloat) - 0.205866, (GLfloat) 0.936578, (GLfloat) - 0.283621, + (GLfloat) - 0.394860, (GLfloat) 0.649088, (GLfloat) - 0.650208, + (GLfloat) - 0.419391, (GLfloat) 0.617634, (GLfloat) - 0.665312, + (GLfloat) - 0.150431, (GLfloat) 0.575131, (GLfloat) - 0.804111, + (GLfloat) - 0.134346, (GLfloat) 0.607180, (GLfloat) - 0.783125, + (GLfloat) - 0.073162, (GLfloat) 0.949849, (GLfloat) - 0.304029, + (GLfloat) - 0.068965, (GLfloat) 0.946548, (GLfloat) - 0.315105, + (GLfloat) 0.135802, (GLfloat) 0.982944, (GLfloat) 0.124011, + (GLfloat) 0.124011, (GLfloat) 0.982944, (GLfloat) 0.135802, + (GLfloat) 0.043834, (GLfloat) 0.993006, (GLfloat) 0.109621, + (GLfloat) 0.039656, (GLfloat) 0.992607, (GLfloat) 0.114709, + (GLfloat) 0.030163, (GLfloat) 0.998998, (GLfloat) 0.033079, + (GLfloat) 0.033079, (GLfloat) 0.998998, (GLfloat) 0.030163, + (GLfloat) 0.109621, (GLfloat) 0.993006, (GLfloat) 0.043834, + (GLfloat) 0.114709, (GLfloat) 0.992607, (GLfloat) 0.039656, + (GLfloat) - 0.124011, (GLfloat) 0.982944, (GLfloat) 0.135803, + (GLfloat) - 0.135803, (GLfloat) 0.982944, (GLfloat) 0.124011, + (GLfloat) - 0.109621, (GLfloat) 0.993006, (GLfloat) 0.043834, + (GLfloat) - 0.114709, (GLfloat) 0.992607, (GLfloat) 0.039656, + (GLfloat) - 0.033079, (GLfloat) 0.998998, (GLfloat) 0.030163, + (GLfloat) - 0.030163, (GLfloat) 0.998998, (GLfloat) 0.033079, + (GLfloat) - 0.043834, (GLfloat) 0.993006, (GLfloat) 0.109621, + (GLfloat) - 0.039656, (GLfloat) 0.992607, (GLfloat) 0.114709, + (GLfloat) - 0.135802, (GLfloat) 0.982944, (GLfloat) - 0.124011, + (GLfloat) - 0.124011, (GLfloat) 0.982944, (GLfloat) - 0.135802, + (GLfloat) - 0.043834, (GLfloat) 0.993006, (GLfloat) - 0.109621, + (GLfloat) - 0.039656, (GLfloat) 0.992607, (GLfloat) - 0.114709, + (GLfloat) - 0.030163, (GLfloat) 0.998998, (GLfloat) - 0.033079, + (GLfloat) - 0.033079, (GLfloat) 0.998998, (GLfloat) - 0.030163, + (GLfloat) - 0.109621, (GLfloat) 0.993006, (GLfloat) - 0.043834, + (GLfloat) - 0.114709, (GLfloat) 0.992607, (GLfloat) - 0.039656, + (GLfloat) 0.124011, (GLfloat) 0.982944, (GLfloat) - 0.135802, + (GLfloat) 0.135802, (GLfloat) 0.982944, (GLfloat) - 0.124011, + (GLfloat) 0.109621, (GLfloat) 0.993006, (GLfloat) - 0.043834, + (GLfloat) 0.114709, (GLfloat) 0.992607, (GLfloat) - 0.039656, + (GLfloat) 0.033079, (GLfloat) 0.998998, (GLfloat) - 0.030163, + (GLfloat) 0.030163, (GLfloat) 0.998998, (GLfloat) - 0.033079, + (GLfloat) 0.043834, (GLfloat) 0.993006, (GLfloat) - 0.109621, + (GLfloat) 0.039656, (GLfloat) 0.992607, (GLfloat) - 0.114709, + (GLfloat) 0.852125, (GLfloat) - 0.111720, (GLfloat) - 0.511275, + (GLfloat) 0.852125, (GLfloat) - 0.111718, (GLfloat) - 0.511276, + (GLfloat) 0.855252, (GLfloat) - 0.072245, (GLfloat) - 0.513151, + (GLfloat) 0.855252, (GLfloat) - 0.072244, (GLfloat) - 0.513152, + (GLfloat) 0.983916, (GLfloat) - 0.070836, (GLfloat) - 0.163986, + (GLfloat) 0.983916, (GLfloat) - 0.070836, (GLfloat) - 0.163986, + (GLfloat) 0.980457, (GLfloat) - 0.109554, (GLfloat) - 0.163409, + (GLfloat) 0.980457, (GLfloat) - 0.109553, (GLfloat) - 0.163410, + (GLfloat) 0.857405, (GLfloat) - 0.014299, (GLfloat) - 0.514444, + (GLfloat) 0.857405, (GLfloat) - 0.014300, (GLfloat) - 0.514443, + (GLfloat) 0.986297, (GLfloat) - 0.014019, (GLfloat) - 0.164382, + (GLfloat) 0.986297, (GLfloat) - 0.014019, (GLfloat) - 0.164382, + (GLfloat) 0.985564, (GLfloat) - 0.041017, (GLfloat) - 0.164261, + (GLfloat) 0.985564, (GLfloat) - 0.041017, (GLfloat) - 0.164260, + (GLfloat) 0.856742, (GLfloat) - 0.041836, (GLfloat) - 0.514045, + (GLfloat) 0.856742, (GLfloat) - 0.041836, (GLfloat) - 0.514045, + (GLfloat) 0.857405, (GLfloat) - 0.014299, (GLfloat) 0.514443, + (GLfloat) 0.857405, (GLfloat) - 0.014299, (GLfloat) 0.514444, + (GLfloat) 0.856742, (GLfloat) - 0.041836, (GLfloat) 0.514045, + (GLfloat) 0.856742, (GLfloat) - 0.041836, (GLfloat) 0.514045, + (GLfloat) 0.985564, (GLfloat) - 0.041017, (GLfloat) 0.164260, + (GLfloat) 0.985564, (GLfloat) - 0.041017, (GLfloat) 0.164261, + (GLfloat) 0.986297, (GLfloat) - 0.014019, (GLfloat) 0.164382, + (GLfloat) 0.986297, (GLfloat) - 0.014019, (GLfloat) 0.164382, + (GLfloat) 0.852125, (GLfloat) - 0.111719, (GLfloat) 0.511275, + (GLfloat) 0.852125, (GLfloat) - 0.111718, (GLfloat) 0.511276, + (GLfloat) 0.980457, (GLfloat) - 0.109553, (GLfloat) 0.163410, + (GLfloat) 0.980457, (GLfloat) - 0.109554, (GLfloat) 0.163409, + (GLfloat) 0.983916, (GLfloat) - 0.070836, (GLfloat) 0.163986, + (GLfloat) 0.983916, (GLfloat) - 0.070836, (GLfloat) 0.163986, + (GLfloat) 0.855252, (GLfloat) - 0.072244, (GLfloat) 0.513152, + (GLfloat) 0.855252, (GLfloat) - 0.072245, (GLfloat) 0.513151, + (GLfloat) - 0.511275, (GLfloat) - 0.111719, (GLfloat) - 0.852125, + (GLfloat) - 0.511276, (GLfloat) - 0.111718, (GLfloat) - 0.852125, + (GLfloat) - 0.513151, (GLfloat) - 0.072245, (GLfloat) - 0.855252, + (GLfloat) - 0.513152, (GLfloat) - 0.072244, (GLfloat) - 0.855252, + (GLfloat) - 0.163986, (GLfloat) - 0.070836, (GLfloat) - 0.983916, + (GLfloat) - 0.163986, (GLfloat) - 0.070836, (GLfloat) - 0.983916, + (GLfloat) - 0.163409, (GLfloat) - 0.109554, (GLfloat) - 0.980457, + (GLfloat) - 0.163410, (GLfloat) - 0.109553, (GLfloat) - 0.980457, + (GLfloat) - 0.514444, (GLfloat) - 0.014299, (GLfloat) - 0.857405, + (GLfloat) - 0.514443, (GLfloat) - 0.014299, (GLfloat) - 0.857405, + (GLfloat) - 0.164382, (GLfloat) - 0.014019, (GLfloat) - 0.986297, + (GLfloat) - 0.164382, (GLfloat) - 0.014019, (GLfloat) - 0.986297, + (GLfloat) - 0.164261, (GLfloat) - 0.041017, (GLfloat) - 0.985564, + (GLfloat) - 0.164260, (GLfloat) - 0.041017, (GLfloat) - 0.985564, + (GLfloat) - 0.514045, (GLfloat) - 0.041836, (GLfloat) - 0.856742, + (GLfloat) - 0.514045, (GLfloat) - 0.041836, (GLfloat) - 0.856742, + (GLfloat) 0.514443, (GLfloat) - 0.014300, (GLfloat) - 0.857405, + (GLfloat) 0.514444, (GLfloat) - 0.014299, (GLfloat) - 0.857405, + (GLfloat) 0.514045, (GLfloat) - 0.041836, (GLfloat) - 0.856742, + (GLfloat) 0.514045, (GLfloat) - 0.041836, (GLfloat) - 0.856742, + (GLfloat) 0.164260, (GLfloat) - 0.041017, (GLfloat) - 0.985564, + (GLfloat) 0.164261, (GLfloat) - 0.041017, (GLfloat) - 0.985564, + (GLfloat) 0.164382, (GLfloat) - 0.014019, (GLfloat) - 0.986297, + (GLfloat) 0.164382, (GLfloat) - 0.014019, (GLfloat) - 0.986297, + (GLfloat) 0.511275, (GLfloat) - 0.111720, (GLfloat) - 0.852125, + (GLfloat) 0.511276, (GLfloat) - 0.111718, (GLfloat) - 0.852125, + (GLfloat) 0.163410, (GLfloat) - 0.109553, (GLfloat) - 0.980457, + (GLfloat) 0.163409, (GLfloat) - 0.109554, (GLfloat) - 0.980457, + (GLfloat) 0.163986, (GLfloat) - 0.070836, (GLfloat) - 0.983916, + (GLfloat) 0.163986, (GLfloat) - 0.070836, (GLfloat) - 0.983916, + (GLfloat) 0.513152, (GLfloat) - 0.072244, (GLfloat) - 0.855252, + (GLfloat) 0.513151, (GLfloat) - 0.072245, (GLfloat) - 0.855252, + (GLfloat) - 0.511275, (GLfloat) - 0.111719, (GLfloat) 0.852125, + (GLfloat) - 0.511275, (GLfloat) - 0.111719, (GLfloat) 0.852125, + (GLfloat) - 0.163410, (GLfloat) - 0.109554, (GLfloat) 0.980457, + (GLfloat) - 0.163409, (GLfloat) - 0.109555, (GLfloat) 0.980457, + (GLfloat) - 0.163986, (GLfloat) - 0.070835, (GLfloat) 0.983916, + (GLfloat) - 0.163986, (GLfloat) - 0.070835, (GLfloat) 0.983916, + (GLfloat) - 0.513151, (GLfloat) - 0.072244, (GLfloat) 0.855252, + (GLfloat) - 0.513151, (GLfloat) - 0.072245, (GLfloat) 0.855252, + (GLfloat) 0.511275, (GLfloat) - 0.111719, (GLfloat) 0.852125, + (GLfloat) 0.511275, (GLfloat) - 0.111719, (GLfloat) 0.852125, + (GLfloat) 0.513151, (GLfloat) - 0.072245, (GLfloat) 0.855252, + (GLfloat) 0.513151, (GLfloat) - 0.072244, (GLfloat) 0.855252, + (GLfloat) 0.163986, (GLfloat) - 0.070835, (GLfloat) 0.983916, + (GLfloat) 0.163986, (GLfloat) - 0.070835, (GLfloat) 0.983916, + (GLfloat) 0.163409, (GLfloat) - 0.109555, (GLfloat) 0.980457, + (GLfloat) 0.163410, (GLfloat) - 0.109554, (GLfloat) 0.980457, + (GLfloat) 0.514444, (GLfloat) - 0.014299, (GLfloat) 0.857405, + (GLfloat) 0.514443, (GLfloat) - 0.014299, (GLfloat) 0.857405, + (GLfloat) 0.164383, (GLfloat) - 0.014019, (GLfloat) 0.986297, + (GLfloat) 0.164383, (GLfloat) - 0.014019, (GLfloat) 0.986297, + (GLfloat) 0.164261, (GLfloat) - 0.041017, (GLfloat) 0.985564, + (GLfloat) 0.164261, (GLfloat) - 0.041017, (GLfloat) 0.985564, + (GLfloat) 0.514045, (GLfloat) - 0.041836, (GLfloat) 0.856742, + (GLfloat) 0.514045, (GLfloat) - 0.041836, (GLfloat) 0.856742, + (GLfloat) - 0.514443, (GLfloat) - 0.014299, (GLfloat) 0.857405, + (GLfloat) - 0.514443, (GLfloat) - 0.014299, (GLfloat) 0.857405, + (GLfloat) - 0.514045, (GLfloat) - 0.041836, (GLfloat) 0.856742, + (GLfloat) - 0.514045, (GLfloat) - 0.041836, (GLfloat) 0.856742, + (GLfloat) - 0.164261, (GLfloat) - 0.041017, (GLfloat) 0.985564, + (GLfloat) - 0.164261, (GLfloat) - 0.041017, (GLfloat) 0.985564, + (GLfloat) - 0.164383, (GLfloat) - 0.014019, (GLfloat) 0.986297, + (GLfloat) - 0.164383, (GLfloat) - 0.014019, (GLfloat) 0.986297, + (GLfloat) - 0.852125, (GLfloat) - 0.111719, (GLfloat) - 0.511275, + (GLfloat) - 0.852125, (GLfloat) - 0.111719, (GLfloat) - 0.511275, + (GLfloat) - 0.980457, (GLfloat) - 0.109554, (GLfloat) - 0.163410, + (GLfloat) - 0.980457, (GLfloat) - 0.109555, (GLfloat) - 0.163409, + (GLfloat) - 0.983916, (GLfloat) - 0.070835, (GLfloat) - 0.163986, + (GLfloat) - 0.983916, (GLfloat) - 0.070835, (GLfloat) - 0.163986, + (GLfloat) - 0.855252, (GLfloat) - 0.072244, (GLfloat) - 0.513151, + (GLfloat) - 0.855252, (GLfloat) - 0.072245, (GLfloat) - 0.513151, + (GLfloat) - 0.852125, (GLfloat) - 0.111719, (GLfloat) 0.511275, + (GLfloat) - 0.852125, (GLfloat) - 0.111719, (GLfloat) 0.511275, + (GLfloat) - 0.855252, (GLfloat) - 0.072245, (GLfloat) 0.513151, + (GLfloat) - 0.855252, (GLfloat) - 0.072244, (GLfloat) 0.513151, + (GLfloat) - 0.983916, (GLfloat) - 0.070835, (GLfloat) 0.163986, + (GLfloat) - 0.983916, (GLfloat) - 0.070835, (GLfloat) 0.163986, + (GLfloat) - 0.980457, (GLfloat) - 0.109555, (GLfloat) 0.163409, + (GLfloat) - 0.980457, (GLfloat) - 0.109554, (GLfloat) 0.163410, + (GLfloat) - 0.857405, (GLfloat) - 0.014299, (GLfloat) 0.514443, + (GLfloat) - 0.857405, (GLfloat) - 0.014299, (GLfloat) 0.514443, + (GLfloat) - 0.986297, (GLfloat) - 0.014019, (GLfloat) 0.164383, + (GLfloat) - 0.986297, (GLfloat) - 0.014019, (GLfloat) 0.164383, + (GLfloat) - 0.985564, (GLfloat) - 0.041017, (GLfloat) 0.164261, + (GLfloat) - 0.985564, (GLfloat) - 0.041017, (GLfloat) 0.164261, + (GLfloat) - 0.856742, (GLfloat) - 0.041836, (GLfloat) 0.514045, + (GLfloat) - 0.856742, (GLfloat) - 0.041836, (GLfloat) 0.514045, + (GLfloat) - 0.857405, (GLfloat) - 0.014299, (GLfloat) - 0.514443, + (GLfloat) - 0.857405, (GLfloat) - 0.014299, (GLfloat) - 0.514444, + (GLfloat) - 0.856742, (GLfloat) - 0.041836, (GLfloat) - 0.514045, + (GLfloat) - 0.856742, (GLfloat) - 0.041836, (GLfloat) - 0.514045, + (GLfloat) - 0.985564, (GLfloat) - 0.041017, (GLfloat) - 0.164261, + (GLfloat) - 0.985564, (GLfloat) - 0.041017, (GLfloat) - 0.164261, + (GLfloat) - 0.986297, (GLfloat) - 0.014019, (GLfloat) - 0.164383, + (GLfloat) - 0.986297, (GLfloat) - 0.014019, (GLfloat) - 0.164383, + (GLfloat) - 0.511714, (GLfloat) 0.103845, (GLfloat) - 0.852857, + (GLfloat) - 0.511715, (GLfloat) 0.103844, (GLfloat) - 0.852857, + (GLfloat) - 0.163545, (GLfloat) 0.101829, (GLfloat) - 0.981267, + (GLfloat) - 0.163544, (GLfloat) 0.101829, (GLfloat) - 0.981267, + (GLfloat) - 0.164038, (GLfloat) 0.066199, (GLfloat) - 0.984230, + (GLfloat) - 0.164039, (GLfloat) 0.066198, (GLfloat) - 0.984230, + (GLfloat) - 0.513322, (GLfloat) 0.067516, (GLfloat) - 0.855536, + (GLfloat) - 0.513322, (GLfloat) 0.067517, (GLfloat) - 0.855536, + (GLfloat) 0.511714, (GLfloat) 0.103845, (GLfloat) - 0.852857, + (GLfloat) 0.511715, (GLfloat) 0.103844, (GLfloat) - 0.852857, + (GLfloat) 0.513322, (GLfloat) 0.067517, (GLfloat) - 0.855536, + (GLfloat) 0.513322, (GLfloat) 0.067516, (GLfloat) - 0.855536, + (GLfloat) 0.164038, (GLfloat) 0.066199, (GLfloat) - 0.984230, + (GLfloat) 0.164039, (GLfloat) 0.066198, (GLfloat) - 0.984230, + (GLfloat) 0.163544, (GLfloat) 0.101829, (GLfloat) - 0.981267, + (GLfloat) 0.163545, (GLfloat) 0.101829, (GLfloat) - 0.981267, + (GLfloat) 0.514446, (GLfloat) 0.013998, (GLfloat) - 0.857409, + (GLfloat) 0.514445, (GLfloat) 0.013999, (GLfloat) - 0.857409, + (GLfloat) 0.164383, (GLfloat) 0.013724, (GLfloat) - 0.986301, + (GLfloat) 0.164383, (GLfloat) 0.013724, (GLfloat) - 0.986301, + (GLfloat) 0.164274, (GLfloat) 0.039013, (GLfloat) - 0.985643, + (GLfloat) 0.164273, (GLfloat) 0.039013, (GLfloat) - 0.985643, + (GLfloat) 0.514088, (GLfloat) 0.039792, (GLfloat) - 0.856814, + (GLfloat) 0.514088, (GLfloat) 0.039792, (GLfloat) - 0.856814, + (GLfloat) - 0.514445, (GLfloat) 0.013999, (GLfloat) - 0.857409, + (GLfloat) - 0.514446, (GLfloat) 0.013998, (GLfloat) - 0.857409, + (GLfloat) - 0.514088, (GLfloat) 0.039792, (GLfloat) - 0.856814, + (GLfloat) - 0.514088, (GLfloat) 0.039792, (GLfloat) - 0.856814, + (GLfloat) - 0.164273, (GLfloat) 0.039013, (GLfloat) - 0.985643, + (GLfloat) - 0.164274, (GLfloat) 0.039013, (GLfloat) - 0.985643, + (GLfloat) - 0.164383, (GLfloat) 0.013724, (GLfloat) - 0.986301, + (GLfloat) - 0.164383, (GLfloat) 0.013724, (GLfloat) - 0.986301, + (GLfloat) - 0.852857, (GLfloat) 0.103845, (GLfloat) - 0.511714, + (GLfloat) - 0.852857, (GLfloat) 0.103845, (GLfloat) - 0.511714, + (GLfloat) - 0.855536, (GLfloat) 0.067516, (GLfloat) - 0.513322, + (GLfloat) - 0.855536, (GLfloat) 0.067516, (GLfloat) - 0.513322, + (GLfloat) - 0.984230, (GLfloat) 0.066198, (GLfloat) - 0.164038, + (GLfloat) - 0.984230, (GLfloat) 0.066198, (GLfloat) - 0.164039, + (GLfloat) - 0.981266, (GLfloat) 0.101830, (GLfloat) - 0.163544, + (GLfloat) - 0.981266, (GLfloat) 0.101829, (GLfloat) - 0.163545, + (GLfloat) - 0.857409, (GLfloat) 0.013998, (GLfloat) - 0.514446, + (GLfloat) - 0.857409, (GLfloat) 0.013999, (GLfloat) - 0.514445, + (GLfloat) - 0.986301, (GLfloat) 0.013724, (GLfloat) - 0.164383, + (GLfloat) - 0.986301, (GLfloat) 0.013724, (GLfloat) - 0.164383, + (GLfloat) - 0.985643, (GLfloat) 0.039013, (GLfloat) - 0.164274, + (GLfloat) - 0.985643, (GLfloat) 0.039013, (GLfloat) - 0.164274, + (GLfloat) - 0.856814, (GLfloat) 0.039792, (GLfloat) - 0.514088, + (GLfloat) - 0.856814, (GLfloat) 0.039792, (GLfloat) - 0.514088, + (GLfloat) - 0.857409, (GLfloat) 0.013999, (GLfloat) 0.514445, + (GLfloat) - 0.857409, (GLfloat) 0.013998, (GLfloat) 0.514446, + (GLfloat) - 0.856814, (GLfloat) 0.039792, (GLfloat) 0.514088, + (GLfloat) - 0.856814, (GLfloat) 0.039792, (GLfloat) 0.514088, + (GLfloat) - 0.985643, (GLfloat) 0.039013, (GLfloat) 0.164274, + (GLfloat) - 0.985643, (GLfloat) 0.039013, (GLfloat) 0.164274, + (GLfloat) - 0.986301, (GLfloat) 0.013724, (GLfloat) 0.164383, + (GLfloat) - 0.986301, (GLfloat) 0.013724, (GLfloat) 0.164383, + (GLfloat) - 0.852857, (GLfloat) 0.103845, (GLfloat) 0.511714, + (GLfloat) - 0.852857, (GLfloat) 0.103845, (GLfloat) 0.511714, + (GLfloat) - 0.981266, (GLfloat) 0.101829, (GLfloat) 0.163545, + (GLfloat) - 0.981266, (GLfloat) 0.101830, (GLfloat) 0.163544, + (GLfloat) - 0.984230, (GLfloat) 0.066198, (GLfloat) 0.164038, + (GLfloat) - 0.984230, (GLfloat) 0.066198, (GLfloat) 0.164039, + (GLfloat) - 0.855536, (GLfloat) 0.067516, (GLfloat) 0.513322, + (GLfloat) - 0.855536, (GLfloat) 0.067516, (GLfloat) 0.513322, + (GLfloat) - 0.511714, (GLfloat) 0.103845, (GLfloat) 0.852857, + (GLfloat) - 0.511714, (GLfloat) 0.103845, (GLfloat) 0.852857, + (GLfloat) - 0.513322, (GLfloat) 0.067516, (GLfloat) 0.855536, + (GLfloat) - 0.513322, (GLfloat) 0.067516, (GLfloat) 0.855536, + (GLfloat) - 0.164038, (GLfloat) 0.066198, (GLfloat) 0.984230, + (GLfloat) - 0.164039, (GLfloat) 0.066198, (GLfloat) 0.984230, + (GLfloat) - 0.163544, (GLfloat) 0.101830, (GLfloat) 0.981266, + (GLfloat) - 0.163545, (GLfloat) 0.101829, (GLfloat) 0.981266, + (GLfloat) - 0.514446, (GLfloat) 0.013998, (GLfloat) 0.857409, + (GLfloat) - 0.514445, (GLfloat) 0.013999, (GLfloat) 0.857409, + (GLfloat) - 0.164383, (GLfloat) 0.013724, (GLfloat) 0.986301, + (GLfloat) - 0.164383, (GLfloat) 0.013724, (GLfloat) 0.986301, + (GLfloat) - 0.164274, (GLfloat) 0.039013, (GLfloat) 0.985643, + (GLfloat) - 0.164274, (GLfloat) 0.039013, (GLfloat) 0.985643, + (GLfloat) - 0.514088, (GLfloat) 0.039792, (GLfloat) 0.856814, + (GLfloat) - 0.514088, (GLfloat) 0.039792, (GLfloat) 0.856814, + (GLfloat) 0.514445, (GLfloat) 0.013999, (GLfloat) 0.857409, + (GLfloat) 0.514446, (GLfloat) 0.013998, (GLfloat) 0.857409, + (GLfloat) 0.514088, (GLfloat) 0.039792, (GLfloat) 0.856814, + (GLfloat) 0.514088, (GLfloat) 0.039792, (GLfloat) 0.856814, + (GLfloat) 0.164274, (GLfloat) 0.039013, (GLfloat) 0.985643, + (GLfloat) 0.164274, (GLfloat) 0.039013, (GLfloat) 0.985643, + (GLfloat) 0.164383, (GLfloat) 0.013724, (GLfloat) 0.986301, + (GLfloat) 0.164383, (GLfloat) 0.013724, (GLfloat) 0.986301, + (GLfloat) 0.511714, (GLfloat) 0.103845, (GLfloat) 0.852857, + (GLfloat) 0.511714, (GLfloat) 0.103845, (GLfloat) 0.852857, + (GLfloat) 0.163545, (GLfloat) 0.101829, (GLfloat) 0.981266, + (GLfloat) 0.163544, (GLfloat) 0.101830, (GLfloat) 0.981266, + (GLfloat) 0.164038, (GLfloat) 0.066198, (GLfloat) 0.984230, + (GLfloat) 0.164039, (GLfloat) 0.066198, (GLfloat) 0.984230, + (GLfloat) 0.513322, (GLfloat) 0.067516, (GLfloat) 0.855536, + (GLfloat) 0.513322, (GLfloat) 0.067516, (GLfloat) 0.855536, + (GLfloat) 0.852857, (GLfloat) 0.103845, (GLfloat) 0.511714, + (GLfloat) 0.852857, (GLfloat) 0.103844, (GLfloat) 0.511715, + (GLfloat) 0.855536, (GLfloat) 0.067517, (GLfloat) 0.513322, + (GLfloat) 0.855536, (GLfloat) 0.067516, (GLfloat) 0.513322, + (GLfloat) 0.984230, (GLfloat) 0.066199, (GLfloat) 0.164038, + (GLfloat) 0.984230, (GLfloat) 0.066198, (GLfloat) 0.164039, + (GLfloat) 0.981267, (GLfloat) 0.101829, (GLfloat) 0.163544, + (GLfloat) 0.981267, (GLfloat) 0.101829, (GLfloat) 0.163545, + (GLfloat) 0.857409, (GLfloat) 0.013998, (GLfloat) 0.514446, + (GLfloat) 0.857409, (GLfloat) 0.013999, (GLfloat) 0.514445, + (GLfloat) 0.986301, (GLfloat) 0.013724, (GLfloat) 0.164383, + (GLfloat) 0.986301, (GLfloat) 0.013724, (GLfloat) 0.164383, + (GLfloat) 0.985643, (GLfloat) 0.039013, (GLfloat) 0.164274, + (GLfloat) 0.985643, (GLfloat) 0.039013, (GLfloat) 0.164273, + (GLfloat) 0.856814, (GLfloat) 0.039792, (GLfloat) 0.514088, + (GLfloat) 0.856814, (GLfloat) 0.039792, (GLfloat) 0.514088, + (GLfloat) 0.857409, (GLfloat) 0.013999, (GLfloat) - 0.514445, + (GLfloat) 0.857409, (GLfloat) 0.013998, (GLfloat) - 0.514446, + (GLfloat) 0.856814, (GLfloat) 0.039792, (GLfloat) - 0.514088, + (GLfloat) 0.856814, (GLfloat) 0.039792, (GLfloat) - 0.514088, + (GLfloat) 0.985643, (GLfloat) 0.039013, (GLfloat) - 0.164273, + (GLfloat) 0.985643, (GLfloat) 0.039013, (GLfloat) - 0.164274, + (GLfloat) 0.986301, (GLfloat) 0.013724, (GLfloat) - 0.164383, + (GLfloat) 0.986301, (GLfloat) 0.013724, (GLfloat) - 0.164383, + (GLfloat) 0.852857, (GLfloat) 0.103845, (GLfloat) - 0.511714, + (GLfloat) 0.852857, (GLfloat) 0.103844, (GLfloat) - 0.511715, + (GLfloat) 0.981267, (GLfloat) 0.101829, (GLfloat) - 0.163545, + (GLfloat) 0.981267, (GLfloat) 0.101829, (GLfloat) - 0.163544, + (GLfloat) 0.984230, (GLfloat) 0.066199, (GLfloat) - 0.164038, + (GLfloat) 0.984230, (GLfloat) 0.066198, (GLfloat) - 0.164039, + (GLfloat) 0.855536, (GLfloat) 0.067516, (GLfloat) - 0.513322, + (GLfloat) 0.855536, (GLfloat) 0.067517, (GLfloat) - 0.513322, + (GLfloat) 0.845633, (GLfloat) 0.165745, (GLfloat) 0.507379, + (GLfloat) 0.845633, (GLfloat) 0.165745, (GLfloat) 0.507379, + (GLfloat) 0.973270, (GLfloat) 0.162582, (GLfloat) 0.162211, + (GLfloat) 0.973270, (GLfloat) 0.162582, (GLfloat) 0.162212, + (GLfloat) 0.985759, (GLfloat) 0.022905, (GLfloat) 0.166594, + (GLfloat) 0.986250, (GLfloat) 0.017105, (GLfloat) 0.164375, + (GLfloat) 0.856160, (GLfloat) 0.009467, (GLfloat) 0.516625, + (GLfloat) 0.857388, (GLfloat) 0.015640, (GLfloat) 0.514433, + (GLfloat) 0.845633, (GLfloat) 0.165745, (GLfloat) - 0.507380, + (GLfloat) 0.845633, (GLfloat) 0.165745, (GLfloat) - 0.507379, + (GLfloat) 0.856160, (GLfloat) 0.009468, (GLfloat) - 0.516624, + (GLfloat) 0.857388, (GLfloat) 0.015640, (GLfloat) - 0.514433, + (GLfloat) 0.985759, (GLfloat) 0.022905, (GLfloat) - 0.166594, + (GLfloat) 0.986250, (GLfloat) 0.017105, (GLfloat) - 0.164375, + (GLfloat) 0.973270, (GLfloat) 0.162582, (GLfloat) - 0.162211, + (GLfloat) 0.973270, (GLfloat) 0.162582, (GLfloat) - 0.162212, + (GLfloat) 0.283621, (GLfloat) - 0.936578, (GLfloat) - 0.205866, + (GLfloat) 0.264056, (GLfloat) - 0.947923, (GLfloat) - 0.178092, + (GLfloat) 0.315105, (GLfloat) - 0.946548, (GLfloat) - 0.068965, + (GLfloat) 0.304029, (GLfloat) - 0.949849, (GLfloat) - 0.073162, + (GLfloat) 0.789686, (GLfloat) - 0.598377, (GLfloat) - 0.135427, + (GLfloat) 0.809934, (GLfloat) - 0.566659, (GLfloat) - 0.151344, + (GLfloat) 0.656717, (GLfloat) - 0.640092, (GLfloat) - 0.398754, + (GLfloat) 0.671170, (GLfloat) - 0.608876, (GLfloat) - 0.422849, + (GLfloat) 0.264055, (GLfloat) - 0.947923, (GLfloat) 0.178092, + (GLfloat) 0.283621, (GLfloat) - 0.936578, (GLfloat) 0.205866, + (GLfloat) 0.656718, (GLfloat) - 0.640092, (GLfloat) 0.398754, + (GLfloat) 0.671170, (GLfloat) - 0.608876, (GLfloat) 0.422849, + (GLfloat) 0.809934, (GLfloat) - 0.566659, (GLfloat) 0.151344, + (GLfloat) 0.789686, (GLfloat) - 0.598377, (GLfloat) 0.135427, + (GLfloat) 0.304029, (GLfloat) - 0.949849, (GLfloat) 0.073162, + (GLfloat) 0.315105, (GLfloat) - 0.946548, (GLfloat) 0.068965, + (GLfloat) 0.507379, (GLfloat) 0.165745, (GLfloat) - 0.845633, + (GLfloat) 0.507380, (GLfloat) 0.165745, (GLfloat) - 0.845633, + (GLfloat) 0.162211, (GLfloat) 0.162582, (GLfloat) - 0.973270, + (GLfloat) 0.162212, (GLfloat) 0.162582, (GLfloat) - 0.973270, + (GLfloat) 0.166594, (GLfloat) 0.022905, (GLfloat) - 0.985759, + (GLfloat) 0.164375, (GLfloat) 0.017105, (GLfloat) - 0.986250, + (GLfloat) 0.516624, (GLfloat) 0.009468, (GLfloat) - 0.856160, + (GLfloat) 0.514433, (GLfloat) 0.015640, (GLfloat) - 0.857388, + (GLfloat) - 0.507379, (GLfloat) 0.165745, (GLfloat) - 0.845633, + (GLfloat) - 0.507379, (GLfloat) 0.165745, (GLfloat) - 0.845633, + (GLfloat) - 0.516625, (GLfloat) 0.009467, (GLfloat) - 0.856160, + (GLfloat) - 0.514433, (GLfloat) 0.015640, (GLfloat) - 0.857388, + (GLfloat) - 0.166594, (GLfloat) 0.022905, (GLfloat) - 0.985759, + (GLfloat) - 0.164375, (GLfloat) 0.017105, (GLfloat) - 0.986250, + (GLfloat) - 0.162211, (GLfloat) 0.162582, (GLfloat) - 0.973270, + (GLfloat) - 0.162212, (GLfloat) 0.162582, (GLfloat) - 0.973270, + (GLfloat) - 0.205866, (GLfloat) - 0.936578, (GLfloat) - 0.283621, + (GLfloat) - 0.178092, (GLfloat) - 0.947923, (GLfloat) - 0.264055, + (GLfloat) - 0.068965, (GLfloat) - 0.946548, (GLfloat) - 0.315105, + (GLfloat) - 0.073162, (GLfloat) - 0.949849, (GLfloat) - 0.304029, + (GLfloat) - 0.135427, (GLfloat) - 0.598377, (GLfloat) - 0.789686, + (GLfloat) - 0.151344, (GLfloat) - 0.566659, (GLfloat) - 0.809934, + (GLfloat) - 0.398754, (GLfloat) - 0.640092, (GLfloat) - 0.656718, + (GLfloat) - 0.422849, (GLfloat) - 0.608876, (GLfloat) - 0.671170, + (GLfloat) 0.178092, (GLfloat) - 0.947923, (GLfloat) - 0.264056, + (GLfloat) 0.205866, (GLfloat) - 0.936578, (GLfloat) - 0.283621, + (GLfloat) 0.398754, (GLfloat) - 0.640092, (GLfloat) - 0.656717, + (GLfloat) 0.422849, (GLfloat) - 0.608876, (GLfloat) - 0.671170, + (GLfloat) 0.151344, (GLfloat) - 0.566659, (GLfloat) - 0.809934, + (GLfloat) 0.135427, (GLfloat) - 0.598377, (GLfloat) - 0.789686, + (GLfloat) 0.073162, (GLfloat) - 0.949849, (GLfloat) - 0.304029, + (GLfloat) 0.068965, (GLfloat) - 0.946548, (GLfloat) - 0.315105, + (GLfloat) - 0.845633, (GLfloat) 0.165746, (GLfloat) - 0.507379, + (GLfloat) - 0.845632, (GLfloat) 0.165746, (GLfloat) - 0.507380, + (GLfloat) - 0.973270, (GLfloat) 0.162582, (GLfloat) - 0.162211, + (GLfloat) - 0.973270, (GLfloat) 0.162582, (GLfloat) - 0.162212, + (GLfloat) - 0.985759, (GLfloat) 0.022905, (GLfloat) - 0.166594, + (GLfloat) - 0.986250, (GLfloat) 0.017105, (GLfloat) - 0.164375, + (GLfloat) - 0.856160, (GLfloat) 0.009467, (GLfloat) - 0.516625, + (GLfloat) - 0.857388, (GLfloat) 0.015640, (GLfloat) - 0.514433, + (GLfloat) - 0.845633, (GLfloat) 0.165746, (GLfloat) 0.507379, + (GLfloat) - 0.845632, (GLfloat) 0.165746, (GLfloat) 0.507380, + (GLfloat) - 0.856159, (GLfloat) 0.009466, (GLfloat) 0.516625, + (GLfloat) - 0.857388, (GLfloat) 0.015640, (GLfloat) 0.514433, + (GLfloat) - 0.985759, (GLfloat) 0.022905, (GLfloat) 0.166594, + (GLfloat) - 0.986250, (GLfloat) 0.017105, (GLfloat) 0.164375, + (GLfloat) - 0.973270, (GLfloat) 0.162582, (GLfloat) 0.162211, + (GLfloat) - 0.973270, (GLfloat) 0.162582, (GLfloat) 0.162212, + (GLfloat) - 0.283620, (GLfloat) - 0.936578, (GLfloat) 0.205866, + (GLfloat) - 0.264055, (GLfloat) - 0.947923, (GLfloat) 0.178091, + (GLfloat) - 0.315105, (GLfloat) - 0.946548, (GLfloat) 0.068965, + (GLfloat) - 0.304029, (GLfloat) - 0.949849, (GLfloat) 0.073162, + (GLfloat) - 0.789686, (GLfloat) - 0.598377, (GLfloat) 0.135427, + (GLfloat) - 0.809934, (GLfloat) - 0.566659, (GLfloat) 0.151344, + (GLfloat) - 0.656718, (GLfloat) - 0.640090, (GLfloat) 0.398755, + (GLfloat) - 0.671170, (GLfloat) - 0.608876, (GLfloat) 0.422848, + (GLfloat) - 0.264055, (GLfloat) - 0.947923, (GLfloat) - 0.178092, + (GLfloat) - 0.283620, (GLfloat) - 0.936578, (GLfloat) - 0.205866, + (GLfloat) - 0.656718, (GLfloat) - 0.640091, (GLfloat) - 0.398755, + (GLfloat) - 0.671170, (GLfloat) - 0.608876, (GLfloat) - 0.422848, + (GLfloat) - 0.809934, (GLfloat) - 0.566659, (GLfloat) - 0.151344, + (GLfloat) - 0.789686, (GLfloat) - 0.598377, (GLfloat) - 0.135427, + (GLfloat) - 0.304029, (GLfloat) - 0.949849, (GLfloat) - 0.073163, + (GLfloat) - 0.315105, (GLfloat) - 0.946548, (GLfloat) - 0.068965, + (GLfloat) - 0.507380, (GLfloat) 0.165746, (GLfloat) 0.845632, + (GLfloat) - 0.507379, (GLfloat) 0.165746, (GLfloat) 0.845633, + (GLfloat) - 0.162211, (GLfloat) 0.162582, (GLfloat) 0.973270, + (GLfloat) - 0.162212, (GLfloat) 0.162582, (GLfloat) 0.973270, + (GLfloat) - 0.166594, (GLfloat) 0.022905, (GLfloat) 0.985759, + (GLfloat) - 0.164375, (GLfloat) 0.017105, (GLfloat) 0.986250, + (GLfloat) - 0.516625, (GLfloat) 0.009466, (GLfloat) 0.856159, + (GLfloat) - 0.514433, (GLfloat) 0.015640, (GLfloat) 0.857388, + (GLfloat) 0.507380, (GLfloat) 0.165746, (GLfloat) 0.845632, + (GLfloat) 0.507379, (GLfloat) 0.165746, (GLfloat) 0.845633, + (GLfloat) 0.516625, (GLfloat) 0.009467, (GLfloat) 0.856160, + (GLfloat) 0.514433, (GLfloat) 0.015640, (GLfloat) 0.857388, + (GLfloat) 0.166594, (GLfloat) 0.022905, (GLfloat) 0.985759, + (GLfloat) 0.164375, (GLfloat) 0.017105, (GLfloat) 0.986250, + (GLfloat) 0.162211, (GLfloat) 0.162582, (GLfloat) 0.973270, + (GLfloat) 0.162212, (GLfloat) 0.162582, (GLfloat) 0.973270, + (GLfloat) 0.205866, (GLfloat) - 0.936578, (GLfloat) 0.283620, + (GLfloat) 0.178092, (GLfloat) - 0.947923, (GLfloat) 0.264055, + (GLfloat) 0.068965, (GLfloat) - 0.946548, (GLfloat) 0.315105, + (GLfloat) 0.073163, (GLfloat) - 0.949849, (GLfloat) 0.304029, + (GLfloat) 0.135427, (GLfloat) - 0.598377, (GLfloat) 0.789686, + (GLfloat) 0.151344, (GLfloat) - 0.566659, (GLfloat) 0.809934, + (GLfloat) 0.398755, (GLfloat) - 0.640091, (GLfloat) 0.656718, + (GLfloat) 0.422848, (GLfloat) - 0.608876, (GLfloat) 0.671170, + (GLfloat) - 0.178091, (GLfloat) - 0.947923, (GLfloat) 0.264055, + (GLfloat) - 0.205866, (GLfloat) - 0.936578, (GLfloat) 0.283620, + (GLfloat) - 0.398755, (GLfloat) - 0.640090, (GLfloat) 0.656718, + (GLfloat) - 0.422848, (GLfloat) - 0.608876, (GLfloat) 0.671170, + (GLfloat) - 0.151344, (GLfloat) - 0.566659, (GLfloat) 0.809934, + (GLfloat) - 0.135427, (GLfloat) - 0.598377, (GLfloat) 0.789686, + (GLfloat) - 0.073162, (GLfloat) - 0.949849, (GLfloat) 0.304029, + (GLfloat) - 0.068965, (GLfloat) - 0.946548, (GLfloat) 0.315105, + (GLfloat) 0.135802, (GLfloat) - 0.982944, (GLfloat) - 0.124011, + (GLfloat) 0.124011, (GLfloat) - 0.982944, (GLfloat) - 0.135802, + (GLfloat) 0.043834, (GLfloat) - 0.993006, (GLfloat) - 0.109621, + (GLfloat) 0.039656, (GLfloat) - 0.992607, (GLfloat) - 0.114709, + (GLfloat) 0.030163, (GLfloat) - 0.998998, (GLfloat) - 0.033079, + (GLfloat) 0.033079, (GLfloat) - 0.998998, (GLfloat) - 0.030163, + (GLfloat) 0.109621, (GLfloat) - 0.993006, (GLfloat) - 0.043834, + (GLfloat) 0.114709, (GLfloat) - 0.992607, (GLfloat) - 0.039656, + (GLfloat) - 0.124011, (GLfloat) - 0.982944, (GLfloat) - 0.135802, + (GLfloat) - 0.135802, (GLfloat) - 0.982944, (GLfloat) - 0.124011, + (GLfloat) - 0.109621, (GLfloat) - 0.993006, (GLfloat) - 0.043834, + (GLfloat) - 0.114709, (GLfloat) - 0.992607, (GLfloat) - 0.039656, + (GLfloat) - 0.033079, (GLfloat) - 0.998998, (GLfloat) - 0.030163, + (GLfloat) - 0.030163, (GLfloat) - 0.998998, (GLfloat) - 0.033079, + (GLfloat) - 0.043834, (GLfloat) - 0.993006, (GLfloat) - 0.109621, + (GLfloat) - 0.039656, (GLfloat) - 0.992607, (GLfloat) - 0.114709, + (GLfloat) - 0.135802, (GLfloat) - 0.982944, (GLfloat) 0.124011, + (GLfloat) - 0.124011, (GLfloat) - 0.982944, (GLfloat) 0.135802, + (GLfloat) - 0.043834, (GLfloat) - 0.993006, (GLfloat) 0.109621, + (GLfloat) - 0.039656, (GLfloat) - 0.992607, (GLfloat) 0.114709, + (GLfloat) - 0.030163, (GLfloat) - 0.998998, (GLfloat) 0.033079, + (GLfloat) - 0.033079, (GLfloat) - 0.998998, (GLfloat) 0.030163, + (GLfloat) - 0.109621, (GLfloat) - 0.993006, (GLfloat) 0.043834, + (GLfloat) - 0.114709, (GLfloat) - 0.992607, (GLfloat) 0.039656, + (GLfloat) 0.124011, (GLfloat) - 0.982944, (GLfloat) 0.135802, + (GLfloat) 0.135802, (GLfloat) - 0.982944, (GLfloat) 0.124011, + (GLfloat) 0.109621, (GLfloat) - 0.993006, (GLfloat) 0.043834, + (GLfloat) 0.114709, (GLfloat) - 0.992607, (GLfloat) 0.039656, + (GLfloat) 0.033079, (GLfloat) - 0.998998, (GLfloat) 0.030163, + (GLfloat) 0.030163, (GLfloat) - 0.998998, (GLfloat) 0.033079, + (GLfloat) 0.043834, (GLfloat) - 0.993006, (GLfloat) 0.109621, + (GLfloat) 0.039656, (GLfloat) - 0.992607, (GLfloat) 0.114709, +}; + +static unsigned short int s1_1_POLS[] = +{ + 3, 12, 76, 74, 1, 3, 12, 74, 82, 1, 3, 76, 22, 78, 1, 3, 78, 74, 76, 1, + 3, 78, 20, 80, 1, 3, 80, 74, 78, 1, 3, 80, 28, 82, 1, 3, 82, 74, 80, 1, + 3, 13, 84, 77, 1, 3, 13, 77, 88, 1, 3, 84, 24, 86, 1, 3, 86, 77, 84, 1, + 3, 86, 20, 78, 1, 3, 78, 77, 86, 1, 3, 78, 22, 88, 1, 3, 88, 77, 78, 1, + 3, 14, 90, 85, 1, 3, 14, 85, 93, 1, 3, 26, 91, 85, 1, 3, 26, 85, 90, 1, + 3, 20, 86, 85, 1, 3, 20, 85, 91, 1, 3, 86, 24, 93, 1, 3, 93, 85, 86, 1, + 3, 15, 95, 79, 1, 3, 15, 79, 97, 1, 3, 95, 28, 80, 1, 3, 80, 79, 95, 1, + 3, 20, 91, 79, 1, 3, 20, 79, 80, 1, 3, 26, 97, 79, 1, 3, 26, 79, 91, 1, + 3, 13, 99, 83, 1, 3, 13, 83, 84, 1, 3, 99, 30, 101, 1, 3, 101, 83, 99, 1, +3, 101, 23, 102, 1, 3, 102, 83, 101, 1, 3, 102, 24, 84, 1, 3, 84, 83, 102, 1, + 3, 16, 104, 100, 1, 3, 16, 100, 108, 1, 3, 104, 32, 106, 1, 3, 106, 100, 104, 1, + 3, 106, 23, 101, 1, 3, 101, 100, 106, 1, 3, 101, 30, 108, 1, 3, 108, 100, 101, 1, + 3, 17, 110, 105, 1, 3, 17, 105, 113, 1, 3, 33, 111, 105, 1, 3, 33, 105, 110, 1, + 3, 23, 106, 105, 1, 3, 23, 105, 111, 1, 3, 106, 32, 113, 1, 3, 113, 105, 106, 1, + 3, 14, 93, 92, 1, 3, 14, 92, 114, 1, 3, 93, 24, 102, 1, 3, 102, 92, 93, 1, + 3, 23, 111, 92, 1, 3, 23, 92, 102, 1, 3, 33, 114, 92, 1, 3, 33, 92, 111, 1, + 3, 16, 116, 103, 1, 3, 16, 103, 104, 1, 3, 116, 35, 118, 1, 3, 118, 103, 116, 1, + 3, 118, 31, 119, 1, 3, 119, 103, 118, 1, 3, 119, 32, 104, 1, 3, 104, 103, 119, 1, + 3, 18, 121, 117, 1, 3, 18, 117, 125, 1, 3, 121, 36, 123, 1, 3, 123, 117, 121, 1, + 3, 123, 31, 118, 1, 3, 118, 117, 123, 1, 3, 118, 35, 125, 1, 3, 125, 117, 118, 1, + 3, 19, 127, 122, 1, 3, 19, 122, 130, 1, 3, 37, 128, 122, 1, 3, 37, 122, 127, 1, + 3, 31, 123, 122, 1, 3, 31, 122, 128, 1, 3, 123, 36, 130, 1, 3, 130, 122, 123, 1, + 3, 17, 113, 112, 1, 3, 17, 112, 131, 1, 3, 113, 32, 119, 1, 3, 119, 112, 113, 1, + 3, 31, 128, 112, 1, 3, 31, 112, 119, 1, 3, 37, 131, 112, 1, 3, 37, 112, 128, 1, + 3, 18, 133, 120, 1, 3, 18, 120, 121, 1, 3, 133, 39, 134, 1, 3, 134, 120, 133, 1, + 3, 134, 27, 135, 1, 3, 135, 120, 134, 1, 3, 135, 36, 121, 1, 3, 121, 120, 135, 1, + 3, 12, 82, 81, 1, 3, 12, 81, 138, 1, 3, 82, 28, 136, 1, 3, 136, 81, 82, 1, + 3, 136, 27, 134, 1, 3, 134, 81, 136, 1, 3, 134, 39, 138, 1, 3, 138, 81, 134, 1, + 3, 15, 139, 94, 1, 3, 15, 94, 95, 1, 3, 40, 140, 94, 1, 3, 40, 94, 139, 1, + 3, 27, 136, 94, 1, 3, 27, 94, 140, 1, 3, 136, 28, 95, 1, 3, 95, 94, 136, 1, + 3, 19, 130, 129, 1, 3, 19, 129, 141, 1, 3, 130, 36, 135, 1, 3, 135, 129, 130, 1, + 3, 27, 140, 129, 1, 3, 27, 129, 135, 1, 3, 40, 141, 129, 1, 3, 40, 129, 140, 1, + 3, 14, 114, 89, 1, 3, 14, 89, 90, 1, 3, 114, 33, 142, 1, 3, 142, 89, 114, 1, + 3, 25, 143, 89, 1, 3, 25, 89, 142, 1, 3, 143, 26, 90, 1, 3, 90, 89, 143, 1, + 3, 17, 131, 109, 1, 3, 17, 109, 110, 1, 3, 131, 37, 144, 1, 3, 144, 109, 131, 1, + 3, 25, 142, 109, 1, 3, 25, 109, 144, 1, 3, 142, 33, 110, 1, 3, 110, 109, 142, 1, + 3, 19, 141, 126, 1, 3, 19, 126, 127, 1, 3, 141, 40, 145, 1, 3, 145, 126, 141, 1, + 3, 25, 144, 126, 1, 3, 25, 126, 145, 1, 3, 144, 37, 127, 1, 3, 127, 126, 144, 1, + 3, 15, 97, 96, 1, 3, 15, 96, 139, 1, 3, 97, 26, 143, 1, 3, 143, 96, 97, 1, +3, 25, 145, 96, 1, 3, 25, 96, 143, 1, 3, 145, 40, 139, 1, 3, 139, 96, 145, 1, + 3, 76, 12, 146, 1, 3, 146, 75, 76, 1, 3, 41, 148, 75, 1, 3, 41, 75, 146, 1, + 3, 148, 21, 149, 1, 3, 149, 75, 148, 1, 3, 22, 76, 75, 1, 3, 22, 75, 149, 1, +3, 8, 151, 147, 1, 3, 8, 147, 155, 1, 3, 151, 43, 153, 1, 3, 153, 147, 151, 1, + 3, 21, 148, 147, 1, 3, 21, 147, 153, 1, 3, 148, 41, 155, 1, 3, 155, 147, 148, 1, + 3, 11, 157, 152, 1, 3, 11, 152, 160, 1, 3, 157, 44, 158, 1, 3, 158, 152, 157, 1, + 3, 21, 153, 152, 1, 3, 21, 152, 158, 1, 3, 153, 43, 160, 1, 3, 160, 152, 153, 1, + 3, 161, 13, 88, 1, 3, 88, 87, 161, 1, 3, 22, 149, 87, 1, 3, 22, 87, 88, 1, +3, 149, 21, 158, 1, 3, 158, 87, 149, 1, 3, 44, 161, 87, 1, 3, 44, 87, 158, 1, + 3, 133, 18, 162, 1, 3, 162, 132, 133, 1, 3, 45, 164, 132, 1, 3, 45, 132, 162, 1, + 3, 164, 38, 165, 1, 3, 165, 132, 164, 1, 3, 39, 133, 132, 1, 3, 39, 132, 165, 1, +3, 9, 167, 163, 1, 3, 9, 163, 170, 1, 3, 167, 47, 168, 1, 3, 168, 163, 167, 1, + 3, 38, 164, 163, 1, 3, 38, 163, 168, 1, 3, 164, 45, 170, 1, 3, 170, 163, 164, 1, +3, 8, 155, 154, 1, 3, 8, 154, 173, 1, 3, 155, 41, 171, 1, 3, 171, 154, 155, 1, + 3, 38, 168, 154, 1, 3, 38, 154, 171, 1, 3, 168, 47, 173, 1, 3, 173, 154, 168, 1, + 3, 146, 12, 138, 1, 3, 138, 137, 146, 1, 3, 39, 165, 137, 1, 3, 39, 137, 138, 1, + 3, 165, 38, 171, 1, 3, 171, 137, 165, 1, 3, 41, 146, 137, 1, 3, 41, 137, 171, 1, + 3, 177, 16, 108, 1, 3, 108, 107, 177, 1, 3, 30, 174, 107, 1, 3, 30, 107, 108, 1, + 3, 174, 29, 176, 1, 3, 176, 107, 174, 1, 3, 50, 177, 107, 1, 3, 50, 107, 176, 1, + 3, 99, 13, 161, 1, 3, 161, 98, 99, 1, 3, 44, 178, 98, 1, 3, 44, 98, 161, 1, + 3, 178, 29, 174, 1, 3, 174, 98, 178, 1, 3, 30, 99, 98, 1, 3, 30, 98, 174, 1, + 3, 11, 180, 156, 1, 3, 11, 156, 157, 1, 3, 180, 49, 181, 1, 3, 181, 156, 180, 1, + 3, 29, 178, 156, 1, 3, 29, 156, 181, 1, 3, 178, 44, 157, 1, 3, 157, 156, 178, 1, + 3, 10, 183, 175, 1, 3, 10, 175, 185, 1, 3, 183, 50, 176, 1, 3, 176, 175, 183, 1, + 3, 29, 181, 175, 1, 3, 29, 175, 176, 1, 3, 181, 49, 185, 1, 3, 185, 175, 181, 1, + 3, 162, 18, 125, 1, 3, 125, 124, 162, 1, 3, 35, 186, 124, 1, 3, 35, 124, 125, 1, + 3, 186, 34, 187, 1, 3, 187, 124, 186, 1, 3, 45, 162, 124, 1, 3, 45, 124, 187, 1, + 3, 116, 16, 177, 1, 3, 177, 115, 116, 1, 3, 50, 188, 115, 1, 3, 50, 115, 177, 1, + 3, 188, 34, 186, 1, 3, 186, 115, 188, 1, 3, 35, 116, 115, 1, 3, 35, 115, 186, 1, + 3, 10, 190, 182, 1, 3, 10, 182, 183, 1, 3, 190, 52, 191, 1, 3, 191, 182, 190, 1, + 3, 34, 188, 182, 1, 3, 34, 182, 191, 1, 3, 188, 50, 183, 1, 3, 183, 182, 188, 1, +3, 9, 170, 169, 1, 3, 9, 169, 193, 1, 3, 170, 45, 187, 1, 3, 187, 169, 170, 1, + 3, 34, 191, 169, 1, 3, 34, 169, 187, 1, 3, 191, 52, 193, 1, 3, 193, 169, 191, 1, + 3, 201, 1, 196, 1, 3, 196, 194, 201, 1, 3, 54, 198, 194, 1, 3, 54, 194, 196, 1, + 3, 198, 46, 199, 1, 3, 199, 194, 198, 1, 3, 56, 201, 194, 1, 3, 56, 194, 199, 1, + 3, 206, 3, 203, 1, 3, 203, 197, 206, 1, 3, 55, 204, 197, 1, 3, 55, 197, 203, 1, + 3, 204, 46, 198, 1, 3, 198, 197, 204, 1, 3, 54, 206, 197, 1, 3, 54, 197, 198, 1, +3, 8, 173, 172, 1, 3, 8, 172, 208, 1, 3, 173, 47, 207, 1, 3, 207, 172, 173, 1, + 3, 46, 204, 172, 1, 3, 46, 172, 207, 1, 3, 204, 55, 208, 1, 3, 208, 172, 204, 1, +3, 9, 209, 166, 1, 3, 9, 166, 167, 1, 3, 209, 56, 199, 1, 3, 199, 166, 209, 1, + 3, 46, 207, 166, 1, 3, 46, 166, 199, 1, 3, 207, 47, 167, 1, 3, 167, 166, 207, 1, + 3, 214, 1, 201, 1, 3, 201, 200, 214, 1, 3, 56, 210, 200, 1, 3, 56, 200, 201, 1, + 3, 210, 51, 212, 1, 3, 212, 200, 210, 1, 3, 59, 214, 200, 1, 3, 59, 200, 212, 1, +3, 9, 193, 192, 1, 3, 9, 192, 209, 1, 3, 193, 52, 215, 1, 3, 215, 192, 193, 1, + 3, 51, 210, 192, 1, 3, 51, 192, 215, 1, 3, 210, 56, 209, 1, 3, 209, 192, 210, 1, + 3, 10, 216, 189, 1, 3, 10, 189, 190, 1, 3, 216, 57, 217, 1, 3, 217, 189, 216, 1, + 3, 51, 215, 189, 1, 3, 51, 189, 217, 1, 3, 215, 52, 190, 1, 3, 190, 189, 215, 1, + 3, 221, 0, 219, 1, 3, 219, 211, 221, 1, 3, 59, 212, 211, 1, 3, 59, 211, 219, 1, + 3, 212, 51, 217, 1, 3, 217, 211, 212, 1, 3, 57, 221, 211, 1, 3, 57, 211, 217, 1, + 3, 226, 0, 221, 1, 3, 221, 220, 226, 1, 3, 57, 222, 220, 1, 3, 57, 220, 221, 1, + 3, 222, 48, 224, 1, 3, 224, 220, 222, 1, 3, 62, 226, 220, 1, 3, 62, 220, 224, 1, + 3, 10, 185, 184, 1, 3, 10, 184, 216, 1, 3, 185, 49, 227, 1, 3, 227, 184, 185, 1, + 3, 48, 222, 184, 1, 3, 48, 184, 227, 1, 3, 222, 57, 216, 1, 3, 216, 184, 222, 1, + 3, 11, 228, 179, 1, 3, 11, 179, 180, 1, 3, 228, 60, 229, 1, 3, 229, 179, 228, 1, + 3, 48, 227, 179, 1, 3, 48, 179, 229, 1, 3, 227, 49, 180, 1, 3, 180, 179, 227, 1, + 3, 233, 2, 231, 1, 3, 231, 223, 233, 1, 3, 62, 224, 223, 1, 3, 62, 223, 231, 1, + 3, 224, 48, 229, 1, 3, 229, 223, 224, 1, 3, 60, 233, 223, 1, 3, 60, 223, 229, 1, + 3, 237, 2, 233, 1, 3, 233, 232, 237, 1, 3, 60, 234, 232, 1, 3, 60, 232, 233, 1, + 3, 234, 42, 235, 1, 3, 235, 232, 234, 1, 3, 64, 237, 232, 1, 3, 64, 232, 235, 1, + 3, 11, 160, 159, 1, 3, 11, 159, 228, 1, 3, 160, 43, 238, 1, 3, 238, 159, 160, 1, + 3, 42, 234, 159, 1, 3, 42, 159, 238, 1, 3, 234, 60, 228, 1, 3, 228, 159, 234, 1, +3, 8, 208, 150, 1, 3, 8, 150, 151, 1, 3, 208, 55, 239, 1, 3, 239, 150, 208, 1, + 3, 42, 238, 150, 1, 3, 42, 150, 239, 1, 3, 238, 43, 151, 1, 3, 151, 150, 238, 1, + 3, 203, 3, 241, 1, 3, 241, 202, 203, 1, 3, 64, 235, 202, 1, 3, 64, 202, 241, 1, + 3, 235, 42, 239, 1, 3, 239, 202, 235, 1, 3, 55, 203, 202, 1, 3, 55, 202, 239, 1, +3, 2, 237, 236, 1, 3, 2, 236, 245, 1, 3, 237, 64, 242, 1, 3, 242, 236, 237, 1, + 3, 242, 63, 244, 1, 3, 244, 236, 242, 1, 3, 244, 68, 245, 1, 3, 245, 236, 244, 1, +3, 3, 246, 240, 1, 3, 3, 240, 241, 1, 3, 246, 65, 248, 1, 3, 248, 240, 246, 1, + 3, 248, 63, 242, 1, 3, 242, 240, 248, 1, 3, 242, 64, 241, 1, 3, 241, 240, 242, 1, +3, 4, 250, 247, 1, 3, 4, 247, 253, 1, 3, 67, 251, 247, 1, 3, 67, 247, 250, 1, + 3, 63, 248, 247, 1, 3, 63, 247, 251, 1, 3, 248, 65, 253, 1, 3, 253, 247, 248, 1, +3, 7, 255, 243, 1, 3, 7, 243, 257, 1, 3, 255, 68, 244, 1, 3, 244, 243, 255, 1, + 3, 63, 251, 243, 1, 3, 63, 243, 244, 1, 3, 67, 257, 243, 1, 3, 67, 243, 251, 1, +3, 3, 206, 205, 1, 3, 3, 205, 246, 1, 3, 206, 54, 258, 1, 3, 258, 205, 206, 1, + 3, 258, 53, 259, 1, 3, 259, 205, 258, 1, 3, 259, 65, 246, 1, 3, 246, 205, 259, 1, +3, 1, 260, 195, 1, 3, 1, 195, 196, 1, 3, 260, 69, 262, 1, 3, 262, 195, 260, 1, + 3, 262, 53, 258, 1, 3, 258, 195, 262, 1, 3, 258, 54, 196, 1, 3, 196, 195, 258, 1, +3, 5, 264, 261, 1, 3, 5, 261, 267, 1, 3, 70, 265, 261, 1, 3, 70, 261, 264, 1, + 3, 53, 262, 261, 1, 3, 53, 261, 265, 1, 3, 262, 69, 267, 1, 3, 267, 261, 262, 1, +3, 4, 253, 252, 1, 3, 4, 252, 268, 1, 3, 253, 65, 259, 1, 3, 259, 252, 253, 1, + 3, 53, 265, 252, 1, 3, 53, 252, 259, 1, 3, 70, 268, 252, 1, 3, 70, 252, 265, 1, +3, 1, 214, 213, 1, 3, 1, 213, 260, 1, 3, 214, 59, 269, 1, 3, 269, 213, 214, 1, + 3, 269, 58, 270, 1, 3, 270, 213, 269, 1, 3, 270, 69, 260, 1, 3, 260, 213, 270, 1, +3, 0, 271, 218, 1, 3, 0, 218, 219, 1, 3, 271, 71, 273, 1, 3, 273, 218, 271, 1, + 3, 273, 58, 269, 1, 3, 269, 218, 273, 1, 3, 269, 59, 219, 1, 3, 219, 218, 269, 1, +3, 6, 275, 272, 1, 3, 6, 272, 278, 1, 3, 72, 276, 272, 1, 3, 72, 272, 275, 1, + 3, 58, 273, 272, 1, 3, 58, 272, 276, 1, 3, 273, 71, 278, 1, 3, 278, 272, 273, 1, +3, 5, 267, 266, 1, 3, 5, 266, 279, 1, 3, 267, 69, 270, 1, 3, 270, 266, 267, 1, + 3, 58, 276, 266, 1, 3, 58, 266, 270, 1, 3, 72, 279, 266, 1, 3, 72, 266, 276, 1, +3, 0, 226, 225, 1, 3, 0, 225, 271, 1, 3, 226, 62, 280, 1, 3, 280, 225, 226, 1, + 3, 280, 61, 281, 1, 3, 281, 225, 280, 1, 3, 281, 71, 271, 1, 3, 271, 225, 281, 1, +3, 2, 245, 230, 1, 3, 2, 230, 231, 1, 3, 245, 68, 282, 1, 3, 282, 230, 245, 1, + 3, 282, 61, 280, 1, 3, 280, 230, 282, 1, 3, 280, 62, 231, 1, 3, 231, 230, 280, 1, +3, 7, 283, 254, 1, 3, 7, 254, 255, 1, 3, 73, 284, 254, 1, 3, 73, 254, 283, 1, + 3, 61, 282, 254, 1, 3, 61, 254, 284, 1, 3, 282, 68, 255, 1, 3, 255, 254, 282, 1, +3, 6, 278, 277, 1, 3, 6, 277, 285, 1, 3, 278, 71, 281, 1, 3, 281, 277, 278, 1, + 3, 61, 284, 277, 1, 3, 61, 277, 281, 1, 3, 73, 285, 277, 1, 3, 73, 277, 284, 1, +3, 4, 268, 249, 1, 3, 4, 249, 250, 1, 3, 268, 70, 286, 1, 3, 286, 249, 268, 1, + 3, 66, 287, 249, 1, 3, 66, 249, 286, 1, 3, 287, 67, 250, 1, 3, 250, 249, 287, 1, +3, 5, 279, 263, 1, 3, 5, 263, 264, 1, 3, 279, 72, 288, 1, 3, 288, 263, 279, 1, + 3, 66, 286, 263, 1, 3, 66, 263, 288, 1, 3, 286, 70, 264, 1, 3, 264, 263, 286, 1, +3, 6, 285, 274, 1, 3, 6, 274, 275, 1, 3, 285, 73, 289, 1, 3, 289, 274, 285, 1, + 3, 66, 288, 274, 1, 3, 66, 274, 289, 1, 3, 288, 72, 275, 1, 3, 275, 274, 288, 1, +3, 7, 257, 256, 1, 3, 7, 256, 283, 1, 3, 257, 67, 287, 1, 3, 287, 256, 257, 1, + 3, 66, 289, 256, 1, 3, 66, 256, 287, 1, 3, 289, 73, 283, 1, 3, 283, 256, 289, 1, + + 0 +}; + +struct lwo LWO_s1_1 = +{ + 290, /* number of points */ + s1_1_PNTS, s1_1_normals, s1_1_POLS, 0L +}; + +#endif /* USE_GL */ + +/* End of s1_1.c */ diff --git a/hacks/glx/s1_2.c b/hacks/glx/s1_2.c new file mode 100644 index 00000000..068a5a4e --- /dev/null +++ b/hacks/glx/s1_2.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_2.c 4.2 97/04/20 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render "s1_2" in 3D. + * + * Generated by lw2ogl. Link this with your program but do + * not edit by hand. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat s1_2_PNTS[] = +{ + (GLfloat) 0.316229, (GLfloat) 0.114342, (GLfloat) - 0.309219, + (GLfloat) 0.316229, (GLfloat) 0.114342, (GLfloat) - 0.690781, + (GLfloat) 0.697100, (GLfloat) 0.103031, (GLfloat) - 0.309219, + (GLfloat) 0.697100, (GLfloat) 0.103031, (GLfloat) - 0.690781, + (GLfloat) 0.638667, (GLfloat) 0.007537, (GLfloat) - 0.638667, + (GLfloat) 0.361333, (GLfloat) 0.007537, (GLfloat) - 0.638667, + (GLfloat) 0.361333, (GLfloat) 0.007537, (GLfloat) - 0.361333, + (GLfloat) 0.638667, (GLfloat) 0.007537, (GLfloat) - 0.361333, + (GLfloat) 0.813840, (GLfloat) 0.310563, (GLfloat) - 0.755750, + (GLfloat) 0.308193, (GLfloat) 0.377118, (GLfloat) - 0.755750, + (GLfloat) 0.308193, (GLfloat) 0.377118, (GLfloat) - 0.244250, + (GLfloat) 0.813840, (GLfloat) 0.310563, (GLfloat) - 0.244250, + (GLfloat) 0.865458, (GLfloat) 0.513412, (GLfloat) - 0.690781, + (GLfloat) 0.865458, (GLfloat) 0.513412, (GLfloat) - 0.309219, + (GLfloat) 0.858509, (GLfloat) 0.615264, (GLfloat) - 0.361333, + (GLfloat) 0.858509, (GLfloat) 0.615264, (GLfloat) - 0.638667, + (GLfloat) 0.500319, (GLfloat) 0.618731, (GLfloat) - 0.309219, + (GLfloat) 0.596285, (GLfloat) 0.705555, (GLfloat) - 0.361333, + (GLfloat) 0.500319, (GLfloat) 0.618731, (GLfloat) - 0.690781, + (GLfloat) 0.596285, (GLfloat) 0.705555, (GLfloat) - 0.638667, + (GLfloat) 0.945338, (GLfloat) 0.554869, (GLfloat) - 0.500000, + (GLfloat) 0.927845, (GLfloat) 0.404808, (GLfloat) - 0.500000, + (GLfloat) 0.931847, (GLfloat) 0.494263, (GLfloat) - 0.500000, + (GLfloat) 0.716506, (GLfloat) 0.632271, (GLfloat) - 0.258297, + (GLfloat) 0.883750, (GLfloat) 0.575062, (GLfloat) - 0.323141, + (GLfloat) 0.733407, (GLfloat) 0.677865, (GLfloat) - 0.500000, + (GLfloat) 0.897467, (GLfloat) 0.608935, (GLfloat) - 0.500000, + (GLfloat) 0.716506, (GLfloat) 0.632271, (GLfloat) - 0.741703, + (GLfloat) 0.883750, (GLfloat) 0.575062, (GLfloat) - 0.676859, + (GLfloat) 0.622584, (GLfloat) 0.465571, (GLfloat) - 0.187109, + (GLfloat) 0.682889, (GLfloat) 0.566071, (GLfloat) - 0.239844, + (GLfloat) 0.487673, (GLfloat) 0.709673, (GLfloat) - 0.500000, + (GLfloat) 0.548866, (GLfloat) 0.688331, (GLfloat) - 0.323141, + (GLfloat) 0.729578, (GLfloat) 0.666743, (GLfloat) - 0.322437, + (GLfloat) 0.317323, (GLfloat) 0.526334, (GLfloat) - 0.500000, + (GLfloat) 0.433930, (GLfloat) 0.637880, (GLfloat) - 0.500000, + (GLfloat) 0.548866, (GLfloat) 0.688331, (GLfloat) - 0.676859, + (GLfloat) 0.561689, (GLfloat) 0.724552, (GLfloat) - 0.500000, + (GLfloat) 0.622584, (GLfloat) 0.465571, (GLfloat) - 0.812891, + (GLfloat) 0.682889, (GLfloat) 0.566071, (GLfloat) - 0.760156, + (GLfloat) 0.729578, (GLfloat) 0.666743, (GLfloat) - 0.677562, + (GLfloat) 0.846442, (GLfloat) 0.421012, (GLfloat) - 0.729453, + (GLfloat) 0.835067, (GLfloat) 0.192357, (GLfloat) - 0.500000, + (GLfloat) 0.905776, (GLfloat) 0.298462, (GLfloat) - 0.500000, + (GLfloat) 0.846442, (GLfloat) 0.421012, (GLfloat) - 0.270547, + (GLfloat) 0.398726, (GLfloat) 0.510130, (GLfloat) - 0.729453, + (GLfloat) 0.523830, (GLfloat) 0.217409, (GLfloat) - 0.812891, + (GLfloat) 0.561017, (GLfloat) 0.343841, (GLfloat) - 0.848750, + (GLfloat) 0.523830, (GLfloat) 0.217409, (GLfloat) - 0.187109, + (GLfloat) 0.561017, (GLfloat) 0.343841, (GLfloat) - 0.151250, + (GLfloat) 0.398726, (GLfloat) 0.510130, (GLfloat) - 0.270547, + (GLfloat) 0.212593, (GLfloat) 0.242461, (GLfloat) - 0.500000, + (GLfloat) 0.216258, (GLfloat) 0.389219, (GLfloat) - 0.500000, + (GLfloat) 0.500666, (GLfloat) 0.037435, (GLfloat) - 0.741703, + (GLfloat) 0.506665, (GLfloat) 0.108686, (GLfloat) - 0.760156, + (GLfloat) 0.752070, (GLfloat) 0.199038, (GLfloat) - 0.729453, + (GLfloat) 0.295589, (GLfloat) 0.235781, (GLfloat) - 0.729453, + (GLfloat) 0.295589, (GLfloat) 0.235781, (GLfloat) - 0.270547, + (GLfloat) 0.259010, (GLfloat) 0.038206, (GLfloat) - 0.500000, + (GLfloat) 0.246980, (GLfloat) 0.116398, (GLfloat) - 0.500000, + (GLfloat) 0.752070, (GLfloat) 0.199038, (GLfloat) - 0.270547, + (GLfloat) 0.500666, (GLfloat) 0.037435, (GLfloat) - 0.258297, + (GLfloat) 0.506665, (GLfloat) 0.108686, (GLfloat) - 0.239844, + (GLfloat) 0.742322, (GLfloat) 0.036664, (GLfloat) - 0.500000, + (GLfloat) 0.766349, (GLfloat) 0.100974, (GLfloat) - 0.500000, + (GLfloat) 0.677491, (GLfloat) 0.037477, (GLfloat) - 0.676859, + (GLfloat) 0.500000, (GLfloat) - 0.010924, (GLfloat) - 0.500000, + (GLfloat) 0.677562, (GLfloat) 0.000839, (GLfloat) - 0.500000, + (GLfloat) 0.677491, (GLfloat) 0.037477, (GLfloat) - 0.323141, + (GLfloat) 0.323842, (GLfloat) 0.038608, (GLfloat) - 0.676859, + (GLfloat) 0.500000, (GLfloat) 0.000839, (GLfloat) - 0.677562, + (GLfloat) 0.323842, (GLfloat) 0.038608, (GLfloat) - 0.323141, + (GLfloat) 0.322437, (GLfloat) 0.000839, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) 0.000839, (GLfloat) - 0.322437, + (GLfloat) 0.925000, (GLfloat) 0.532253, (GLfloat) - 0.600125, + (GLfloat) 0.911045, (GLfloat) 0.457192, (GLfloat) - 0.613625, + (GLfloat) 0.915250, (GLfloat) 0.499050, (GLfloat) - 0.604062, + (GLfloat) 0.925000, (GLfloat) 0.532253, (GLfloat) - 0.399875, + (GLfloat) 0.940858, (GLfloat) 0.527164, (GLfloat) - 0.500000, + (GLfloat) 0.919197, (GLfloat) 0.584697, (GLfloat) - 0.587500, + (GLfloat) 0.929810, (GLfloat) 0.559801, (GLfloat) - 0.596406, + (GLfloat) 0.798138, (GLfloat) 0.572966, (GLfloat) - 0.733625, + (GLfloat) 0.877427, (GLfloat) 0.547520, (GLfloat) - 0.683563, + (GLfloat) 0.798138, (GLfloat) 0.572966, (GLfloat) - 0.266375, + (GLfloat) 0.877427, (GLfloat) 0.547520, (GLfloat) - 0.316437, + (GLfloat) 0.919197, (GLfloat) 0.584697, (GLfloat) - 0.412500, + (GLfloat) 0.929810, (GLfloat) 0.559801, (GLfloat) - 0.403594, + (GLfloat) 0.911045, (GLfloat) 0.457192, (GLfloat) - 0.386375, + (GLfloat) 0.915250, (GLfloat) 0.499050, (GLfloat) - 0.395938, + (GLfloat) 0.817112, (GLfloat) 0.642984, (GLfloat) - 0.409500, + (GLfloat) 0.884513, (GLfloat) 0.611054, (GLfloat) - 0.417500, + (GLfloat) 0.934249, (GLfloat) 0.580800, (GLfloat) - 0.500000, + (GLfloat) 0.807153, (GLfloat) 0.623277, (GLfloat) - 0.294000, + (GLfloat) 0.876135, (GLfloat) 0.598240, (GLfloat) - 0.339125, + (GLfloat) 0.807153, (GLfloat) 0.623277, (GLfloat) - 0.706000, + (GLfloat) 0.876135, (GLfloat) 0.598240, (GLfloat) - 0.660875, + (GLfloat) 0.817112, (GLfloat) 0.642984, (GLfloat) - 0.590500, + (GLfloat) 0.884513, (GLfloat) 0.611054, (GLfloat) - 0.582500, + (GLfloat) 0.764624, (GLfloat) 0.492766, (GLfloat) - 0.234875, + (GLfloat) 0.782472, (GLfloat) 0.537348, (GLfloat) - 0.257187, + (GLfloat) 0.607846, (GLfloat) 0.634036, (GLfloat) - 0.266375, + (GLfloat) 0.702992, (GLfloat) 0.603501, (GLfloat) - 0.249687, + (GLfloat) 0.807680, (GLfloat) 0.601112, (GLfloat) - 0.274594, + (GLfloat) 0.480984, (GLfloat) 0.674750, (GLfloat) - 0.399875, + (GLfloat) 0.528557, (GLfloat) 0.659482, (GLfloat) - 0.316437, + (GLfloat) 0.641688, (GLfloat) 0.680252, (GLfloat) - 0.294000, + (GLfloat) 0.625134, (GLfloat) 0.662855, (GLfloat) - 0.274594, + (GLfloat) 0.544994, (GLfloat) 0.546127, (GLfloat) - 0.234875, + (GLfloat) 0.583305, (GLfloat) 0.594795, (GLfloat) - 0.257187, + (GLfloat) 0.645973, (GLfloat) 0.701912, (GLfloat) - 0.409500, + (GLfloat) 0.650852, (GLfloat) 0.691510, (GLfloat) - 0.335375, + (GLfloat) 0.724816, (GLfloat) 0.652913, (GLfloat) - 0.278500, + (GLfloat) 0.529644, (GLfloat) 0.718831, (GLfloat) - 0.412500, + (GLfloat) 0.571915, (GLfloat) 0.702991, (GLfloat) - 0.339125, + (GLfloat) 0.806863, (GLfloat) 0.637791, (GLfloat) - 0.335375, + (GLfloat) 0.398573, (GLfloat) 0.581701, (GLfloat) - 0.386375, + (GLfloat) 0.450527, (GLfloat) 0.633092, (GLfloat) - 0.395938, + (GLfloat) 0.480984, (GLfloat) 0.674750, (GLfloat) - 0.600125, + (GLfloat) 0.465127, (GLfloat) 0.679839, (GLfloat) - 0.500000, + (GLfloat) 0.503003, (GLfloat) 0.704166, (GLfloat) - 0.403594, + (GLfloat) 0.607846, (GLfloat) 0.634036, (GLfloat) - 0.733625, + (GLfloat) 0.528557, (GLfloat) 0.659482, (GLfloat) - 0.683563, + (GLfloat) 0.529644, (GLfloat) 0.718831, (GLfloat) - 0.587500, + (GLfloat) 0.503003, (GLfloat) 0.704166, (GLfloat) - 0.596406, + (GLfloat) 0.398573, (GLfloat) 0.581701, (GLfloat) - 0.613625, + (GLfloat) 0.450527, (GLfloat) 0.633092, (GLfloat) - 0.604062, + (GLfloat) 0.645973, (GLfloat) 0.701912, (GLfloat) - 0.590500, + (GLfloat) 0.573201, (GLfloat) 0.718247, (GLfloat) - 0.582500, + (GLfloat) 0.515384, (GLfloat) 0.725027, (GLfloat) - 0.500000, + (GLfloat) 0.641688, (GLfloat) 0.680252, (GLfloat) - 0.706000, + (GLfloat) 0.571915, (GLfloat) 0.702991, (GLfloat) - 0.660875, + (GLfloat) 0.573201, (GLfloat) 0.718247, (GLfloat) - 0.417500, + (GLfloat) 0.544994, (GLfloat) 0.546127, (GLfloat) - 0.765125, + (GLfloat) 0.583305, (GLfloat) 0.594795, (GLfloat) - 0.742813, + (GLfloat) 0.702992, (GLfloat) 0.603501, (GLfloat) - 0.750313, + (GLfloat) 0.625134, (GLfloat) 0.662855, (GLfloat) - 0.725406, + (GLfloat) 0.807680, (GLfloat) 0.601112, (GLfloat) - 0.725406, + (GLfloat) 0.764624, (GLfloat) 0.492766, (GLfloat) - 0.765125, + (GLfloat) 0.782472, (GLfloat) 0.537348, (GLfloat) - 0.742813, + (GLfloat) 0.806863, (GLfloat) 0.637791, (GLfloat) - 0.664625, + (GLfloat) 0.724816, (GLfloat) 0.652913, (GLfloat) - 0.721500, + (GLfloat) 0.650852, (GLfloat) 0.691510, (GLfloat) - 0.664625, + (GLfloat) 0.732447, (GLfloat) 0.675074, (GLfloat) - 0.402250, + (GLfloat) 0.824871, (GLfloat) 0.643250, (GLfloat) - 0.500000, + (GLfloat) 0.640022, (GLfloat) 0.706898, (GLfloat) - 0.500000, + (GLfloat) 0.732447, (GLfloat) 0.675074, (GLfloat) - 0.597750, + (GLfloat) 0.856137, (GLfloat) 0.470533, (GLfloat) - 0.708313, + (GLfloat) 0.899707, (GLfloat) 0.356231, (GLfloat) - 0.635000, + (GLfloat) 0.907494, (GLfloat) 0.408859, (GLfloat) - 0.625156, + (GLfloat) 0.929348, (GLfloat) 0.452746, (GLfloat) - 0.500000, + (GLfloat) 0.851860, (GLfloat) 0.246808, (GLfloat) - 0.635000, + (GLfloat) 0.882792, (GLfloat) 0.301487, (GLfloat) - 0.639500, + (GLfloat) 0.899707, (GLfloat) 0.356231, (GLfloat) - 0.365000, + (GLfloat) 0.921826, (GLfloat) 0.352648, (GLfloat) - 0.500000, + (GLfloat) 0.722756, (GLfloat) 0.384892, (GLfloat) - 0.815000, + (GLfloat) 0.833350, (GLfloat) 0.366979, (GLfloat) - 0.747500, + (GLfloat) 0.722756, (GLfloat) 0.384892, (GLfloat) - 0.185000, + (GLfloat) 0.833350, (GLfloat) 0.366979, (GLfloat) - 0.252500, + (GLfloat) 0.907494, (GLfloat) 0.408859, (GLfloat) - 0.374844, + (GLfloat) 0.851860, (GLfloat) 0.246808, (GLfloat) - 0.365000, + (GLfloat) 0.882792, (GLfloat) 0.301487, (GLfloat) - 0.360500, + (GLfloat) 0.856137, (GLfloat) 0.470533, (GLfloat) - 0.291687, + (GLfloat) 0.453481, (GLfloat) 0.568361, (GLfloat) - 0.708313, + (GLfloat) 0.457330, (GLfloat) 0.427884, (GLfloat) - 0.815000, + (GLfloat) 0.500479, (GLfloat) 0.489876, (GLfloat) - 0.792031, + (GLfloat) 0.654809, (GLfloat) 0.519447, (GLfloat) - 0.784063, + (GLfloat) 0.405397, (GLfloat) 0.294044, (GLfloat) - 0.815000, + (GLfloat) 0.423113, (GLfloat) 0.361992, (GLfloat) - 0.825500, + (GLfloat) 0.590043, (GLfloat) 0.406388, (GLfloat) - 0.837500, + (GLfloat) 0.280379, (GLfloat) 0.456545, (GLfloat) - 0.635000, + (GLfloat) 0.346736, (GLfloat) 0.445797, (GLfloat) - 0.747500, + (GLfloat) 0.744688, (GLfloat) 0.441266, (GLfloat) - 0.792031, + (GLfloat) 0.673275, (GLfloat) 0.265703, (GLfloat) - 0.815000, + (GLfloat) 0.698920, (GLfloat) 0.325689, (GLfloat) - 0.825500, + (GLfloat) 0.654809, (GLfloat) 0.519447, (GLfloat) - 0.215937, + (GLfloat) 0.457330, (GLfloat) 0.427884, (GLfloat) - 0.185000, + (GLfloat) 0.500479, (GLfloat) 0.489876, (GLfloat) - 0.207969, + (GLfloat) 0.453481, (GLfloat) 0.568361, (GLfloat) - 0.291687, + (GLfloat) 0.744688, (GLfloat) 0.441266, (GLfloat) - 0.207969, + (GLfloat) 0.673275, (GLfloat) 0.265703, (GLfloat) - 0.185000, + (GLfloat) 0.698920, (GLfloat) 0.325689, (GLfloat) - 0.174500, + (GLfloat) 0.590043, (GLfloat) 0.406388, (GLfloat) - 0.162500, + (GLfloat) 0.280379, (GLfloat) 0.456545, (GLfloat) - 0.365000, + (GLfloat) 0.346736, (GLfloat) 0.445797, (GLfloat) - 0.252500, + (GLfloat) 0.405397, (GLfloat) 0.294044, (GLfloat) - 0.185000, + (GLfloat) 0.423113, (GLfloat) 0.361992, (GLfloat) - 0.174500, + (GLfloat) 0.380271, (GLfloat) 0.586148, (GLfloat) - 0.500000, + (GLfloat) 0.337674, (GLfloat) 0.522283, (GLfloat) - 0.625156, + (GLfloat) 0.337674, (GLfloat) 0.522283, (GLfloat) - 0.374844, + (GLfloat) 0.226812, (GLfloat) 0.312938, (GLfloat) - 0.365000, + (GLfloat) 0.239242, (GLfloat) 0.386194, (GLfloat) - 0.360500, + (GLfloat) 0.258260, (GLfloat) 0.460127, (GLfloat) - 0.500000, + (GLfloat) 0.226812, (GLfloat) 0.312938, (GLfloat) - 0.635000, + (GLfloat) 0.239242, (GLfloat) 0.386194, (GLfloat) - 0.639500, + (GLfloat) 0.400082, (GLfloat) 0.165542, (GLfloat) - 0.765125, + (GLfloat) 0.402616, (GLfloat) 0.069508, (GLfloat) - 0.733625, + (GLfloat) 0.402791, (GLfloat) 0.111771, (GLfloat) - 0.742813, + (GLfloat) 0.626577, (GLfloat) 0.153203, (GLfloat) - 0.765125, + (GLfloat) 0.513329, (GLfloat) 0.159372, (GLfloat) - 0.784063, + (GLfloat) 0.399335, (GLfloat) 0.227430, (GLfloat) - 0.792031, + (GLfloat) 0.249085, (GLfloat) 0.173768, (GLfloat) - 0.613625, + (GLfloat) 0.305709, (GLfloat) 0.170683, (GLfloat) - 0.708313, + (GLfloat) 0.777574, (GLfloat) 0.144976, (GLfloat) - 0.613625, + (GLfloat) 0.720950, (GLfloat) 0.148061, (GLfloat) - 0.708313, + (GLfloat) 0.648325, (GLfloat) 0.207388, (GLfloat) - 0.792031, + (GLfloat) 0.602715, (GLfloat) 0.067041, (GLfloat) - 0.733625, + (GLfloat) 0.610539, (GLfloat) 0.105601, (GLfloat) - 0.742813, + (GLfloat) 0.539336, (GLfloat) 0.279873, (GLfloat) - 0.837500, + (GLfloat) 0.784890, (GLfloat) 0.253894, (GLfloat) - 0.747500, + (GLfloat) 0.293781, (GLfloat) 0.305853, (GLfloat) - 0.747500, + (GLfloat) 0.233342, (GLfloat) 0.240791, (GLfloat) - 0.625156, + (GLfloat) 0.249085, (GLfloat) 0.173768, (GLfloat) - 0.386375, + (GLfloat) 0.230210, (GLfloat) 0.174796, (GLfloat) - 0.500000, + (GLfloat) 0.269217, (GLfloat) 0.071154, (GLfloat) - 0.600125, + (GLfloat) 0.264292, (GLfloat) 0.115884, (GLfloat) - 0.604062, + (GLfloat) 0.204489, (GLfloat) 0.315300, (GLfloat) - 0.500000, + (GLfloat) 0.293781, (GLfloat) 0.305853, (GLfloat) - 0.252500, + (GLfloat) 0.233342, (GLfloat) 0.240791, (GLfloat) - 0.374844, + (GLfloat) 0.269217, (GLfloat) 0.071154, (GLfloat) - 0.399875, + (GLfloat) 0.264292, (GLfloat) 0.115884, (GLfloat) - 0.395938, + (GLfloat) 0.400082, (GLfloat) 0.165542, (GLfloat) - 0.234875, + (GLfloat) 0.305709, (GLfloat) 0.170683, (GLfloat) - 0.291687, + (GLfloat) 0.399335, (GLfloat) 0.227430, (GLfloat) - 0.207969, + (GLfloat) 0.626577, (GLfloat) 0.153203, (GLfloat) - 0.234875, + (GLfloat) 0.513329, (GLfloat) 0.159372, (GLfloat) - 0.215937, + (GLfloat) 0.402616, (GLfloat) 0.069508, (GLfloat) - 0.266375, + (GLfloat) 0.402791, (GLfloat) 0.111771, (GLfloat) - 0.257187, + (GLfloat) 0.539336, (GLfloat) 0.279873, (GLfloat) - 0.162500, + (GLfloat) 0.784890, (GLfloat) 0.253894, (GLfloat) - 0.252500, + (GLfloat) 0.648325, (GLfloat) 0.207388, (GLfloat) - 0.207969, + (GLfloat) 0.602715, (GLfloat) 0.067041, (GLfloat) - 0.266375, + (GLfloat) 0.610539, (GLfloat) 0.105601, (GLfloat) - 0.257187, + (GLfloat) 0.777574, (GLfloat) 0.144976, (GLfloat) - 0.386375, + (GLfloat) 0.720950, (GLfloat) 0.148061, (GLfloat) - 0.291687, + (GLfloat) 0.814318, (GLfloat) 0.194027, (GLfloat) - 0.374844, + (GLfloat) 0.796449, (GLfloat) 0.143948, (GLfloat) - 0.500000, + (GLfloat) 0.736115, (GLfloat) 0.065395, (GLfloat) - 0.399875, + (GLfloat) 0.749037, (GLfloat) 0.101488, (GLfloat) - 0.395938, + (GLfloat) 0.874183, (GLfloat) 0.244447, (GLfloat) - 0.500000, + (GLfloat) 0.814318, (GLfloat) 0.194027, (GLfloat) - 0.625156, + (GLfloat) 0.736115, (GLfloat) 0.065395, (GLfloat) - 0.600125, + (GLfloat) 0.749037, (GLfloat) 0.101488, (GLfloat) - 0.604062, + (GLfloat) 0.752790, (GLfloat) 0.065190, (GLfloat) - 0.500000, + (GLfloat) 0.706000, (GLfloat) 0.016681, (GLfloat) - 0.412500, + (GLfloat) 0.726029, (GLfloat) 0.037019, (GLfloat) - 0.403594, + (GLfloat) 0.686090, (GLfloat) 0.066012, (GLfloat) - 0.316437, + (GLfloat) 0.686090, (GLfloat) 0.066012, (GLfloat) - 0.683563, + (GLfloat) 0.706000, (GLfloat) 0.016681, (GLfloat) - 0.587500, + (GLfloat) 0.726029, (GLfloat) 0.037019, (GLfloat) - 0.596406, + (GLfloat) 0.590500, (GLfloat) - 0.005194, (GLfloat) - 0.590500, + (GLfloat) 0.664625, (GLfloat) 0.003052, (GLfloat) - 0.582500, + (GLfloat) 0.721500, (GLfloat) 0.015465, (GLfloat) - 0.500000, + (GLfloat) 0.587500, (GLfloat) 0.016681, (GLfloat) - 0.706000, + (GLfloat) 0.660875, (GLfloat) 0.017896, (GLfloat) - 0.660875, + (GLfloat) 0.587500, (GLfloat) 0.016681, (GLfloat) - 0.294000, + (GLfloat) 0.660875, (GLfloat) 0.017896, (GLfloat) - 0.339125, + (GLfloat) 0.590500, (GLfloat) - 0.005194, (GLfloat) - 0.409500, + (GLfloat) 0.664625, (GLfloat) 0.003052, (GLfloat) - 0.417500, + (GLfloat) 0.502666, (GLfloat) 0.068274, (GLfloat) - 0.750313, + (GLfloat) 0.597054, (GLfloat) 0.037430, (GLfloat) - 0.725406, + (GLfloat) 0.319242, (GLfloat) 0.070537, (GLfloat) - 0.683563, + (GLfloat) 0.412500, (GLfloat) 0.016681, (GLfloat) - 0.706000, + (GLfloat) 0.404279, (GLfloat) 0.038047, (GLfloat) - 0.725406, + (GLfloat) 0.409500, (GLfloat) - 0.005194, (GLfloat) - 0.590500, + (GLfloat) 0.417500, (GLfloat) 0.003052, (GLfloat) - 0.664625, + (GLfloat) 0.500000, (GLfloat) 0.015465, (GLfloat) - 0.721500, + (GLfloat) 0.294000, (GLfloat) 0.016681, (GLfloat) - 0.587500, + (GLfloat) 0.339125, (GLfloat) 0.017896, (GLfloat) - 0.660875, + (GLfloat) 0.582500, (GLfloat) 0.003052, (GLfloat) - 0.664625, + (GLfloat) 0.252542, (GLfloat) 0.071359, (GLfloat) - 0.500000, + (GLfloat) 0.275304, (GLfloat) 0.038459, (GLfloat) - 0.596406, + (GLfloat) 0.319242, (GLfloat) 0.070537, (GLfloat) - 0.316437, + (GLfloat) 0.294000, (GLfloat) 0.016681, (GLfloat) - 0.412500, + (GLfloat) 0.275304, (GLfloat) 0.038459, (GLfloat) - 0.403594, + (GLfloat) 0.409500, (GLfloat) - 0.005194, (GLfloat) - 0.409500, + (GLfloat) 0.335375, (GLfloat) 0.003052, (GLfloat) - 0.417500, + (GLfloat) 0.278500, (GLfloat) 0.015465, (GLfloat) - 0.500000, + (GLfloat) 0.412500, (GLfloat) 0.016681, (GLfloat) - 0.294000, + (GLfloat) 0.339125, (GLfloat) 0.017896, (GLfloat) - 0.339125, + (GLfloat) 0.335375, (GLfloat) 0.003052, (GLfloat) - 0.582500, + (GLfloat) 0.502666, (GLfloat) 0.068274, (GLfloat) - 0.249687, + (GLfloat) 0.404279, (GLfloat) 0.038047, (GLfloat) - 0.274594, + (GLfloat) 0.597054, (GLfloat) 0.037430, (GLfloat) - 0.274594, + (GLfloat) 0.582500, (GLfloat) 0.003052, (GLfloat) - 0.335375, + (GLfloat) 0.500000, (GLfloat) 0.015465, (GLfloat) - 0.278500, + (GLfloat) 0.417500, (GLfloat) 0.003052, (GLfloat) - 0.335375, + (GLfloat) 0.500000, (GLfloat) - 0.007972, (GLfloat) - 0.597750, + (GLfloat) 0.597750, (GLfloat) - 0.007972, (GLfloat) - 0.500000, + (GLfloat) 0.402250, (GLfloat) - 0.007972, (GLfloat) - 0.500000, + (GLfloat) 0.500000, (GLfloat) - 0.007972, (GLfloat) - 0.402250, +}; + +static GLfloat s1_2_normals[] = +{ + (GLfloat) 0.838584, (GLfloat) - 0.185505, (GLfloat) - 0.512216, + (GLfloat) 0.838560, (GLfloat) - 0.185860, (GLfloat) - 0.512127, + (GLfloat) 0.951437, (GLfloat) - 0.260566, (GLfloat) - 0.163932, + (GLfloat) 0.951618, (GLfloat) - 0.260024, (GLfloat) - 0.163738, + (GLfloat) 0.973663, (GLfloat) - 0.157463, (GLfloat) - 0.164880, + (GLfloat) 0.975548, (GLfloat) - 0.148474, (GLfloat) - 0.162053, + (GLfloat) 0.859322, (GLfloat) - 0.074133, (GLfloat) - 0.506033, + (GLfloat) 0.859277, (GLfloat) - 0.081888, (GLfloat) - 0.504914, + (GLfloat) 0.838560, (GLfloat) - 0.185860, (GLfloat) 0.512127, + (GLfloat) 0.838584, (GLfloat) - 0.185505, (GLfloat) 0.512216, + (GLfloat) 0.859322, (GLfloat) - 0.074133, (GLfloat) 0.506034, + (GLfloat) 0.859277, (GLfloat) - 0.081888, (GLfloat) 0.504914, + (GLfloat) 0.973663, (GLfloat) - 0.157463, (GLfloat) 0.164880, + (GLfloat) 0.975548, (GLfloat) - 0.148474, (GLfloat) 0.162053, + (GLfloat) 0.951618, (GLfloat) - 0.260024, (GLfloat) 0.163738, + (GLfloat) 0.951437, (GLfloat) - 0.260566, (GLfloat) 0.163932, + (GLfloat) 0.573088, (GLfloat) 0.793214, (GLfloat) 0.205867, + (GLfloat) 0.558283, (GLfloat) 0.810311, (GLfloat) 0.178092, + (GLfloat) 0.606103, (GLfloat) 0.792390, (GLfloat) 0.068965, + (GLfloat) 0.596705, (GLfloat) 0.799118, (GLfloat) 0.073163, + (GLfloat) 0.896389, (GLfloat) 0.425982, (GLfloat) 0.122582, + (GLfloat) 0.910488, (GLfloat) 0.389376, (GLfloat) 0.139274, + (GLfloat) 0.787435, (GLfloat) 0.503715, (GLfloat) 0.355272, + (GLfloat) 0.794681, (GLfloat) 0.474299, (GLfloat) 0.378844, + (GLfloat) 0.558283, (GLfloat) 0.810311, (GLfloat) - 0.178092, + (GLfloat) 0.573088, (GLfloat) 0.793214, (GLfloat) - 0.205866, + (GLfloat) 0.787434, (GLfloat) 0.503716, (GLfloat) - 0.355272, + (GLfloat) 0.794681, (GLfloat) 0.474299, (GLfloat) - 0.378844, + (GLfloat) 0.910488, (GLfloat) 0.389376, (GLfloat) - 0.139274, + (GLfloat) 0.896389, (GLfloat) 0.425982, (GLfloat) - 0.122583, + (GLfloat) 0.596705, (GLfloat) 0.799118, (GLfloat) - 0.073163, + (GLfloat) 0.606103, (GLfloat) 0.792390, (GLfloat) - 0.068965, + (GLfloat) 0.528377, (GLfloat) - 0.013430, (GLfloat) 0.848903, + (GLfloat) 0.532136, (GLfloat) - 0.007543, (GLfloat) 0.846625, + (GLfloat) 0.209439, (GLfloat) 0.141946, (GLfloat) 0.967464, + (GLfloat) 0.218070, (GLfloat) 0.152719, (GLfloat) 0.963910, + (GLfloat) 0.237428, (GLfloat) 0.197257, (GLfloat) 0.951166, + (GLfloat) 0.225804, (GLfloat) 0.180417, (GLfloat) 0.957320, + (GLfloat) 0.549711, (GLfloat) 0.076255, (GLfloat) 0.831867, + (GLfloat) 0.550775, (GLfloat) 0.056452, (GLfloat) 0.832742, + (GLfloat) - 0.393177, (GLfloat) 0.417558, (GLfloat) 0.819181, + (GLfloat) - 0.379656, (GLfloat) 0.429289, (GLfloat) 0.819495, + (GLfloat) - 0.366688, (GLfloat) 0.451901, (GLfloat) 0.813219, + (GLfloat) - 0.369492, (GLfloat) 0.449132, (GLfloat) 0.813484, + (GLfloat) - 0.064014, (GLfloat) 0.313584, (GLfloat) 0.947400, + (GLfloat) - 0.066684, (GLfloat) 0.310439, (GLfloat) 0.948252, + (GLfloat) - 0.086424, (GLfloat) 0.278029, (GLfloat) 0.956677, + (GLfloat) - 0.074037, (GLfloat) 0.290647, (GLfloat) 0.953962, + (GLfloat) 0.110270, (GLfloat) 0.952576, (GLfloat) 0.283620, + (GLfloat) 0.140226, (GLfloat) 0.954260, (GLfloat) 0.264054, + (GLfloat) 0.237331, (GLfloat) 0.918949, (GLfloat) 0.314972, + (GLfloat) 0.245773, (GLfloat) 0.920155, (GLfloat) 0.304813, + (GLfloat) 0.105329, (GLfloat) 0.694128, (GLfloat) 0.712104, + (GLfloat) 0.087202, (GLfloat) 0.678641, (GLfloat) 0.729275, + (GLfloat) - 0.104644, (GLfloat) 0.803491, (GLfloat) 0.586048, + (GLfloat) - 0.129358, (GLfloat) 0.790652, (GLfloat) 0.598444, + (GLfloat) 0.490179, (GLfloat) 0.834739, (GLfloat) 0.250869, + (GLfloat) 0.486736, (GLfloat) 0.825366, (GLfloat) 0.286109, + (GLfloat) 0.575458, (GLfloat) 0.546427, (GLfloat) 0.608494, + (GLfloat) 0.582377, (GLfloat) 0.582433, (GLfloat) 0.567105, + (GLfloat) 0.347588, (GLfloat) 0.580631, (GLfloat) 0.736241, + (GLfloat) 0.339131, (GLfloat) 0.624243, (GLfloat) 0.703783, + (GLfloat) 0.378417, (GLfloat) 0.874281, (GLfloat) 0.304028, + (GLfloat) 0.373374, (GLfloat) 0.872526, (GLfloat) 0.315104, + (GLfloat) - 0.678225, (GLfloat) 0.555239, (GLfloat) 0.481373, + (GLfloat) - 0.681792, (GLfloat) 0.544639, (GLfloat) 0.488393, + (GLfloat) - 0.792737, (GLfloat) 0.589393, (GLfloat) 0.155511, + (GLfloat) - 0.790738, (GLfloat) 0.592627, (GLfloat) 0.153380, + (GLfloat) - 0.787611, (GLfloat) 0.595240, (GLfloat) 0.159243, + (GLfloat) - 0.781477, (GLfloat) 0.604504, (GLfloat) 0.154495, + (GLfloat) - 0.659940, (GLfloat) 0.576523, (GLfloat) 0.481768, + (GLfloat) - 0.666748, (GLfloat) 0.561105, (GLfloat) 0.490519, + (GLfloat) - 0.678225, (GLfloat) 0.555239, (GLfloat) - 0.481374, + (GLfloat) - 0.681792, (GLfloat) 0.544639, (GLfloat) - 0.488393, + (GLfloat) - 0.666748, (GLfloat) 0.561105, (GLfloat) - 0.490519, + (GLfloat) - 0.659940, (GLfloat) 0.576523, (GLfloat) - 0.481768, + (GLfloat) - 0.787611, (GLfloat) 0.595240, (GLfloat) - 0.159243, + (GLfloat) - 0.781477, (GLfloat) 0.604504, (GLfloat) - 0.154495, + (GLfloat) - 0.790738, (GLfloat) 0.592627, (GLfloat) - 0.153380, + (GLfloat) - 0.792737, (GLfloat) 0.589393, (GLfloat) - 0.155511, + (GLfloat) 0.036752, (GLfloat) 0.977890, (GLfloat) - 0.205867, + (GLfloat) 0.058945, (GLfloat) 0.982247, (GLfloat) - 0.178091, + (GLfloat) 0.010229, (GLfloat) 0.997567, (GLfloat) - 0.068965, + (GLfloat) 0.021776, (GLfloat) 0.997082, (GLfloat) - 0.073162, + (GLfloat) - 0.480804, (GLfloat) 0.867725, (GLfloat) - 0.126022, + (GLfloat) - 0.442857, (GLfloat) 0.886381, (GLfloat) - 0.134932, + (GLfloat) - 0.305505, (GLfloat) 0.879128, (GLfloat) - 0.365788, + (GLfloat) - 0.350437, (GLfloat) 0.860755, (GLfloat) - 0.369182, + (GLfloat) 0.058946, (GLfloat) 0.982247, (GLfloat) 0.178091, + (GLfloat) 0.036752, (GLfloat) 0.977890, (GLfloat) 0.205867, + (GLfloat) - 0.350437, (GLfloat) 0.860755, (GLfloat) 0.369182, + (GLfloat) - 0.305505, (GLfloat) 0.879128, (GLfloat) 0.365788, + (GLfloat) - 0.480804, (GLfloat) 0.867725, (GLfloat) 0.126022, + (GLfloat) - 0.442857, (GLfloat) 0.886381, (GLfloat) 0.134932, + (GLfloat) 0.021776, (GLfloat) 0.997082, (GLfloat) 0.073162, + (GLfloat) 0.010229, (GLfloat) 0.997567, (GLfloat) 0.068965, + (GLfloat) - 0.393178, (GLfloat) 0.417557, (GLfloat) - 0.819181, + (GLfloat) - 0.379655, (GLfloat) 0.429290, (GLfloat) - 0.819495, + (GLfloat) - 0.074037, (GLfloat) 0.290648, (GLfloat) - 0.953961, + (GLfloat) - 0.086424, (GLfloat) 0.278030, (GLfloat) - 0.956677, + (GLfloat) - 0.064013, (GLfloat) 0.313585, (GLfloat) - 0.947400, + (GLfloat) - 0.066684, (GLfloat) 0.310439, (GLfloat) - 0.948252, + (GLfloat) - 0.369492, (GLfloat) 0.449132, (GLfloat) - 0.813484, + (GLfloat) - 0.366688, (GLfloat) 0.451901, (GLfloat) - 0.813219, + (GLfloat) 0.532135, (GLfloat) - 0.007544, (GLfloat) - 0.846626, + (GLfloat) 0.528378, (GLfloat) - 0.013430, (GLfloat) - 0.848903, + (GLfloat) 0.550775, (GLfloat) 0.056452, (GLfloat) - 0.832742, + (GLfloat) 0.549711, (GLfloat) 0.076255, (GLfloat) - 0.831867, + (GLfloat) 0.225804, (GLfloat) 0.180419, (GLfloat) - 0.957320, + (GLfloat) 0.237428, (GLfloat) 0.197257, (GLfloat) - 0.951166, + (GLfloat) 0.209439, (GLfloat) 0.141946, (GLfloat) - 0.967464, + (GLfloat) 0.218070, (GLfloat) 0.152720, (GLfloat) - 0.963910, + (GLfloat) 0.490179, (GLfloat) 0.834739, (GLfloat) - 0.250870, + (GLfloat) 0.486736, (GLfloat) 0.825366, (GLfloat) - 0.286109, + (GLfloat) 0.373374, (GLfloat) 0.872526, (GLfloat) - 0.315104, + (GLfloat) 0.378417, (GLfloat) 0.874281, (GLfloat) - 0.304029, + (GLfloat) 0.339131, (GLfloat) 0.624243, (GLfloat) - 0.703783, + (GLfloat) 0.347588, (GLfloat) 0.580630, (GLfloat) - 0.736241, + (GLfloat) 0.582377, (GLfloat) 0.582434, (GLfloat) - 0.567105, + (GLfloat) 0.575458, (GLfloat) 0.546427, (GLfloat) - 0.608494, + (GLfloat) 0.140225, (GLfloat) 0.954260, (GLfloat) - 0.264055, + (GLfloat) 0.110270, (GLfloat) 0.952576, (GLfloat) - 0.283620, + (GLfloat) - 0.104644, (GLfloat) 0.803491, (GLfloat) - 0.586047, + (GLfloat) - 0.129358, (GLfloat) 0.790652, (GLfloat) - 0.598444, + (GLfloat) 0.087202, (GLfloat) 0.678640, (GLfloat) - 0.729276, + (GLfloat) 0.105329, (GLfloat) 0.694128, (GLfloat) - 0.712104, + (GLfloat) 0.237332, (GLfloat) 0.918949, (GLfloat) - 0.314972, + (GLfloat) 0.245773, (GLfloat) 0.920155, (GLfloat) - 0.304813, + (GLfloat) 0.448419, (GLfloat) 0.885179, (GLfloat) 0.124011, + (GLfloat) 0.437269, (GLfloat) 0.889018, (GLfloat) 0.135803, + (GLfloat) 0.364737, (GLfloat) 0.924635, (GLfloat) 0.109622, + (GLfloat) 0.360657, (GLfloat) 0.925618, (GLfloat) 0.114709, + (GLfloat) 0.353761, (GLfloat) 0.934751, (GLfloat) 0.033079, + (GLfloat) 0.356519, (GLfloat) 0.933801, (GLfloat) 0.030163, + (GLfloat) 0.426940, (GLfloat) 0.903217, (GLfloat) 0.043834, + (GLfloat) 0.431621, (GLfloat) 0.901183, (GLfloat) 0.039656, + (GLfloat) 0.202761, (GLfloat) 0.969766, (GLfloat) 0.135803, + (GLfloat) 0.191612, (GLfloat) 0.973605, (GLfloat) 0.124011, + (GLfloat) 0.219643, (GLfloat) 0.974595, (GLfloat) 0.043834, + (GLfloat) 0.214702, (GLfloat) 0.975874, (GLfloat) 0.039656, + (GLfloat) 0.293965, (GLfloat) 0.955340, (GLfloat) 0.030163, + (GLfloat) 0.296722, (GLfloat) 0.954391, (GLfloat) 0.033079, + (GLfloat) 0.281846, (GLfloat) 0.953177, (GLfloat) 0.109622, + (GLfloat) 0.285665, (GLfloat) 0.951439, (GLfloat) 0.114709, + (GLfloat) 0.191612, (GLfloat) 0.973605, (GLfloat) - 0.124011, + (GLfloat) 0.202761, (GLfloat) 0.969766, (GLfloat) - 0.135803, + (GLfloat) 0.281846, (GLfloat) 0.953177, (GLfloat) - 0.109622, + (GLfloat) 0.285665, (GLfloat) 0.951439, (GLfloat) - 0.114709, + (GLfloat) 0.296722, (GLfloat) 0.954391, (GLfloat) - 0.033079, + (GLfloat) 0.293965, (GLfloat) 0.955340, (GLfloat) - 0.030163, + (GLfloat) 0.219643, (GLfloat) 0.974595, (GLfloat) - 0.043834, + (GLfloat) 0.214702, (GLfloat) 0.975874, (GLfloat) - 0.039656, + (GLfloat) 0.437270, (GLfloat) 0.889018, (GLfloat) - 0.135802, + (GLfloat) 0.448419, (GLfloat) 0.885179, (GLfloat) - 0.124011, + (GLfloat) 0.426940, (GLfloat) 0.903217, (GLfloat) - 0.043834, + (GLfloat) 0.431621, (GLfloat) 0.901183, (GLfloat) - 0.039656, + (GLfloat) 0.356519, (GLfloat) 0.933801, (GLfloat) - 0.030163, + (GLfloat) 0.353761, (GLfloat) 0.934751, (GLfloat) - 0.033079, + (GLfloat) 0.364737, (GLfloat) 0.924635, (GLfloat) - 0.109622, + (GLfloat) 0.360657, (GLfloat) 0.925618, (GLfloat) - 0.114709, + (GLfloat) 0.865947, (GLfloat) 0.016137, (GLfloat) - 0.499875, + (GLfloat) 0.868761, (GLfloat) 0.025708, (GLfloat) - 0.494564, + (GLfloat) 0.864411, (GLfloat) 0.044558, (GLfloat) - 0.500808, + (GLfloat) 0.867101, (GLfloat) 0.054429, (GLfloat) - 0.495149, + (GLfloat) 0.986611, (GLfloat) - 0.030929, (GLfloat) - 0.160132, + (GLfloat) 0.986294, (GLfloat) - 0.033936, (GLfloat) - 0.161472, + (GLfloat) 0.985351, (GLfloat) - 0.059326, (GLfloat) - 0.159886, + (GLfloat) 0.984981, (GLfloat) - 0.062150, (GLfloat) - 0.161092, + (GLfloat) 0.832885, (GLfloat) - 0.213353, (GLfloat) - 0.510669, + (GLfloat) 0.832050, (GLfloat) - 0.215053, (GLfloat) - 0.511318, + (GLfloat) 0.946090, (GLfloat) - 0.280224, (GLfloat) - 0.162447, + (GLfloat) 0.946491, (GLfloat) - 0.279128, (GLfloat) - 0.161996, + (GLfloat) 0.980117, (GLfloat) - 0.113104, (GLfloat) - 0.163030, + (GLfloat) 0.979875, (GLfloat) - 0.114395, (GLfloat) - 0.163582, + (GLfloat) 0.859139, (GLfloat) - 0.037704, (GLfloat) - 0.510352, + (GLfloat) 0.860908, (GLfloat) - 0.032422, (GLfloat) - 0.507727, + (GLfloat) 0.832885, (GLfloat) - 0.213353, (GLfloat) 0.510669, + (GLfloat) 0.832049, (GLfloat) - 0.215054, (GLfloat) 0.511318, + (GLfloat) 0.860908, (GLfloat) - 0.032422, (GLfloat) 0.507727, + (GLfloat) 0.859138, (GLfloat) - 0.037705, (GLfloat) 0.510352, + (GLfloat) 0.980117, (GLfloat) - 0.113104, (GLfloat) 0.163030, + (GLfloat) 0.979875, (GLfloat) - 0.114395, (GLfloat) 0.163582, + (GLfloat) 0.946491, (GLfloat) - 0.279128, (GLfloat) 0.161996, + (GLfloat) 0.946090, (GLfloat) - 0.280224, (GLfloat) 0.162447, + (GLfloat) 0.868761, (GLfloat) 0.025708, (GLfloat) 0.494563, + (GLfloat) 0.865947, (GLfloat) 0.016137, (GLfloat) 0.499875, + (GLfloat) 0.985351, (GLfloat) - 0.059326, (GLfloat) 0.159886, + (GLfloat) 0.984981, (GLfloat) - 0.062149, (GLfloat) 0.161092, + (GLfloat) 0.986294, (GLfloat) - 0.033936, (GLfloat) 0.161472, + (GLfloat) 0.986611, (GLfloat) - 0.030929, (GLfloat) 0.160132, + (GLfloat) 0.864411, (GLfloat) 0.044558, (GLfloat) 0.500808, + (GLfloat) 0.867101, (GLfloat) 0.054428, (GLfloat) 0.495149, + (GLfloat) - 0.329624, (GLfloat) 0.568782, (GLfloat) - 0.753548, + (GLfloat) - 0.303532, (GLfloat) 0.584080, (GLfloat) - 0.752808, + (GLfloat) - 0.337233, (GLfloat) 0.584915, (GLfloat) - 0.737664, + (GLfloat) - 0.311968, (GLfloat) 0.599454, (GLfloat) - 0.737110, + (GLfloat) - 0.032356, (GLfloat) 0.486520, (GLfloat) - 0.873070, + (GLfloat) - 0.057628, (GLfloat) 0.467531, (GLfloat) - 0.882096, + (GLfloat) - 0.019804, (GLfloat) 0.465587, (GLfloat) - 0.884780, + (GLfloat) - 0.045819, (GLfloat) 0.445898, (GLfloat) - 0.893910, + (GLfloat) - 0.451403, (GLfloat) 0.351833, (GLfloat) - 0.820029, + (GLfloat) - 0.442643, (GLfloat) 0.360683, (GLfloat) - 0.820960, + (GLfloat) - 0.125959, (GLfloat) 0.231940, (GLfloat) - 0.964540, + (GLfloat) - 0.133424, (GLfloat) 0.223158, (GLfloat) - 0.965608, + (GLfloat) - 0.071940, (GLfloat) 0.416419, (GLfloat) - 0.906322, + (GLfloat) - 0.089763, (GLfloat) 0.400364, (GLfloat) - 0.911949, + (GLfloat) - 0.381140, (GLfloat) 0.522054, (GLfloat) - 0.763015, + (GLfloat) - 0.362693, (GLfloat) 0.535129, (GLfloat) - 0.762949, + (GLfloat) 0.514033, (GLfloat) - 0.052564, (GLfloat) - 0.856158, + (GLfloat) 0.512829, (GLfloat) - 0.054517, (GLfloat) - 0.856758, + (GLfloat) 0.539192, (GLfloat) 0.146366, (GLfloat) - 0.829367, + (GLfloat) 0.531981, (GLfloat) 0.133703, (GLfloat) - 0.836133, + (GLfloat) 0.204167, (GLfloat) 0.278037, (GLfloat) - 0.938622, + (GLfloat) 0.217587, (GLfloat) 0.294489, (GLfloat) - 0.930555, + (GLfloat) 0.177512, (GLfloat) 0.093824, (GLfloat) - 0.979636, + (GLfloat) 0.182065, (GLfloat) 0.100184, (GLfloat) - 0.978170, + (GLfloat) 0.561737, (GLfloat) 0.205535, (GLfloat) - 0.801378, + (GLfloat) 0.550517, (GLfloat) 0.186829, (GLfloat) - 0.813650, + (GLfloat) 0.237090, (GLfloat) 0.326380, (GLfloat) - 0.915022, + (GLfloat) 0.257400, (GLfloat) 0.348104, (GLfloat) - 0.901426, + (GLfloat) 0.225204, (GLfloat) 0.351522, (GLfloat) - 0.908689, + (GLfloat) 0.244915, (GLfloat) 0.372788, (GLfloat) - 0.895012, + (GLfloat) 0.553162, (GLfloat) 0.233132, (GLfloat) - 0.799789, + (GLfloat) 0.542289, (GLfloat) 0.214487, (GLfloat) - 0.812354, + (GLfloat) - 0.303532, (GLfloat) 0.584080, (GLfloat) 0.752808, + (GLfloat) - 0.329624, (GLfloat) 0.568782, (GLfloat) 0.753548, + (GLfloat) - 0.019804, (GLfloat) 0.465588, (GLfloat) 0.884780, + (GLfloat) - 0.045820, (GLfloat) 0.445898, (GLfloat) 0.893910, + (GLfloat) - 0.057628, (GLfloat) 0.467531, (GLfloat) 0.882096, + (GLfloat) - 0.032356, (GLfloat) 0.486520, (GLfloat) 0.873070, + (GLfloat) - 0.337233, (GLfloat) 0.584915, (GLfloat) 0.737664, + (GLfloat) - 0.311968, (GLfloat) 0.599453, (GLfloat) 0.737110, + (GLfloat) 0.561737, (GLfloat) 0.205535, (GLfloat) 0.801378, + (GLfloat) 0.550517, (GLfloat) 0.186829, (GLfloat) 0.813650, + (GLfloat) 0.542289, (GLfloat) 0.214487, (GLfloat) 0.812354, + (GLfloat) 0.553162, (GLfloat) 0.233132, (GLfloat) 0.799789, + (GLfloat) 0.225204, (GLfloat) 0.351522, (GLfloat) 0.908689, + (GLfloat) 0.244915, (GLfloat) 0.372788, (GLfloat) 0.895012, + (GLfloat) 0.257400, (GLfloat) 0.348104, (GLfloat) 0.901426, + (GLfloat) 0.237091, (GLfloat) 0.326380, (GLfloat) 0.915021, + (GLfloat) 0.512829, (GLfloat) - 0.054517, (GLfloat) 0.856758, + (GLfloat) 0.514033, (GLfloat) - 0.052564, (GLfloat) 0.856158, + (GLfloat) 0.177512, (GLfloat) 0.093824, (GLfloat) 0.979636, + (GLfloat) 0.182065, (GLfloat) 0.100184, (GLfloat) 0.978170, + (GLfloat) 0.217587, (GLfloat) 0.294488, (GLfloat) 0.930555, + (GLfloat) 0.204167, (GLfloat) 0.278037, (GLfloat) 0.938622, + (GLfloat) 0.539192, (GLfloat) 0.146365, (GLfloat) 0.829367, + (GLfloat) 0.531981, (GLfloat) 0.133703, (GLfloat) 0.836133, + (GLfloat) - 0.451403, (GLfloat) 0.351833, (GLfloat) 0.820029, + (GLfloat) - 0.442643, (GLfloat) 0.360683, (GLfloat) 0.820960, + (GLfloat) - 0.362693, (GLfloat) 0.535129, (GLfloat) 0.762949, + (GLfloat) - 0.381140, (GLfloat) 0.522054, (GLfloat) 0.763015, + (GLfloat) - 0.071940, (GLfloat) 0.416419, (GLfloat) 0.906322, + (GLfloat) - 0.089763, (GLfloat) 0.400364, (GLfloat) 0.911949, + (GLfloat) - 0.133424, (GLfloat) 0.223158, (GLfloat) 0.965608, + (GLfloat) - 0.125959, (GLfloat) 0.231940, (GLfloat) 0.964540, + (GLfloat) - 0.574082, (GLfloat) 0.688221, (GLfloat) - 0.443601, + (GLfloat) - 0.590248, (GLfloat) 0.678175, (GLfloat) - 0.437821, + (GLfloat) - 0.687359, (GLfloat) 0.712967, (GLfloat) - 0.138621, + (GLfloat) - 0.682813, (GLfloat) 0.716686, (GLfloat) - 0.141874, + (GLfloat) - 0.682597, (GLfloat) 0.718360, (GLfloat) - 0.134243, + (GLfloat) - 0.678253, (GLfloat) 0.721849, (GLfloat) - 0.137502, + (GLfloat) - 0.574037, (GLfloat) 0.696240, (GLfloat) - 0.430966, + (GLfloat) - 0.589571, (GLfloat) 0.686777, (GLfloat) - 0.425139, + (GLfloat) - 0.574082, (GLfloat) 0.688221, (GLfloat) 0.443601, + (GLfloat) - 0.590248, (GLfloat) 0.678175, (GLfloat) 0.437821, + (GLfloat) - 0.589571, (GLfloat) 0.686777, (GLfloat) 0.425139, + (GLfloat) - 0.574037, (GLfloat) 0.696240, (GLfloat) 0.430966, + (GLfloat) - 0.682597, (GLfloat) 0.718360, (GLfloat) 0.134243, + (GLfloat) - 0.678253, (GLfloat) 0.721849, (GLfloat) 0.137502, + (GLfloat) - 0.682813, (GLfloat) 0.716686, (GLfloat) 0.141874, + (GLfloat) - 0.687359, (GLfloat) 0.712967, (GLfloat) 0.138621, + (GLfloat) - 0.741041, (GLfloat) 0.473108, (GLfloat) 0.476473, + (GLfloat) - 0.742406, (GLfloat) 0.464975, (GLfloat) 0.482319, + (GLfloat) - 0.850293, (GLfloat) 0.503676, (GLfloat) 0.152681, + (GLfloat) - 0.849127, (GLfloat) 0.506180, (GLfloat) 0.150879, + (GLfloat) - 0.738717, (GLfloat) 0.659007, (GLfloat) 0.141447, + (GLfloat) - 0.736283, (GLfloat) 0.662408, (GLfloat) 0.138214, + (GLfloat) - 0.631960, (GLfloat) 0.635245, (GLfloat) 0.443948, + (GLfloat) - 0.643540, (GLfloat) 0.626686, (GLfloat) 0.439455, + (GLfloat) - 0.741041, (GLfloat) 0.473108, (GLfloat) - 0.476473, + (GLfloat) - 0.742406, (GLfloat) 0.464975, (GLfloat) - 0.482319, + (GLfloat) - 0.631960, (GLfloat) 0.635245, (GLfloat) - 0.443948, + (GLfloat) - 0.643541, (GLfloat) 0.626686, (GLfloat) - 0.439455, + (GLfloat) - 0.738717, (GLfloat) 0.659007, (GLfloat) - 0.141447, + (GLfloat) - 0.736283, (GLfloat) 0.662408, (GLfloat) - 0.138214, + (GLfloat) - 0.849127, (GLfloat) 0.506180, (GLfloat) - 0.150879, + (GLfloat) - 0.850293, (GLfloat) 0.503676, (GLfloat) - 0.152681, + (GLfloat) - 0.489320, (GLfloat) - 0.355167, (GLfloat) - 0.796506, + (GLfloat) - 0.498398, (GLfloat) - 0.341072, (GLfloat) - 0.797038, + (GLfloat) - 0.172289, (GLfloat) - 0.401583, (GLfloat) - 0.899471, + (GLfloat) - 0.163102, (GLfloat) - 0.385135, (GLfloat) - 0.908333, + (GLfloat) - 0.182727, (GLfloat) - 0.410657, (GLfloat) - 0.893293, + (GLfloat) - 0.172422, (GLfloat) - 0.394484, (GLfloat) - 0.902581, + (GLfloat) - 0.506086, (GLfloat) - 0.336560, (GLfloat) - 0.794106, + (GLfloat) - 0.496896, (GLfloat) - 0.351037, (GLfloat) - 0.793642, + (GLfloat) 0.421643, (GLfloat) - 0.514114, (GLfloat) - 0.746930, + (GLfloat) 0.435781, (GLfloat) - 0.498195, (GLfloat) - 0.749598, + (GLfloat) 0.399104, (GLfloat) - 0.548391, (GLfloat) - 0.734836, + (GLfloat) 0.414969, (GLfloat) - 0.532774, (GLfloat) - 0.737532, + (GLfloat) 0.122126, (GLfloat) - 0.459168, (GLfloat) - 0.879915, + (GLfloat) 0.107835, (GLfloat) - 0.476533, (GLfloat) - 0.872518, + (GLfloat) 0.135473, (GLfloat) - 0.437168, (GLfloat) - 0.889118, + (GLfloat) 0.122726, (GLfloat) - 0.454818, (GLfloat) - 0.882088, + (GLfloat) 0.451859, (GLfloat) - 0.350279, (GLfloat) - 0.820444, + (GLfloat) 0.459996, (GLfloat) - 0.340221, (GLfloat) - 0.820154, + (GLfloat) 0.139327, (GLfloat) - 0.217141, (GLfloat) - 0.966146, + (GLfloat) 0.132987, (GLfloat) - 0.225779, (GLfloat) - 0.965059, + (GLfloat) 0.121571, (GLfloat) - 0.389814, (GLfloat) - 0.912834, + (GLfloat) 0.109716, (GLfloat) - 0.404550, (GLfloat) - 0.907910, + (GLfloat) 0.409974, (GLfloat) - 0.496912, (GLfloat) - 0.764852, + (GLfloat) 0.423414, (GLfloat) - 0.483036, (GLfloat) - 0.766418, + (GLfloat) - 0.517051, (GLfloat) 0.005478, (GLfloat) - 0.855937, + (GLfloat) - 0.518557, (GLfloat) 0.003075, (GLfloat) - 0.855038, + (GLfloat) - 0.515705, (GLfloat) - 0.236965, (GLfloat) - 0.823344, + (GLfloat) - 0.521517, (GLfloat) - 0.225403, (GLfloat) - 0.822930, + (GLfloat) - 0.189726, (GLfloat) - 0.318770, (GLfloat) - 0.928649, + (GLfloat) - 0.181223, (GLfloat) - 0.305795, (GLfloat) - 0.934691, + (GLfloat) - 0.179422, (GLfloat) - 0.111097, (GLfloat) - 0.977479, + (GLfloat) - 0.175584, (GLfloat) - 0.105473, (GLfloat) - 0.978798, + (GLfloat) - 0.822110, (GLfloat) - 0.303411, (GLfloat) - 0.481743, + (GLfloat) - 0.821692, (GLfloat) - 0.296307, (GLfloat) - 0.486851, + (GLfloat) - 0.829019, (GLfloat) - 0.285105, (GLfloat) - 0.481086, + (GLfloat) - 0.828324, (GLfloat) - 0.278227, (GLfloat) - 0.486280, + (GLfloat) - 0.955809, (GLfloat) - 0.248857, (GLfloat) - 0.156521, + (GLfloat) - 0.955462, (GLfloat) - 0.251102, (GLfloat) - 0.155051, + (GLfloat) - 0.949299, (GLfloat) - 0.272604, (GLfloat) - 0.156583, + (GLfloat) - 0.948870, (GLfloat) - 0.274919, (GLfloat) - 0.155132, + (GLfloat) - 0.850734, (GLfloat) 0.112614, (GLfloat) - 0.513391, + (GLfloat) - 0.850654, (GLfloat) 0.112793, (GLfloat) - 0.513484, + (GLfloat) - 0.974222, (GLfloat) 0.155109, (GLfloat) - 0.163808, + (GLfloat) - 0.974191, (GLfloat) 0.155230, (GLfloat) - 0.163874, + (GLfloat) - 0.980876, (GLfloat) - 0.109137, (GLfloat) - 0.161159, + (GLfloat) - 0.980855, (GLfloat) - 0.110647, (GLfloat) - 0.160255, + (GLfloat) - 0.853630, (GLfloat) - 0.150462, (GLfloat) - 0.498675, + (GLfloat) - 0.852599, (GLfloat) - 0.145646, (GLfloat) - 0.501859, + (GLfloat) - 0.850734, (GLfloat) 0.112614, (GLfloat) 0.513391, + (GLfloat) - 0.850654, (GLfloat) 0.112793, (GLfloat) 0.513484, + (GLfloat) - 0.852599, (GLfloat) - 0.145647, (GLfloat) 0.501859, + (GLfloat) - 0.853630, (GLfloat) - 0.150462, (GLfloat) 0.498676, + (GLfloat) - 0.980876, (GLfloat) - 0.109137, (GLfloat) 0.161159, + (GLfloat) - 0.980855, (GLfloat) - 0.110647, (GLfloat) 0.160255, + (GLfloat) - 0.974191, (GLfloat) 0.155230, (GLfloat) 0.163874, + (GLfloat) - 0.974222, (GLfloat) 0.155109, (GLfloat) 0.163808, + (GLfloat) - 0.821692, (GLfloat) - 0.296307, (GLfloat) 0.486851, + (GLfloat) - 0.822110, (GLfloat) - 0.303411, (GLfloat) 0.481743, + (GLfloat) - 0.949299, (GLfloat) - 0.272604, (GLfloat) 0.156583, + (GLfloat) - 0.948870, (GLfloat) - 0.274919, (GLfloat) 0.155132, + (GLfloat) - 0.955462, (GLfloat) - 0.251102, (GLfloat) 0.155051, + (GLfloat) - 0.955809, (GLfloat) - 0.248857, (GLfloat) 0.156520, + (GLfloat) - 0.829019, (GLfloat) - 0.285105, (GLfloat) 0.481086, + (GLfloat) - 0.828324, (GLfloat) - 0.278227, (GLfloat) 0.486280, + (GLfloat) - 0.498398, (GLfloat) - 0.341071, (GLfloat) 0.797038, + (GLfloat) - 0.489320, (GLfloat) - 0.355167, (GLfloat) 0.796507, + (GLfloat) - 0.506086, (GLfloat) - 0.336560, (GLfloat) 0.794106, + (GLfloat) - 0.496896, (GLfloat) - 0.351037, (GLfloat) 0.793642, + (GLfloat) - 0.182728, (GLfloat) - 0.410657, (GLfloat) 0.893293, + (GLfloat) - 0.172423, (GLfloat) - 0.394484, (GLfloat) 0.902581, + (GLfloat) - 0.163101, (GLfloat) - 0.385135, (GLfloat) 0.908333, + (GLfloat) - 0.172289, (GLfloat) - 0.401584, (GLfloat) 0.899470, + (GLfloat) - 0.518557, (GLfloat) 0.003076, (GLfloat) 0.855038, + (GLfloat) - 0.517051, (GLfloat) 0.005478, (GLfloat) 0.855937, + (GLfloat) - 0.179422, (GLfloat) - 0.111097, (GLfloat) 0.977479, + (GLfloat) - 0.175584, (GLfloat) - 0.105473, (GLfloat) 0.978798, + (GLfloat) - 0.181223, (GLfloat) - 0.305795, (GLfloat) 0.934691, + (GLfloat) - 0.189727, (GLfloat) - 0.318770, (GLfloat) 0.928649, + (GLfloat) - 0.521517, (GLfloat) - 0.225402, (GLfloat) 0.822930, + (GLfloat) - 0.515705, (GLfloat) - 0.236965, (GLfloat) 0.823344, + (GLfloat) 0.451859, (GLfloat) - 0.350279, (GLfloat) 0.820444, + (GLfloat) 0.459996, (GLfloat) - 0.340221, (GLfloat) 0.820154, + (GLfloat) 0.423414, (GLfloat) - 0.483036, (GLfloat) 0.766418, + (GLfloat) 0.409975, (GLfloat) - 0.496912, (GLfloat) 0.764853, + (GLfloat) 0.121571, (GLfloat) - 0.389814, (GLfloat) 0.912834, + (GLfloat) 0.109716, (GLfloat) - 0.404550, (GLfloat) 0.907911, + (GLfloat) 0.132987, (GLfloat) - 0.225779, (GLfloat) 0.965059, + (GLfloat) 0.139327, (GLfloat) - 0.217140, (GLfloat) 0.966146, + (GLfloat) 0.435780, (GLfloat) - 0.498195, (GLfloat) 0.749598, + (GLfloat) 0.421643, (GLfloat) - 0.514113, (GLfloat) 0.746930, + (GLfloat) 0.135473, (GLfloat) - 0.437169, (GLfloat) 0.889118, + (GLfloat) 0.122726, (GLfloat) - 0.454818, (GLfloat) 0.882088, + (GLfloat) 0.107835, (GLfloat) - 0.476534, (GLfloat) 0.872518, + (GLfloat) 0.122126, (GLfloat) - 0.459168, (GLfloat) 0.879915, + (GLfloat) 0.399104, (GLfloat) - 0.548391, (GLfloat) 0.734836, + (GLfloat) 0.414969, (GLfloat) - 0.532773, (GLfloat) 0.737532, + (GLfloat) 0.709825, (GLfloat) - 0.548164, (GLfloat) 0.442339, + (GLfloat) 0.706858, (GLfloat) - 0.559116, (GLfloat) 0.433291, + (GLfloat) 0.678133, (GLfloat) - 0.593660, (GLfloat) 0.433248, + (GLfloat) 0.674632, (GLfloat) - 0.604835, (GLfloat) 0.423140, + (GLfloat) 0.774649, (GLfloat) - 0.617973, (GLfloat) 0.134272, + (GLfloat) 0.777074, (GLfloat) - 0.614312, (GLfloat) 0.137026, + (GLfloat) 0.811265, (GLfloat) - 0.568214, (GLfloat) 0.137773, + (GLfloat) 0.813383, (GLfloat) - 0.564575, (GLfloat) 0.140223, + (GLfloat) 0.750611, (GLfloat) - 0.453426, (GLfloat) 0.480612, + (GLfloat) 0.748687, (GLfloat) - 0.462619, (GLfloat) 0.474817, + (GLfloat) 0.853444, (GLfloat) - 0.499176, (GLfloat) 0.149855, + (GLfloat) 0.854917, (GLfloat) - 0.496116, (GLfloat) 0.151614, + (GLfloat) 0.791852, (GLfloat) - 0.594634, (GLfloat) 0.139213, + (GLfloat) 0.794008, (GLfloat) - 0.591177, (GLfloat) 0.141637, + (GLfloat) 0.694144, (GLfloat) - 0.562907, (GLfloat) 0.448664, + (GLfloat) 0.690998, (GLfloat) - 0.573547, (GLfloat) 0.439961, + (GLfloat) 0.750611, (GLfloat) - 0.453426, (GLfloat) - 0.480612, + (GLfloat) 0.748687, (GLfloat) - 0.462620, (GLfloat) - 0.474817, + (GLfloat) 0.690999, (GLfloat) - 0.573546, (GLfloat) - 0.439961, + (GLfloat) 0.694144, (GLfloat) - 0.562907, (GLfloat) - 0.448664, + (GLfloat) 0.791852, (GLfloat) - 0.594634, (GLfloat) - 0.139213, + (GLfloat) 0.794008, (GLfloat) - 0.591177, (GLfloat) - 0.141637, + (GLfloat) 0.854917, (GLfloat) - 0.496116, (GLfloat) - 0.151614, + (GLfloat) 0.853444, (GLfloat) - 0.499176, (GLfloat) - 0.149855, + (GLfloat) 0.706858, (GLfloat) - 0.559116, (GLfloat) - 0.433291, + (GLfloat) 0.709825, (GLfloat) - 0.548164, (GLfloat) - 0.442339, + (GLfloat) 0.811265, (GLfloat) - 0.568214, (GLfloat) - 0.137773, + (GLfloat) 0.813383, (GLfloat) - 0.564575, (GLfloat) - 0.140223, + (GLfloat) 0.777074, (GLfloat) - 0.614312, (GLfloat) - 0.137026, + (GLfloat) 0.774649, (GLfloat) - 0.617973, (GLfloat) - 0.134272, + (GLfloat) 0.678133, (GLfloat) - 0.593660, (GLfloat) - 0.433248, + (GLfloat) 0.674631, (GLfloat) - 0.604835, (GLfloat) - 0.423139, + (GLfloat) 0.805725, (GLfloat) - 0.334902, (GLfloat) 0.488515, + (GLfloat) 0.805089, (GLfloat) - 0.341176, (GLfloat) 0.485212, + (GLfloat) 0.923877, (GLfloat) - 0.350079, (GLfloat) 0.154583, + (GLfloat) 0.924516, (GLfloat) - 0.347968, (GLfloat) 0.155526, + (GLfloat) 0.927012, (GLfloat) - 0.340158, (GLfloat) 0.157929, + (GLfloat) 0.924342, (GLfloat) - 0.348817, (GLfloat) 0.154657, + (GLfloat) 0.800744, (GLfloat) - 0.354688, (GLfloat) 0.482707, + (GLfloat) 0.801658, (GLfloat) - 0.348585, (GLfloat) 0.485626, + (GLfloat) 0.805725, (GLfloat) - 0.334902, (GLfloat) - 0.488516, + (GLfloat) 0.805089, (GLfloat) - 0.341176, (GLfloat) - 0.485212, + (GLfloat) 0.801658, (GLfloat) - 0.348585, (GLfloat) - 0.485626, + (GLfloat) 0.800744, (GLfloat) - 0.354688, (GLfloat) - 0.482707, + (GLfloat) 0.927012, (GLfloat) - 0.340158, (GLfloat) - 0.157929, + (GLfloat) 0.924342, (GLfloat) - 0.348818, (GLfloat) - 0.154657, + (GLfloat) 0.924516, (GLfloat) - 0.347968, (GLfloat) - 0.155526, + (GLfloat) 0.923877, (GLfloat) - 0.350079, (GLfloat) - 0.154583, + (GLfloat) 0.283621, (GLfloat) - 0.936578, (GLfloat) - 0.205866, + (GLfloat) 0.264056, (GLfloat) - 0.947923, (GLfloat) - 0.178092, + (GLfloat) 0.315105, (GLfloat) - 0.946548, (GLfloat) - 0.068965, + (GLfloat) 0.304029, (GLfloat) - 0.949849, (GLfloat) - 0.073162, + (GLfloat) 0.681274, (GLfloat) - 0.722487, (GLfloat) - 0.117805, + (GLfloat) 0.706887, (GLfloat) - 0.694350, (GLfloat) - 0.134864, + (GLfloat) 0.560017, (GLfloat) - 0.754527, (GLfloat) - 0.342154, + (GLfloat) 0.577334, (GLfloat) - 0.729313, (GLfloat) - 0.367135, + (GLfloat) 0.264055, (GLfloat) - 0.947923, (GLfloat) 0.178092, + (GLfloat) 0.283621, (GLfloat) - 0.936578, (GLfloat) 0.205866, + (GLfloat) 0.560017, (GLfloat) - 0.754527, (GLfloat) 0.342155, + (GLfloat) 0.577334, (GLfloat) - 0.729313, (GLfloat) 0.367135, + (GLfloat) 0.706888, (GLfloat) - 0.694350, (GLfloat) 0.134864, + (GLfloat) 0.681274, (GLfloat) - 0.722487, (GLfloat) 0.117805, + (GLfloat) 0.304029, (GLfloat) - 0.949849, (GLfloat) 0.073162, + (GLfloat) 0.315105, (GLfloat) - 0.946548, (GLfloat) 0.068965, + (GLfloat) 0.484153, (GLfloat) - 0.303994, (GLfloat) - 0.820478, + (GLfloat) 0.489225, (GLfloat) - 0.294821, (GLfloat) - 0.820816, + (GLfloat) 0.156385, (GLfloat) - 0.248336, (GLfloat) - 0.955967, + (GLfloat) 0.151648, (GLfloat) - 0.258100, (GLfloat) - 0.954142, + (GLfloat) 0.160268, (GLfloat) - 0.275037, (GLfloat) - 0.947981, + (GLfloat) 0.153877, (GLfloat) - 0.291476, (GLfloat) - 0.944120, + (GLfloat) 0.481923, (GLfloat) - 0.335378, (GLfloat) - 0.809489, + (GLfloat) 0.489881, (GLfloat) - 0.318876, (GLfloat) - 0.811378, + (GLfloat) - 0.511124, (GLfloat) - 0.173861, (GLfloat) - 0.841739, + (GLfloat) - 0.507919, (GLfloat) - 0.180984, (GLfloat) - 0.842177, + (GLfloat) - 0.502437, (GLfloat) - 0.243295, (GLfloat) - 0.829678, + (GLfloat) - 0.501146, (GLfloat) - 0.246358, (GLfloat) - 0.829554, + (GLfloat) - 0.162122, (GLfloat) - 0.255565, (GLfloat) - 0.953102, + (GLfloat) - 0.162682, (GLfloat) - 0.257426, (GLfloat) - 0.952505, + (GLfloat) - 0.167026, (GLfloat) - 0.217710, (GLfloat) - 0.961616, + (GLfloat) - 0.163395, (GLfloat) - 0.208930, (GLfloat) - 0.964184, + (GLfloat) - 0.205866, (GLfloat) - 0.936578, (GLfloat) - 0.283621, + (GLfloat) - 0.178092, (GLfloat) - 0.947923, (GLfloat) - 0.264055, + (GLfloat) - 0.068965, (GLfloat) - 0.946548, (GLfloat) - 0.315105, + (GLfloat) - 0.073162, (GLfloat) - 0.949849, (GLfloat) - 0.304029, + (GLfloat) - 0.124478, (GLfloat) - 0.692921, (GLfloat) - 0.710188, + (GLfloat) - 0.138779, (GLfloat) - 0.668059, (GLfloat) - 0.731052, + (GLfloat) - 0.361212, (GLfloat) - 0.721974, (GLfloat) - 0.590152, + (GLfloat) - 0.383785, (GLfloat) - 0.697396, (GLfloat) - 0.605267, + (GLfloat) 0.178092, (GLfloat) - 0.947923, (GLfloat) - 0.264056, + (GLfloat) 0.205866, (GLfloat) - 0.936578, (GLfloat) - 0.283621, + (GLfloat) 0.341480, (GLfloat) - 0.751054, (GLfloat) - 0.565075, + (GLfloat) 0.372366, (GLfloat) - 0.719604, (GLfloat) - 0.586101, + (GLfloat) 0.138114, (GLfloat) - 0.672674, (GLfloat) - 0.726935, + (GLfloat) 0.117913, (GLfloat) - 0.706722, (GLfloat) - 0.697597, + (GLfloat) 0.073162, (GLfloat) - 0.949849, (GLfloat) - 0.304029, + (GLfloat) 0.068965, (GLfloat) - 0.946548, (GLfloat) - 0.315105, + (GLfloat) - 0.850324, (GLfloat) - 0.141983, (GLfloat) - 0.506744, + (GLfloat) - 0.849870, (GLfloat) - 0.138328, (GLfloat) - 0.508515, + (GLfloat) - 0.979216, (GLfloat) - 0.120924, (GLfloat) - 0.162831, + (GLfloat) - 0.979161, (GLfloat) - 0.122085, (GLfloat) - 0.162295, + (GLfloat) - 0.968183, (GLfloat) - 0.188900, (GLfloat) - 0.164128, + (GLfloat) - 0.966893, (GLfloat) - 0.198288, (GLfloat) - 0.160620, + (GLfloat) - 0.836326, (GLfloat) - 0.225408, (GLfloat) - 0.499751, + (GLfloat) - 0.836389, (GLfloat) - 0.213159, (GLfloat) - 0.504991, + (GLfloat) - 0.850324, (GLfloat) - 0.141983, (GLfloat) 0.506744, + (GLfloat) - 0.849870, (GLfloat) - 0.138328, (GLfloat) 0.508515, + (GLfloat) - 0.836389, (GLfloat) - 0.213159, (GLfloat) 0.504991, + (GLfloat) - 0.836326, (GLfloat) - 0.225408, (GLfloat) 0.499751, + (GLfloat) - 0.968183, (GLfloat) - 0.188900, (GLfloat) 0.164128, + (GLfloat) - 0.966894, (GLfloat) - 0.198288, (GLfloat) 0.160620, + (GLfloat) - 0.979161, (GLfloat) - 0.122085, (GLfloat) 0.162295, + (GLfloat) - 0.979216, (GLfloat) - 0.120924, (GLfloat) 0.162831, + (GLfloat) - 0.283620, (GLfloat) - 0.936578, (GLfloat) 0.205866, + (GLfloat) - 0.264055, (GLfloat) - 0.947923, (GLfloat) 0.178091, + (GLfloat) - 0.315105, (GLfloat) - 0.946548, (GLfloat) 0.068965, + (GLfloat) - 0.304029, (GLfloat) - 0.949849, (GLfloat) 0.073162, + (GLfloat) - 0.727074, (GLfloat) - 0.675149, (GLfloat) 0.124651, + (GLfloat) - 0.751597, (GLfloat) - 0.644138, (GLfloat) 0.142086, + (GLfloat) - 0.595577, (GLfloat) - 0.717790, (GLfloat) 0.360647, + (GLfloat) - 0.614268, (GLfloat) - 0.686473, (GLfloat) 0.389139, + (GLfloat) - 0.264055, (GLfloat) - 0.947923, (GLfloat) - 0.178092, + (GLfloat) - 0.283620, (GLfloat) - 0.936578, (GLfloat) - 0.205866, + (GLfloat) - 0.595576, (GLfloat) - 0.717790, (GLfloat) - 0.360646, + (GLfloat) - 0.614268, (GLfloat) - 0.686473, (GLfloat) - 0.389139, + (GLfloat) - 0.751597, (GLfloat) - 0.644138, (GLfloat) - 0.142087, + (GLfloat) - 0.727074, (GLfloat) - 0.675149, (GLfloat) - 0.124651, + (GLfloat) - 0.304029, (GLfloat) - 0.949849, (GLfloat) - 0.073163, + (GLfloat) - 0.315105, (GLfloat) - 0.946548, (GLfloat) - 0.068965, + (GLfloat) - 0.511124, (GLfloat) - 0.173862, (GLfloat) 0.841739, + (GLfloat) - 0.507920, (GLfloat) - 0.180984, (GLfloat) 0.842177, + (GLfloat) - 0.167026, (GLfloat) - 0.217709, (GLfloat) 0.961616, + (GLfloat) - 0.163395, (GLfloat) - 0.208930, (GLfloat) 0.964184, + (GLfloat) - 0.162682, (GLfloat) - 0.257426, (GLfloat) 0.952505, + (GLfloat) - 0.162122, (GLfloat) - 0.255564, (GLfloat) 0.953102, + (GLfloat) - 0.501146, (GLfloat) - 0.246358, (GLfloat) 0.829554, + (GLfloat) - 0.502437, (GLfloat) - 0.243295, (GLfloat) 0.829677, + (GLfloat) 0.484153, (GLfloat) - 0.303994, (GLfloat) 0.820478, + (GLfloat) 0.489225, (GLfloat) - 0.294820, (GLfloat) 0.820816, + (GLfloat) 0.489881, (GLfloat) - 0.318876, (GLfloat) 0.811378, + (GLfloat) 0.481923, (GLfloat) - 0.335378, (GLfloat) 0.809489, + (GLfloat) 0.160269, (GLfloat) - 0.275036, (GLfloat) 0.947982, + (GLfloat) 0.153877, (GLfloat) - 0.291476, (GLfloat) 0.944120, + (GLfloat) 0.151647, (GLfloat) - 0.258100, (GLfloat) 0.954142, + (GLfloat) 0.156385, (GLfloat) - 0.248335, (GLfloat) 0.955967, + (GLfloat) 0.205866, (GLfloat) - 0.936578, (GLfloat) 0.283620, + (GLfloat) 0.178092, (GLfloat) - 0.947923, (GLfloat) 0.264055, + (GLfloat) 0.068965, (GLfloat) - 0.946548, (GLfloat) 0.315105, + (GLfloat) 0.073163, (GLfloat) - 0.949849, (GLfloat) 0.304029, + (GLfloat) 0.117913, (GLfloat) - 0.706722, (GLfloat) 0.697597, + (GLfloat) 0.138114, (GLfloat) - 0.672674, (GLfloat) 0.726935, + (GLfloat) 0.341480, (GLfloat) - 0.751053, (GLfloat) 0.565076, + (GLfloat) 0.372365, (GLfloat) - 0.719604, (GLfloat) 0.586101, + (GLfloat) - 0.178091, (GLfloat) - 0.947923, (GLfloat) 0.264055, + (GLfloat) - 0.205866, (GLfloat) - 0.936578, (GLfloat) 0.283620, + (GLfloat) - 0.361213, (GLfloat) - 0.721973, (GLfloat) 0.590152, + (GLfloat) - 0.383785, (GLfloat) - 0.697396, (GLfloat) 0.605267, + (GLfloat) - 0.138779, (GLfloat) - 0.668060, (GLfloat) 0.731052, + (GLfloat) - 0.124478, (GLfloat) - 0.692921, (GLfloat) 0.710188, + (GLfloat) - 0.073162, (GLfloat) - 0.949849, (GLfloat) 0.304029, + (GLfloat) - 0.068965, (GLfloat) - 0.946548, (GLfloat) 0.315105, + (GLfloat) 0.135802, (GLfloat) - 0.982944, (GLfloat) - 0.124011, + (GLfloat) 0.124011, (GLfloat) - 0.982944, (GLfloat) - 0.135802, + (GLfloat) 0.043834, (GLfloat) - 0.993006, (GLfloat) - 0.109621, + (GLfloat) 0.039656, (GLfloat) - 0.992607, (GLfloat) - 0.114709, + (GLfloat) 0.030163, (GLfloat) - 0.998998, (GLfloat) - 0.033079, + (GLfloat) 0.033079, (GLfloat) - 0.998998, (GLfloat) - 0.030163, + (GLfloat) 0.109621, (GLfloat) - 0.993006, (GLfloat) - 0.043834, + (GLfloat) 0.114709, (GLfloat) - 0.992607, (GLfloat) - 0.039656, + (GLfloat) - 0.124011, (GLfloat) - 0.982944, (GLfloat) - 0.135802, + (GLfloat) - 0.135802, (GLfloat) - 0.982944, (GLfloat) - 0.124011, + (GLfloat) - 0.109621, (GLfloat) - 0.993006, (GLfloat) - 0.043834, + (GLfloat) - 0.114709, (GLfloat) - 0.992607, (GLfloat) - 0.039656, + (GLfloat) - 0.033079, (GLfloat) - 0.998998, (GLfloat) - 0.030163, + (GLfloat) - 0.030163, (GLfloat) - 0.998998, (GLfloat) - 0.033079, + (GLfloat) - 0.043834, (GLfloat) - 0.993006, (GLfloat) - 0.109621, + (GLfloat) - 0.039656, (GLfloat) - 0.992607, (GLfloat) - 0.114709, + (GLfloat) - 0.135802, (GLfloat) - 0.982944, (GLfloat) 0.124011, + (GLfloat) - 0.124011, (GLfloat) - 0.982944, (GLfloat) 0.135802, + (GLfloat) - 0.043834, (GLfloat) - 0.993006, (GLfloat) 0.109621, + (GLfloat) - 0.039656, (GLfloat) - 0.992607, (GLfloat) 0.114709, + (GLfloat) - 0.030163, (GLfloat) - 0.998998, (GLfloat) 0.033079, + (GLfloat) - 0.033079, (GLfloat) - 0.998998, (GLfloat) 0.030163, + (GLfloat) - 0.109621, (GLfloat) - 0.993006, (GLfloat) 0.043834, + (GLfloat) - 0.114709, (GLfloat) - 0.992607, (GLfloat) 0.039656, + (GLfloat) 0.124011, (GLfloat) - 0.982944, (GLfloat) 0.135802, + (GLfloat) 0.135802, (GLfloat) - 0.982944, (GLfloat) 0.124011, + (GLfloat) 0.109621, (GLfloat) - 0.993006, (GLfloat) 0.043834, + (GLfloat) 0.114709, (GLfloat) - 0.992607, (GLfloat) 0.039656, + (GLfloat) 0.033079, (GLfloat) - 0.998998, (GLfloat) 0.030163, + (GLfloat) 0.030163, (GLfloat) - 0.998998, (GLfloat) 0.033079, + (GLfloat) 0.043834, (GLfloat) - 0.993006, (GLfloat) 0.109621, + (GLfloat) 0.039656, (GLfloat) - 0.992607, (GLfloat) 0.114709, +}; + +static unsigned short int s1_2_POLS[] = +{ + 3, 12, 76, 74, 1, 3, 12, 74, 82, 1, 3, 22, 78, 74, 1, 3, 22, 74, 76, 1, + 3, 78, 20, 80, 1, 3, 80, 74, 78, 1, 3, 80, 28, 82, 1, 3, 82, 74, 80, 1, + 3, 13, 84, 77, 1, 3, 13, 77, 88, 1, 3, 84, 24, 86, 1, 3, 86, 77, 84, 1, + 3, 86, 20, 78, 1, 3, 78, 77, 86, 1, 3, 22, 88, 77, 1, 3, 22, 77, 78, 1, + 3, 14, 90, 85, 1, 3, 14, 85, 93, 1, 3, 26, 91, 85, 1, 3, 26, 85, 90, 1, + 3, 20, 86, 85, 1, 3, 20, 85, 91, 1, 3, 86, 24, 93, 1, 3, 93, 85, 86, 1, + 3, 15, 95, 79, 1, 3, 15, 79, 97, 1, 3, 95, 28, 80, 1, 3, 80, 79, 95, 1, + 3, 20, 91, 79, 1, 3, 20, 79, 80, 1, 3, 26, 97, 79, 1, 3, 26, 79, 91, 1, + 3, 13, 99, 83, 1, 3, 13, 83, 84, 1, 3, 99, 30, 101, 1, 3, 101, 83, 99, 1, + 3, 23, 102, 83, 1, 3, 23, 83, 101, 1, 3, 24, 84, 83, 1, 3, 24, 83, 102, 1, + 3, 108, 16, 104, 1, 3, 104, 100, 108, 1, 3, 32, 106, 100, 1, 3, 32, 100, 104, 1, + 3, 106, 23, 101, 1, 3, 101, 100, 106, 1, 3, 30, 108, 100, 1, 3, 30, 100, 101, 1, + 3, 17, 110, 105, 1, 3, 17, 105, 113, 1, 3, 110, 33, 111, 1, 3, 111, 105, 110, 1, + 3, 23, 106, 105, 1, 3, 23, 105, 111, 1, 3, 106, 32, 113, 1, 3, 113, 105, 106, 1, + 3, 114, 14, 93, 1, 3, 93, 92, 114, 1, 3, 24, 102, 92, 1, 3, 24, 92, 93, 1, + 3, 23, 111, 92, 1, 3, 23, 92, 102, 1, 3, 33, 114, 92, 1, 3, 33, 92, 111, 1, + 3, 104, 16, 116, 1, 3, 116, 103, 104, 1, 3, 35, 118, 103, 1, 3, 35, 103, 116, 1, + 3, 118, 31, 119, 1, 3, 119, 103, 118, 1, 3, 32, 104, 103, 1, 3, 32, 103, 119, 1, + 3, 125, 18, 121, 1, 3, 121, 117, 125, 1, 3, 36, 123, 117, 1, 3, 36, 117, 121, 1, + 3, 123, 31, 118, 1, 3, 118, 117, 123, 1, 3, 35, 125, 117, 1, 3, 35, 117, 118, 1, + 3, 19, 127, 122, 1, 3, 19, 122, 130, 1, 3, 37, 128, 122, 1, 3, 37, 122, 127, 1, + 3, 128, 31, 123, 1, 3, 123, 122, 128, 1, 3, 36, 130, 122, 1, 3, 36, 122, 123, 1, + 3, 17, 113, 112, 1, 3, 17, 112, 131, 1, 3, 32, 119, 112, 1, 3, 32, 112, 113, 1, + 3, 119, 31, 128, 1, 3, 128, 112, 119, 1, 3, 37, 131, 112, 1, 3, 37, 112, 128, 1, + 3, 121, 18, 133, 1, 3, 133, 120, 121, 1, 3, 39, 134, 120, 1, 3, 39, 120, 133, 1, + 3, 134, 27, 135, 1, 3, 135, 120, 134, 1, 3, 36, 121, 120, 1, 3, 36, 120, 135, 1, + 3, 12, 82, 81, 1, 3, 12, 81, 138, 1, 3, 28, 136, 81, 1, 3, 28, 81, 82, 1, +3, 27, 134, 81, 1, 3, 27, 81, 136, 1, 3, 134, 39, 138, 1, 3, 138, 81, 134, 1, + 3, 95, 15, 139, 1, 3, 139, 94, 95, 1, 3, 40, 140, 94, 1, 3, 40, 94, 139, 1, + 3, 27, 136, 94, 1, 3, 27, 94, 140, 1, 3, 28, 95, 94, 1, 3, 28, 94, 136, 1, + 3, 19, 130, 129, 1, 3, 19, 129, 141, 1, 3, 130, 36, 135, 1, 3, 135, 129, 130, 1, + 3, 27, 140, 129, 1, 3, 27, 129, 135, 1, 3, 140, 40, 141, 1, 3, 141, 129, 140, 1, + 3, 14, 114, 89, 1, 3, 14, 89, 90, 1, 3, 114, 33, 142, 1, 3, 142, 89, 114, 1, + 3, 25, 143, 89, 1, 3, 25, 89, 142, 1, 3, 143, 26, 90, 1, 3, 90, 89, 143, 1, + 3, 17, 131, 109, 1, 3, 17, 109, 110, 1, 3, 131, 37, 144, 1, 3, 144, 109, 131, 1, + 3, 25, 142, 109, 1, 3, 25, 109, 144, 1, 3, 142, 33, 110, 1, 3, 110, 109, 142, 1, + 3, 19, 141, 126, 1, 3, 19, 126, 127, 1, 3, 141, 40, 145, 1, 3, 145, 126, 141, 1, + 3, 25, 144, 126, 1, 3, 25, 126, 145, 1, 3, 144, 37, 127, 1, 3, 127, 126, 144, 1, + 3, 15, 97, 96, 1, 3, 15, 96, 139, 1, 3, 97, 26, 143, 1, 3, 143, 96, 97, 1, +3, 25, 145, 96, 1, 3, 25, 96, 143, 1, 3, 145, 40, 139, 1, 3, 139, 96, 145, 1, + 3, 12, 146, 75, 1, 3, 12, 75, 76, 1, 3, 146, 41, 148, 1, 3, 148, 75, 146, 1, + 3, 21, 149, 75, 1, 3, 21, 75, 148, 1, 3, 149, 22, 76, 1, 3, 76, 75, 149, 1, + 3, 155, 8, 151, 1, 3, 151, 147, 155, 1, 3, 43, 153, 147, 1, 3, 43, 147, 151, 1, + 3, 153, 21, 148, 1, 3, 148, 147, 153, 1, 3, 41, 155, 147, 1, 3, 41, 147, 148, 1, + 3, 160, 11, 157, 1, 3, 157, 152, 160, 1, 3, 44, 158, 152, 1, 3, 44, 152, 157, 1, + 3, 158, 21, 153, 1, 3, 153, 152, 158, 1, 3, 43, 160, 152, 1, 3, 43, 152, 153, 1, + 3, 13, 88, 87, 1, 3, 13, 87, 161, 1, 3, 88, 22, 149, 1, 3, 149, 87, 88, 1, +3, 21, 158, 87, 1, 3, 21, 87, 149, 1, 3, 158, 44, 161, 1, 3, 161, 87, 158, 1, + 3, 18, 162, 132, 1, 3, 18, 132, 133, 1, 3, 162, 45, 164, 1, 3, 164, 132, 162, 1, + 3, 38, 165, 132, 1, 3, 38, 132, 164, 1, 3, 165, 39, 133, 1, 3, 133, 132, 165, 1, + 3, 170, 9, 167, 1, 3, 167, 163, 170, 1, 3, 47, 168, 163, 1, 3, 47, 163, 167, 1, + 3, 168, 38, 164, 1, 3, 164, 163, 168, 1, 3, 45, 170, 163, 1, 3, 45, 163, 164, 1, +3, 8, 155, 154, 1, 3, 8, 154, 173, 1, 3, 155, 41, 171, 1, 3, 171, 154, 155, 1, + 3, 38, 168, 154, 1, 3, 38, 154, 171, 1, 3, 168, 47, 173, 1, 3, 173, 154, 168, 1, + 3, 146, 12, 138, 1, 3, 138, 137, 146, 1, 3, 39, 165, 137, 1, 3, 39, 137, 138, 1, + 3, 165, 38, 171, 1, 3, 171, 137, 165, 1, 3, 41, 146, 137, 1, 3, 41, 137, 171, 1, + 3, 16, 108, 107, 1, 3, 16, 107, 177, 1, 3, 108, 30, 174, 1, 3, 174, 107, 108, 1, + 3, 29, 176, 107, 1, 3, 29, 107, 174, 1, 3, 176, 50, 177, 1, 3, 177, 107, 176, 1, + 3, 99, 13, 161, 1, 3, 161, 98, 99, 1, 3, 44, 178, 98, 1, 3, 44, 98, 161, 1, + 3, 178, 29, 174, 1, 3, 174, 98, 178, 1, 3, 30, 99, 98, 1, 3, 30, 98, 174, 1, + 3, 11, 180, 156, 1, 3, 11, 156, 157, 1, 3, 180, 49, 181, 1, 3, 181, 156, 180, 1, + 3, 29, 178, 156, 1, 3, 29, 156, 181, 1, 3, 178, 44, 157, 1, 3, 157, 156, 178, 1, + 3, 185, 10, 183, 1, 3, 183, 175, 185, 1, 3, 50, 176, 175, 1, 3, 50, 175, 183, 1, + 3, 176, 29, 181, 1, 3, 181, 175, 176, 1, 3, 49, 185, 175, 1, 3, 49, 175, 181, 1, + 3, 162, 18, 125, 1, 3, 125, 124, 162, 1, 3, 35, 186, 124, 1, 3, 35, 124, 125, 1, + 3, 186, 34, 187, 1, 3, 187, 124, 186, 1, 3, 45, 162, 124, 1, 3, 45, 124, 187, 1, + 3, 116, 16, 177, 1, 3, 177, 115, 116, 1, 3, 50, 188, 115, 1, 3, 50, 115, 177, 1, + 3, 188, 34, 186, 1, 3, 186, 115, 188, 1, 3, 35, 116, 115, 1, 3, 35, 115, 186, 1, + 3, 183, 10, 190, 1, 3, 190, 182, 183, 1, 3, 52, 191, 182, 1, 3, 52, 182, 190, 1, + 3, 191, 34, 188, 1, 3, 188, 182, 191, 1, 3, 188, 50, 183, 1, 3, 183, 182, 188, 1, + 3, 193, 9, 170, 1, 3, 170, 169, 193, 1, 3, 170, 45, 187, 1, 3, 187, 169, 170, 1, + 3, 187, 34, 191, 1, 3, 191, 169, 187, 1, 3, 52, 193, 169, 1, 3, 52, 169, 191, 1, +3, 1, 196, 194, 1, 3, 1, 194, 201, 1, 3, 54, 198, 194, 1, 3, 54, 194, 196, 1, + 3, 198, 46, 199, 1, 3, 199, 194, 198, 1, 3, 199, 56, 201, 1, 3, 201, 194, 199, 1, +3, 3, 203, 197, 1, 3, 3, 197, 206, 1, 3, 203, 55, 204, 1, 3, 204, 197, 203, 1, + 3, 46, 198, 197, 1, 3, 46, 197, 204, 1, 3, 198, 54, 206, 1, 3, 206, 197, 198, 1, + 3, 208, 8, 173, 1, 3, 173, 172, 208, 1, 3, 47, 207, 172, 1, 3, 47, 172, 173, 1, + 3, 207, 46, 204, 1, 3, 204, 172, 207, 1, 3, 55, 208, 172, 1, 3, 55, 172, 204, 1, +3, 9, 209, 166, 1, 3, 9, 166, 167, 1, 3, 56, 199, 166, 1, 3, 56, 166, 209, 1, + 3, 46, 207, 166, 1, 3, 46, 166, 199, 1, 3, 207, 47, 167, 1, 3, 167, 166, 207, 1, +3, 1, 201, 200, 1, 3, 1, 200, 214, 1, 3, 201, 56, 210, 1, 3, 210, 200, 201, 1, + 3, 51, 212, 200, 1, 3, 51, 200, 210, 1, 3, 212, 59, 214, 1, 3, 214, 200, 212, 1, + 3, 209, 9, 193, 1, 3, 193, 192, 209, 1, 3, 52, 215, 192, 1, 3, 52, 192, 193, 1, + 3, 215, 51, 210, 1, 3, 210, 192, 215, 1, 3, 56, 209, 192, 1, 3, 56, 192, 210, 1, + 3, 190, 10, 216, 1, 3, 216, 189, 190, 1, 3, 57, 217, 189, 1, 3, 57, 189, 216, 1, + 3, 217, 51, 215, 1, 3, 215, 189, 217, 1, 3, 52, 190, 189, 1, 3, 52, 189, 215, 1, +3, 0, 219, 211, 1, 3, 0, 211, 221, 1, 3, 219, 59, 212, 1, 3, 212, 211, 219, 1, + 3, 51, 217, 211, 1, 3, 51, 211, 212, 1, 3, 217, 57, 221, 1, 3, 221, 211, 217, 1, +3, 0, 221, 220, 1, 3, 0, 220, 226, 1, 3, 221, 57, 222, 1, 3, 222, 220, 221, 1, + 3, 222, 48, 224, 1, 3, 224, 220, 222, 1, 3, 62, 226, 220, 1, 3, 62, 220, 224, 1, + 3, 10, 185, 184, 1, 3, 10, 184, 216, 1, 3, 185, 49, 227, 1, 3, 227, 184, 185, 1, + 3, 48, 222, 184, 1, 3, 48, 184, 227, 1, 3, 57, 216, 184, 1, 3, 57, 184, 222, 1, + 3, 180, 11, 228, 1, 3, 228, 179, 180, 1, 3, 60, 229, 179, 1, 3, 60, 179, 228, 1, + 3, 229, 48, 227, 1, 3, 227, 179, 229, 1, 3, 49, 180, 179, 1, 3, 49, 179, 227, 1, +3, 2, 231, 223, 1, 3, 2, 223, 233, 1, 3, 231, 62, 224, 1, 3, 224, 223, 231, 1, + 3, 48, 229, 223, 1, 3, 48, 223, 224, 1, 3, 229, 60, 233, 1, 3, 233, 223, 229, 1, +3, 2, 233, 232, 1, 3, 2, 232, 237, 1, 3, 233, 60, 234, 1, 3, 234, 232, 233, 1, + 3, 42, 235, 232, 1, 3, 42, 232, 234, 1, 3, 235, 64, 237, 1, 3, 237, 232, 235, 1, + 3, 228, 11, 160, 1, 3, 160, 159, 228, 1, 3, 43, 238, 159, 1, 3, 43, 159, 160, 1, + 3, 238, 42, 234, 1, 3, 234, 159, 238, 1, 3, 60, 228, 159, 1, 3, 60, 159, 234, 1, + 3, 151, 8, 208, 1, 3, 208, 150, 151, 1, 3, 55, 239, 150, 1, 3, 55, 150, 208, 1, + 3, 239, 42, 238, 1, 3, 238, 150, 239, 1, 3, 43, 151, 150, 1, 3, 43, 150, 238, 1, +3, 3, 241, 202, 1, 3, 3, 202, 203, 1, 3, 241, 64, 235, 1, 3, 235, 202, 241, 1, + 3, 42, 239, 202, 1, 3, 42, 202, 235, 1, 3, 239, 55, 203, 1, 3, 203, 202, 239, 1, + 3, 245, 2, 237, 1, 3, 237, 236, 245, 1, 3, 64, 242, 236, 1, 3, 64, 236, 237, 1, + 3, 242, 63, 244, 1, 3, 244, 236, 242, 1, 3, 68, 245, 236, 1, 3, 68, 236, 244, 1, + 3, 241, 3, 246, 1, 3, 246, 240, 241, 1, 3, 65, 248, 240, 1, 3, 65, 240, 246, 1, + 3, 248, 63, 242, 1, 3, 242, 240, 248, 1, 3, 64, 241, 240, 1, 3, 64, 240, 242, 1, +3, 4, 250, 247, 1, 3, 4, 247, 253, 1, 3, 67, 251, 247, 1, 3, 67, 247, 250, 1, + 3, 63, 248, 247, 1, 3, 63, 247, 251, 1, 3, 248, 65, 253, 1, 3, 253, 247, 248, 1, +3, 7, 255, 243, 1, 3, 7, 243, 257, 1, 3, 255, 68, 244, 1, 3, 244, 243, 255, 1, + 3, 63, 251, 243, 1, 3, 63, 243, 244, 1, 3, 67, 257, 243, 1, 3, 67, 243, 251, 1, + 3, 246, 3, 206, 1, 3, 206, 205, 246, 1, 3, 54, 258, 205, 1, 3, 54, 205, 206, 1, + 3, 258, 53, 259, 1, 3, 259, 205, 258, 1, 3, 65, 246, 205, 1, 3, 65, 205, 259, 1, + 3, 196, 1, 260, 1, 3, 260, 195, 196, 1, 3, 69, 262, 195, 1, 3, 69, 195, 260, 1, + 3, 53, 258, 195, 1, 3, 53, 195, 262, 1, 3, 258, 54, 196, 1, 3, 196, 195, 258, 1, +3, 5, 264, 261, 1, 3, 5, 261, 267, 1, 3, 70, 265, 261, 1, 3, 70, 261, 264, 1, + 3, 53, 262, 261, 1, 3, 53, 261, 265, 1, 3, 262, 69, 267, 1, 3, 267, 261, 262, 1, +3, 4, 253, 252, 1, 3, 4, 252, 268, 1, 3, 253, 65, 259, 1, 3, 259, 252, 253, 1, + 3, 53, 265, 252, 1, 3, 53, 252, 259, 1, 3, 70, 268, 252, 1, 3, 70, 252, 265, 1, + 3, 260, 1, 214, 1, 3, 214, 213, 260, 1, 3, 59, 269, 213, 1, 3, 59, 213, 214, 1, + 3, 269, 58, 270, 1, 3, 270, 213, 269, 1, 3, 69, 260, 213, 1, 3, 69, 213, 270, 1, + 3, 219, 0, 271, 1, 3, 271, 218, 219, 1, 3, 71, 273, 218, 1, 3, 71, 218, 271, 1, + 3, 273, 58, 269, 1, 3, 269, 218, 273, 1, 3, 59, 219, 218, 1, 3, 59, 218, 269, 1, +3, 6, 275, 272, 1, 3, 6, 272, 278, 1, 3, 72, 276, 272, 1, 3, 72, 272, 275, 1, + 3, 58, 273, 272, 1, 3, 58, 272, 276, 1, 3, 273, 71, 278, 1, 3, 278, 272, 273, 1, +3, 5, 267, 266, 1, 3, 5, 266, 279, 1, 3, 267, 69, 270, 1, 3, 270, 266, 267, 1, + 3, 58, 276, 266, 1, 3, 58, 266, 270, 1, 3, 72, 279, 266, 1, 3, 72, 266, 276, 1, + 3, 271, 0, 226, 1, 3, 226, 225, 271, 1, 3, 226, 62, 280, 1, 3, 280, 225, 226, 1, + 3, 61, 281, 225, 1, 3, 61, 225, 280, 1, 3, 71, 271, 225, 1, 3, 71, 225, 281, 1, + 3, 231, 2, 245, 1, 3, 245, 230, 231, 1, 3, 68, 282, 230, 1, 3, 68, 230, 245, 1, + 3, 282, 61, 280, 1, 3, 280, 230, 282, 1, 3, 62, 231, 230, 1, 3, 62, 230, 280, 1, +3, 7, 283, 254, 1, 3, 7, 254, 255, 1, 3, 73, 284, 254, 1, 3, 73, 254, 283, 1, + 3, 61, 282, 254, 1, 3, 61, 254, 284, 1, 3, 282, 68, 255, 1, 3, 255, 254, 282, 1, +3, 6, 278, 277, 1, 3, 6, 277, 285, 1, 3, 278, 71, 281, 1, 3, 281, 277, 278, 1, + 3, 61, 284, 277, 1, 3, 61, 277, 281, 1, 3, 73, 285, 277, 1, 3, 73, 277, 284, 1, +3, 4, 268, 249, 1, 3, 4, 249, 250, 1, 3, 268, 70, 286, 1, 3, 286, 249, 268, 1, + 3, 66, 287, 249, 1, 3, 66, 249, 286, 1, 3, 287, 67, 250, 1, 3, 250, 249, 287, 1, +3, 5, 279, 263, 1, 3, 5, 263, 264, 1, 3, 279, 72, 288, 1, 3, 288, 263, 279, 1, + 3, 66, 286, 263, 1, 3, 66, 263, 288, 1, 3, 286, 70, 264, 1, 3, 264, 263, 286, 1, +3, 6, 285, 274, 1, 3, 6, 274, 275, 1, 3, 285, 73, 289, 1, 3, 289, 274, 285, 1, + 3, 66, 288, 274, 1, 3, 66, 274, 289, 1, 3, 288, 72, 275, 1, 3, 275, 274, 288, 1, +3, 7, 257, 256, 1, 3, 7, 256, 283, 1, 3, 257, 67, 287, 1, 3, 287, 256, 257, 1, + 3, 66, 289, 256, 1, 3, 66, 256, 287, 1, 3, 289, 73, 283, 1, 3, 283, 256, 289, 1, + + 0 +}; + +struct lwo LWO_s1_2 = +{ + 290, /* number of points */ + s1_2_PNTS, s1_2_normals, s1_2_POLS, 0L +}; + +#endif /* USE_GL */ + +/* End of s1_2.c */ diff --git a/hacks/glx/s1_3.c b/hacks/glx/s1_3.c new file mode 100644 index 00000000..53057ac8 --- /dev/null +++ b/hacks/glx/s1_3.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_3.c 4.2 97/04/20 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render "s1_3" in 3D. + * + * Generated by lw2ogl. Link this with your program but do + * not edit by hand. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat s1_3_PNTS[] = +{ + (GLfloat) 0.386176, (GLfloat) 0.201223, (GLfloat) - 0.326853, + (GLfloat) 0.386176, (GLfloat) 0.201223, (GLfloat) - 0.673147, + (GLfloat) 0.704261, (GLfloat) 0.116939, (GLfloat) - 0.326853, + (GLfloat) 0.704261, (GLfloat) 0.116939, (GLfloat) - 0.673147, + (GLfloat) 0.642426, (GLfloat) 0.035438, (GLfloat) - 0.638667, + (GLfloat) 0.369306, (GLfloat) 0.083596, (GLfloat) - 0.638667, + (GLfloat) 0.369306, (GLfloat) 0.083596, (GLfloat) - 0.361333, + (GLfloat) 0.642426, (GLfloat) 0.035438, (GLfloat) - 0.361333, + (GLfloat) 0.845007, (GLfloat) 0.268518, (GLfloat) - 0.678159, + (GLfloat) 0.620074, (GLfloat) 0.472355, (GLfloat) - 0.678159, + (GLfloat) 0.620074, (GLfloat) 0.472355, (GLfloat) - 0.321841, + (GLfloat) 0.845007, (GLfloat) 0.268518, (GLfloat) - 0.321841, + (GLfloat) 1.115671, (GLfloat) 0.352342, (GLfloat) - 0.673147, + (GLfloat) 1.115671, (GLfloat) 0.352342, (GLfloat) - 0.326853, + (GLfloat) 1.204957, (GLfloat) 0.421449, (GLfloat) - 0.361333, + (GLfloat) 1.204957, (GLfloat) 0.421449, (GLfloat) - 0.638667, + (GLfloat) 0.937575, (GLfloat) 0.636550, (GLfloat) - 0.326853, + (GLfloat) 1.066291, (GLfloat) 0.661627, (GLfloat) - 0.361333, + (GLfloat) 0.937575, (GLfloat) 0.636550, (GLfloat) - 0.673147, + (GLfloat) 1.066291, (GLfloat) 0.661627, (GLfloat) - 0.638667, + (GLfloat) 1.227578, (GLfloat) 0.320768, (GLfloat) - 0.500000, + (GLfloat) 1.017091, (GLfloat) 0.274757, (GLfloat) - 0.500000, + (GLfloat) 1.148052, (GLfloat) 0.300668, (GLfloat) - 0.500000, + (GLfloat) 1.107591, (GLfloat) 0.526937, (GLfloat) - 0.260702, + (GLfloat) 1.194861, (GLfloat) 0.375780, (GLfloat) - 0.324904, + (GLfloat) 1.151611, (GLfloat) 0.550768, (GLfloat) - 0.500000, + (GLfloat) 1.230206, (GLfloat) 0.391113, (GLfloat) - 0.500000, + (GLfloat) 1.107591, (GLfloat) 0.526937, (GLfloat) - 0.739298, + (GLfloat) 1.194861, (GLfloat) 0.375780, (GLfloat) - 0.675096, + (GLfloat) 0.885754, (GLfloat) 0.445570, (GLfloat) - 0.261655, + (GLfloat) 1.026623, (GLfloat) 0.494446, (GLfloat) - 0.263891, + (GLfloat) 0.987605, (GLfloat) 0.733106, (GLfloat) - 0.500000, + (GLfloat) 1.019270, (GLfloat) 0.677486, (GLfloat) - 0.324904, + (GLfloat) 1.141425, (GLfloat) 0.544887, (GLfloat) - 0.322437, + (GLfloat) 0.754416, (GLfloat) 0.616383, (GLfloat) - 0.500000, + (GLfloat) 0.905194, (GLfloat) 0.688224, (GLfloat) - 0.500000, + (GLfloat) 1.019270, (GLfloat) 0.677486, (GLfloat) - 0.675096, + (GLfloat) 1.052644, (GLfloat) 0.698661, (GLfloat) - 0.500000, + (GLfloat) 0.885754, (GLfloat) 0.445570, (GLfloat) - 0.738345, + (GLfloat) 1.026623, (GLfloat) 0.494446, (GLfloat) - 0.736109, + (GLfloat) 1.141425, (GLfloat) 0.544887, (GLfloat) - 0.677562, + (GLfloat) 0.982068, (GLfloat) 0.320307, (GLfloat) - 0.674787, + (GLfloat) 0.801608, (GLfloat) 0.169177, (GLfloat) - 0.500000, + (GLfloat) 0.885904, (GLfloat) 0.231457, (GLfloat) - 0.500000, + (GLfloat) 0.982068, (GLfloat) 0.320307, (GLfloat) - 0.325213, + (GLfloat) 0.789439, (GLfloat) 0.570833, (GLfloat) - 0.674787, + (GLfloat) 0.617093, (GLfloat) 0.264045, (GLfloat) - 0.738345, + (GLfloat) 0.732540, (GLfloat) 0.370437, (GLfloat) - 0.742944, + (GLfloat) 0.617093, (GLfloat) 0.264045, (GLfloat) - 0.261655, + (GLfloat) 0.732540, (GLfloat) 0.370437, (GLfloat) - 0.257056, + (GLfloat) 0.789439, (GLfloat) 0.570833, (GLfloat) - 0.325213, + (GLfloat) 0.432577, (GLfloat) 0.358913, (GLfloat) - 0.500000, + (GLfloat) 0.579177, (GLfloat) 0.509417, (GLfloat) - 0.500000, + (GLfloat) 0.513237, (GLfloat) 0.088956, (GLfloat) - 0.739298, + (GLfloat) 0.545218, (GLfloat) 0.159081, (GLfloat) - 0.736109, + (GLfloat) 0.752404, (GLfloat) 0.194475, (GLfloat) - 0.674787, + (GLfloat) 0.481782, (GLfloat) 0.333615, (GLfloat) - 0.674787, + (GLfloat) 0.481782, (GLfloat) 0.333615, (GLfloat) - 0.325213, + (GLfloat) 0.279139, (GLfloat) 0.132156, (GLfloat) - 0.500000, + (GLfloat) 0.328343, (GLfloat) 0.216547, (GLfloat) - 0.500000, + (GLfloat) 0.752404, (GLfloat) 0.194475, (GLfloat) - 0.325213, + (GLfloat) 0.513237, (GLfloat) 0.088956, (GLfloat) - 0.260702, + (GLfloat) 0.545218, (GLfloat) 0.159081, (GLfloat) - 0.263891, + (GLfloat) 0.747335, (GLfloat) 0.045755, (GLfloat) - 0.500000, + (GLfloat) 0.762094, (GLfloat) 0.101615, (GLfloat) - 0.500000, + (GLfloat) 0.684631, (GLfloat) 0.057942, (GLfloat) - 0.675096, + (GLfloat) 0.502661, (GLfloat) 0.041337, (GLfloat) - 0.500000, + (GLfloat) 0.679568, (GLfloat) 0.022087, (GLfloat) - 0.500000, + (GLfloat) 0.684631, (GLfloat) 0.057942, (GLfloat) - 0.324904, + (GLfloat) 0.342054, (GLfloat) 0.121167, (GLfloat) - 0.675096, + (GLfloat) 0.504703, (GLfloat) 0.052920, (GLfloat) - 0.677562, + (GLfloat) 0.342054, (GLfloat) 0.121167, (GLfloat) - 0.324904, + (GLfloat) 0.329838, (GLfloat) 0.083754, (GLfloat) - 0.500000, + (GLfloat) 0.504703, (GLfloat) 0.052920, (GLfloat) - 0.322437, + (GLfloat) 1.188046, (GLfloat) 0.322006, (GLfloat) - 0.596277, + (GLfloat) 1.077742, (GLfloat) 0.301825, (GLfloat) - 0.594388, + (GLfloat) 1.139957, (GLfloat) 0.313586, (GLfloat) - 0.594444, + (GLfloat) 1.188046, (GLfloat) 0.322006, (GLfloat) - 0.403722, + (GLfloat) 1.196159, (GLfloat) 0.308395, (GLfloat) - 0.500000, + (GLfloat) 1.230706, (GLfloat) 0.358565, (GLfloat) - 0.587500, + (GLfloat) 1.219224, (GLfloat) 0.334520, (GLfloat) - 0.595444, + (GLfloat) 1.123141, (GLfloat) 0.430895, (GLfloat) - 0.724648, + (GLfloat) 1.163707, (GLfloat) 0.362839, (GLfloat) - 0.676509, + (GLfloat) 1.123141, (GLfloat) 0.430895, (GLfloat) - 0.275352, + (GLfloat) 1.163707, (GLfloat) 0.362839, (GLfloat) - 0.323491, + (GLfloat) 1.230706, (GLfloat) 0.358565, (GLfloat) - 0.412500, + (GLfloat) 1.219224, (GLfloat) 0.334520, (GLfloat) - 0.404556, + (GLfloat) 1.077742, (GLfloat) 0.301825, (GLfloat) - 0.405612, + (GLfloat) 1.139957, (GLfloat) 0.313586, (GLfloat) - 0.405556, + (GLfloat) 1.191900, (GLfloat) 0.469528, (GLfloat) - 0.409500, + (GLfloat) 1.221821, (GLfloat) 0.401211, (GLfloat) - 0.417500, + (GLfloat) 1.239508, (GLfloat) 0.345749, (GLfloat) - 0.500000, + (GLfloat) 1.171456, (GLfloat) 0.461189, (GLfloat) - 0.294000, + (GLfloat) 1.207091, (GLfloat) 0.397037, (GLfloat) - 0.339125, + (GLfloat) 1.171456, (GLfloat) 0.461189, (GLfloat) - 0.706000, + (GLfloat) 1.207091, (GLfloat) 0.397037, (GLfloat) - 0.660875, + (GLfloat) 1.191900, (GLfloat) 0.469528, (GLfloat) - 0.590500, + (GLfloat) 1.221821, (GLfloat) 0.401211, (GLfloat) - 0.582500, + (GLfloat) 1.011218, (GLfloat) 0.399402, (GLfloat) - 0.279763, + (GLfloat) 1.075195, (GLfloat) 0.416935, (GLfloat) - 0.279631, + (GLfloat) 1.025784, (GLfloat) 0.594229, (GLfloat) - 0.275352, + (GLfloat) 1.074463, (GLfloat) 0.512562, (GLfloat) - 0.259306, + (GLfloat) 1.155185, (GLfloat) 0.444556, (GLfloat) - 0.276838, + (GLfloat) 0.960879, (GLfloat) 0.703118, (GLfloat) - 0.403722, + (GLfloat) 0.985218, (GLfloat) 0.662285, (GLfloat) - 0.323491, + (GLfloat) 1.083956, (GLfloat) 0.612743, (GLfloat) - 0.294000, + (GLfloat) 1.059471, (GLfloat) 0.609015, (GLfloat) - 0.276838, + (GLfloat) 0.911431, (GLfloat) 0.545768, (GLfloat) - 0.279763, + (GLfloat) 0.978052, (GLfloat) 0.571957, (GLfloat) - 0.279631, + (GLfloat) 1.101400, (GLfloat) 0.626279, (GLfloat) - 0.409500, + (GLfloat) 1.098258, (GLfloat) 0.615227, (GLfloat) - 0.335375, + (GLfloat) 1.128758, (GLfloat) 0.537574, (GLfloat) - 0.278500, + (GLfloat) 1.024706, (GLfloat) 0.715367, (GLfloat) - 0.412500, + (GLfloat) 1.046216, (GLfloat) 0.675680, (GLfloat) - 0.339125, + (GLfloat) 1.180758, (GLfloat) 0.472333, (GLfloat) - 0.335375, + (GLfloat) 0.844907, (GLfloat) 0.643346, (GLfloat) - 0.405612, + (GLfloat) 0.913289, (GLfloat) 0.675305, (GLfloat) - 0.405556, + (GLfloat) 0.960879, (GLfloat) 0.703118, (GLfloat) - 0.596277, + (GLfloat) 0.952766, (GLfloat) 0.716730, (GLfloat) - 0.500000, + (GLfloat) 0.995432, (GLfloat) 0.719051, (GLfloat) - 0.404556, + (GLfloat) 1.025784, (GLfloat) 0.594229, (GLfloat) - 0.724648, + (GLfloat) 0.985218, (GLfloat) 0.662285, (GLfloat) - 0.676509, + (GLfloat) 1.024706, (GLfloat) 0.715367, (GLfloat) - 0.587500, + (GLfloat) 0.995432, (GLfloat) 0.719051, (GLfloat) - 0.595444, + (GLfloat) 0.844907, (GLfloat) 0.643346, (GLfloat) - 0.594388, + (GLfloat) 0.913289, (GLfloat) 0.675305, (GLfloat) - 0.594444, + (GLfloat) 1.101400, (GLfloat) 0.626279, (GLfloat) - 0.590500, + (GLfloat) 1.057196, (GLfloat) 0.686350, (GLfloat) - 0.582500, + (GLfloat) 1.018008, (GLfloat) 0.729398, (GLfloat) - 0.500000, + (GLfloat) 1.083956, (GLfloat) 0.612743, (GLfloat) - 0.706000, + (GLfloat) 1.046216, (GLfloat) 0.675680, (GLfloat) - 0.660875, + (GLfloat) 1.057196, (GLfloat) 0.686350, (GLfloat) - 0.417500, + (GLfloat) 0.911431, (GLfloat) 0.545768, (GLfloat) - 0.720237, + (GLfloat) 0.978052, (GLfloat) 0.571957, (GLfloat) - 0.720369, + (GLfloat) 1.074463, (GLfloat) 0.512562, (GLfloat) - 0.740694, + (GLfloat) 1.059471, (GLfloat) 0.609015, (GLfloat) - 0.723162, + (GLfloat) 1.155185, (GLfloat) 0.444556, (GLfloat) - 0.723162, + (GLfloat) 1.011218, (GLfloat) 0.399402, (GLfloat) - 0.720237, + (GLfloat) 1.075195, (GLfloat) 0.416935, (GLfloat) - 0.720369, + (GLfloat) 1.180758, (GLfloat) 0.472333, (GLfloat) - 0.664625, + (GLfloat) 1.128758, (GLfloat) 0.537574, (GLfloat) - 0.721500, + (GLfloat) 1.098258, (GLfloat) 0.615227, (GLfloat) - 0.664625, + (GLfloat) 1.149055, (GLfloat) 0.549292, (GLfloat) - 0.402250, + (GLfloat) 1.197930, (GLfloat) 0.464638, (GLfloat) - 0.500000, + (GLfloat) 1.100180, (GLfloat) 0.633946, (GLfloat) - 0.500000, + (GLfloat) 1.149055, (GLfloat) 0.549292, (GLfloat) - 0.597750, + (GLfloat) 1.052796, (GLfloat) 0.338416, (GLfloat) - 0.673044, + (GLfloat) 0.938670, (GLfloat) 0.265970, (GLfloat) - 0.596525, + (GLfloat) 1.008335, (GLfloat) 0.286145, (GLfloat) - 0.595338, + (GLfloat) 1.086058, (GLfloat) 0.289628, (GLfloat) - 0.500000, + (GLfloat) 0.826297, (GLfloat) 0.209826, (GLfloat) - 0.596525, + (GLfloat) 0.875679, (GLfloat) 0.240722, (GLfloat) - 0.597178, + (GLfloat) 0.938670, (GLfloat) 0.265970, (GLfloat) - 0.403475, + (GLfloat) 0.948068, (GLfloat) 0.255539, (GLfloat) - 0.500000, + (GLfloat) 0.863485, (GLfloat) 0.349410, (GLfloat) - 0.725225, + (GLfloat) 0.910476, (GLfloat) 0.297260, (GLfloat) - 0.676962, + (GLfloat) 0.863485, (GLfloat) 0.349410, (GLfloat) - 0.274775, + (GLfloat) 0.910476, (GLfloat) 0.297260, (GLfloat) - 0.323037, + (GLfloat) 1.008335, (GLfloat) 0.286145, (GLfloat) - 0.404662, + (GLfloat) 0.826297, (GLfloat) 0.209826, (GLfloat) - 0.403475, + (GLfloat) 0.875679, (GLfloat) 0.240722, (GLfloat) - 0.402822, + (GLfloat) 1.052796, (GLfloat) 0.338416, (GLfloat) - 0.326956, + (GLfloat) 0.869854, (GLfloat) 0.606754, (GLfloat) - 0.673044, + (GLfloat) 0.750708, (GLfloat) 0.474572, (GLfloat) - 0.725225, + (GLfloat) 0.833218, (GLfloat) 0.513896, (GLfloat) - 0.722456, + (GLfloat) 0.961325, (GLfloat) 0.472585, (GLfloat) - 0.735969, + (GLfloat) 0.601974, (GLfloat) 0.366500, (GLfloat) - 0.725225, + (GLfloat) 0.671195, (GLfloat) 0.426029, (GLfloat) - 0.726748, + (GLfloat) 0.807096, (GLfloat) 0.411991, (GLfloat) - 0.741313, + (GLfloat) 0.675523, (GLfloat) 0.558012, (GLfloat) - 0.596525, + (GLfloat) 0.703717, (GLfloat) 0.526722, (GLfloat) - 0.676962, + (GLfloat) 0.938289, (GLfloat) 0.377245, (GLfloat) - 0.722456, + (GLfloat) 0.736568, (GLfloat) 0.272496, (GLfloat) - 0.725225, + (GLfloat) 0.793886, (GLfloat) 0.314845, (GLfloat) - 0.726748, + (GLfloat) 0.961325, (GLfloat) 0.472585, (GLfloat) - 0.264031, + (GLfloat) 0.750708, (GLfloat) 0.474572, (GLfloat) - 0.274775, + (GLfloat) 0.833218, (GLfloat) 0.513896, (GLfloat) - 0.277544, + (GLfloat) 0.869854, (GLfloat) 0.606754, (GLfloat) - 0.326956, + (GLfloat) 0.938289, (GLfloat) 0.377245, (GLfloat) - 0.277544, + (GLfloat) 0.736568, (GLfloat) 0.272496, (GLfloat) - 0.274775, + (GLfloat) 0.793886, (GLfloat) 0.314845, (GLfloat) - 0.273252, + (GLfloat) 0.807096, (GLfloat) 0.411991, (GLfloat) - 0.258687, + (GLfloat) 0.675523, (GLfloat) 0.558012, (GLfloat) - 0.403475, + (GLfloat) 0.703717, (GLfloat) 0.526722, (GLfloat) - 0.323037, + (GLfloat) 0.601974, (GLfloat) 0.366500, (GLfloat) - 0.274775, + (GLfloat) 0.671195, (GLfloat) 0.426029, (GLfloat) - 0.273252, + (GLfloat) 0.836591, (GLfloat) 0.655543, (GLfloat) - 0.500000, + (GLfloat) 0.763171, (GLfloat) 0.604996, (GLfloat) - 0.595338, + (GLfloat) 0.763171, (GLfloat) 0.604996, (GLfloat) - 0.404662, + (GLfloat) 0.512245, (GLfloat) 0.429169, (GLfloat) - 0.403475, + (GLfloat) 0.589401, (GLfloat) 0.500151, (GLfloat) - 0.402822, + (GLfloat) 0.666125, (GLfloat) 0.568442, (GLfloat) - 0.500000, + (GLfloat) 0.512245, (GLfloat) 0.429169, (GLfloat) - 0.596525, + (GLfloat) 0.589401, (GLfloat) 0.500151, (GLfloat) - 0.597178, + (GLfloat) 0.495371, (GLfloat) 0.238512, (GLfloat) - 0.720237, + (GLfloat) 0.432817, (GLfloat) 0.138665, (GLfloat) - 0.724648, + (GLfloat) 0.458468, (GLfloat) 0.182068, (GLfloat) - 0.720369, + (GLfloat) 0.656244, (GLfloat) 0.179386, (GLfloat) - 0.720237, + (GLfloat) 0.575807, (GLfloat) 0.208949, (GLfloat) - 0.735969, + (GLfloat) 0.543287, (GLfloat) 0.301992, (GLfloat) - 0.722456, + (GLfloat) 0.388123, (GLfloat) 0.277930, (GLfloat) - 0.594388, + (GLfloat) 0.428341, (GLfloat) 0.263148, (GLfloat) - 0.673044, + (GLfloat) 0.763492, (GLfloat) 0.139968, (GLfloat) - 0.594388, + (GLfloat) 0.723274, (GLfloat) 0.154750, (GLfloat) - 0.673044, + (GLfloat) 0.690899, (GLfloat) 0.226098, (GLfloat) - 0.722456, + (GLfloat) 0.617440, (GLfloat) 0.099959, (GLfloat) - 0.724648, + (GLfloat) 0.631969, (GLfloat) 0.136095, (GLfloat) - 0.720369, + (GLfloat) 0.669271, (GLfloat) 0.319498, (GLfloat) - 0.741313, + (GLfloat) 0.792649, (GLfloat) 0.233327, (GLfloat) - 0.676962, + (GLfloat) 0.545894, (GLfloat) 0.405668, (GLfloat) - 0.676962, + (GLfloat) 0.444878, (GLfloat) 0.352588, (GLfloat) - 0.595338, + (GLfloat) 0.388123, (GLfloat) 0.277930, (GLfloat) - 0.405612, + (GLfloat) 0.374717, (GLfloat) 0.282857, (GLfloat) - 0.500000, + (GLfloat) 0.309735, (GLfloat) 0.164469, (GLfloat) - 0.596277, + (GLfloat) 0.342801, (GLfloat) 0.212716, (GLfloat) - 0.594444, + (GLfloat) 0.501029, (GLfloat) 0.437003, (GLfloat) - 0.500000, + (GLfloat) 0.545894, (GLfloat) 0.405668, (GLfloat) - 0.323037, + (GLfloat) 0.444878, (GLfloat) 0.352588, (GLfloat) - 0.404662, + (GLfloat) 0.309735, (GLfloat) 0.164469, (GLfloat) - 0.403722, + (GLfloat) 0.342801, (GLfloat) 0.212716, (GLfloat) - 0.405556, + (GLfloat) 0.495371, (GLfloat) 0.238512, (GLfloat) - 0.279763, + (GLfloat) 0.428341, (GLfloat) 0.263148, (GLfloat) - 0.326956, + (GLfloat) 0.543287, (GLfloat) 0.301992, (GLfloat) - 0.277544, + (GLfloat) 0.656244, (GLfloat) 0.179386, (GLfloat) - 0.279763, + (GLfloat) 0.575807, (GLfloat) 0.208949, (GLfloat) - 0.264031, + (GLfloat) 0.432817, (GLfloat) 0.138665, (GLfloat) - 0.275352, + (GLfloat) 0.458468, (GLfloat) 0.182068, (GLfloat) - 0.279631, + (GLfloat) 0.669271, (GLfloat) 0.319498, (GLfloat) - 0.258687, + (GLfloat) 0.792649, (GLfloat) 0.233327, (GLfloat) - 0.323037, + (GLfloat) 0.690899, (GLfloat) 0.226098, (GLfloat) - 0.277544, + (GLfloat) 0.617440, (GLfloat) 0.099959, (GLfloat) - 0.275352, + (GLfloat) 0.631969, (GLfloat) 0.136095, (GLfloat) - 0.279631, + (GLfloat) 0.763492, (GLfloat) 0.139968, (GLfloat) - 0.405612, + (GLfloat) 0.723274, (GLfloat) 0.154750, (GLfloat) - 0.326956, + (GLfloat) 0.789307, (GLfloat) 0.175501, (GLfloat) - 0.404662, + (GLfloat) 0.776898, (GLfloat) 0.135041, (GLfloat) - 0.500000, + (GLfloat) 0.740522, (GLfloat) 0.074155, (GLfloat) - 0.403722, + (GLfloat) 0.747636, (GLfloat) 0.105446, (GLfloat) - 0.405556, + (GLfloat) 0.837513, (GLfloat) 0.201992, (GLfloat) - 0.500000, + (GLfloat) 0.789307, (GLfloat) 0.175501, (GLfloat) - 0.595338, + (GLfloat) 0.740522, (GLfloat) 0.074155, (GLfloat) - 0.596277, + (GLfloat) 0.747636, (GLfloat) 0.105446, (GLfloat) - 0.594444, + (GLfloat) 0.755907, (GLfloat) 0.070930, (GLfloat) - 0.500000, + (GLfloat) 0.710325, (GLfloat) 0.032750, (GLfloat) - 0.412500, + (GLfloat) 0.731601, (GLfloat) 0.048967, (GLfloat) - 0.404556, + (GLfloat) 0.694366, (GLfloat) 0.083832, (GLfloat) - 0.323491, + (GLfloat) 0.694366, (GLfloat) 0.083832, (GLfloat) - 0.676509, + (GLfloat) 0.710325, (GLfloat) 0.032750, (GLfloat) - 0.587500, + (GLfloat) 0.731601, (GLfloat) 0.048967, (GLfloat) - 0.595444, + (GLfloat) 0.592781, (GLfloat) 0.031264, (GLfloat) - 0.590500, + (GLfloat) 0.667212, (GLfloat) 0.026513, (GLfloat) - 0.582500, + (GLfloat) 0.725378, (GLfloat) 0.028862, (GLfloat) - 0.500000, + (GLfloat) 0.593625, (GLfloat) 0.053327, (GLfloat) - 0.706000, + (GLfloat) 0.666096, (GLfloat) 0.041783, (GLfloat) - 0.660875, + (GLfloat) 0.593625, (GLfloat) 0.053327, (GLfloat) - 0.294000, + (GLfloat) 0.666096, (GLfloat) 0.041783, (GLfloat) - 0.339125, + (GLfloat) 0.592781, (GLfloat) 0.031264, (GLfloat) - 0.409500, + (GLfloat) 0.667212, (GLfloat) 0.026513, (GLfloat) - 0.417500, + (GLfloat) 0.525128, (GLfloat) 0.119312, (GLfloat) - 0.740694, + (GLfloat) 0.606658, (GLfloat) 0.072023, (GLfloat) - 0.723162, + (GLfloat) 0.355891, (GLfloat) 0.154793, (GLfloat) - 0.676509, + (GLfloat) 0.421284, (GLfloat) 0.083716, (GLfloat) - 0.706000, + (GLfloat) 0.419921, (GLfloat) 0.106487, (GLfloat) - 0.723162, + (GLfloat) 0.414531, (GLfloat) 0.062694, (GLfloat) - 0.590500, + (GLfloat) 0.423841, (GLfloat) 0.069426, (GLfloat) - 0.664625, + (GLfloat) 0.507243, (GLfloat) 0.067325, (GLfloat) - 0.721500, + (GLfloat) 0.304584, (GLfloat) 0.104293, (GLfloat) - 0.587500, + (GLfloat) 0.349234, (GLfloat) 0.097654, (GLfloat) - 0.660875, + (GLfloat) 0.586334, (GLfloat) 0.040774, (GLfloat) - 0.664625, + (GLfloat) 0.294350, (GLfloat) 0.167695, (GLfloat) - 0.500000, + (GLfloat) 0.294978, (GLfloat) 0.129544, (GLfloat) - 0.595444, + (GLfloat) 0.355891, (GLfloat) 0.154793, (GLfloat) - 0.323491, + (GLfloat) 0.304584, (GLfloat) 0.104293, (GLfloat) - 0.412500, + (GLfloat) 0.294978, (GLfloat) 0.129544, (GLfloat) - 0.404556, + (GLfloat) 0.414531, (GLfloat) 0.062694, (GLfloat) - 0.409500, + (GLfloat) 0.342964, (GLfloat) 0.083687, (GLfloat) - 0.417500, + (GLfloat) 0.289108, (GLfloat) 0.105788, (GLfloat) - 0.500000, + (GLfloat) 0.421284, (GLfloat) 0.083716, (GLfloat) - 0.294000, + (GLfloat) 0.349234, (GLfloat) 0.097654, (GLfloat) - 0.339125, + (GLfloat) 0.342964, (GLfloat) 0.083687, (GLfloat) - 0.582500, + (GLfloat) 0.525128, (GLfloat) 0.119312, (GLfloat) - 0.259306, + (GLfloat) 0.419921, (GLfloat) 0.106487, (GLfloat) - 0.276838, + (GLfloat) 0.606658, (GLfloat) 0.072023, (GLfloat) - 0.276838, + (GLfloat) 0.586334, (GLfloat) 0.040774, (GLfloat) - 0.335375, + (GLfloat) 0.507243, (GLfloat) 0.067325, (GLfloat) - 0.278500, + (GLfloat) 0.423841, (GLfloat) 0.069426, (GLfloat) - 0.335375, + (GLfloat) 0.503173, (GLfloat) 0.044243, (GLfloat) - 0.597750, + (GLfloat) 0.599438, (GLfloat) 0.027269, (GLfloat) - 0.500000, + (GLfloat) 0.406908, (GLfloat) 0.061217, (GLfloat) - 0.500000, + (GLfloat) 0.503173, (GLfloat) 0.044243, (GLfloat) - 0.402250, +}; + +static GLfloat s1_3_normals[] = +{ + (GLfloat) 0.156072, (GLfloat) - 0.866199, (GLfloat) - 0.474700, + (GLfloat) 0.133323, (GLfloat) - 0.866325, (GLfloat) - 0.481359, + (GLfloat) 0.156764, (GLfloat) - 0.975995, (GLfloat) - 0.151191, + (GLfloat) 0.165110, (GLfloat) - 0.975177, (GLfloat) - 0.147543, + (GLfloat) 0.361485, (GLfloat) - 0.917862, (GLfloat) - 0.163883, + (GLfloat) 0.371348, (GLfloat) - 0.914502, (GLfloat) - 0.160580, + (GLfloat) 0.350149, (GLfloat) - 0.787582, (GLfloat) - 0.507060, + (GLfloat) 0.331724, (GLfloat) - 0.792390, (GLfloat) - 0.511934, + (GLfloat) 0.156072, (GLfloat) - 0.866199, (GLfloat) 0.474700, + (GLfloat) 0.133323, (GLfloat) - 0.866325, (GLfloat) 0.481359, + (GLfloat) 0.331724, (GLfloat) - 0.792390, (GLfloat) 0.511934, + (GLfloat) 0.350149, (GLfloat) - 0.787582, (GLfloat) 0.507061, + (GLfloat) 0.361485, (GLfloat) - 0.917862, (GLfloat) 0.163883, + (GLfloat) 0.371348, (GLfloat) - 0.914502, (GLfloat) 0.160580, + (GLfloat) 0.165110, (GLfloat) - 0.975177, (GLfloat) 0.147543, + (GLfloat) 0.156764, (GLfloat) - 0.975995, (GLfloat) 0.151191, + (GLfloat) 0.952910, (GLfloat) 0.222669, (GLfloat) 0.205865, + (GLfloat) 0.952953, (GLfloat) 0.245285, (GLfloat) 0.178091, + (GLfloat) 0.977287, (GLfloat) 0.200386, (GLfloat) 0.068964, + (GLfloat) 0.974607, (GLfloat) 0.211631, (GLfloat) 0.073163, + (GLfloat) 0.910741, (GLfloat) - 0.389976, (GLfloat) 0.135901, + (GLfloat) 0.891878, (GLfloat) - 0.425931, (GLfloat) 0.152106, + (GLfloat) 0.882467, (GLfloat) - 0.235214, (GLfloat) 0.407340, + (GLfloat) 0.868268, (GLfloat) - 0.279083, (GLfloat) 0.410151, + (GLfloat) 0.952953, (GLfloat) 0.245285, (GLfloat) - 0.178091, + (GLfloat) 0.952910, (GLfloat) 0.222669, (GLfloat) - 0.205865, + (GLfloat) 0.868268, (GLfloat) - 0.279083, (GLfloat) - 0.410151, + (GLfloat) 0.882468, (GLfloat) - 0.235213, (GLfloat) - 0.407340, + (GLfloat) 0.891878, (GLfloat) - 0.425931, (GLfloat) - 0.152106, + (GLfloat) 0.910741, (GLfloat) - 0.389976, (GLfloat) - 0.135901, + (GLfloat) 0.974607, (GLfloat) 0.211631, (GLfloat) - 0.073163, + (GLfloat) 0.977287, (GLfloat) 0.200386, (GLfloat) - 0.068964, + (GLfloat) 0.086707, (GLfloat) - 0.551974, (GLfloat) 0.829341, + (GLfloat) 0.062265, (GLfloat) - 0.551355, (GLfloat) 0.831944, + (GLfloat) - 0.014960, (GLfloat) - 0.207986, (GLfloat) 0.978017, + (GLfloat) - 0.026687, (GLfloat) - 0.208021, (GLfloat) 0.977760, + (GLfloat) 0.102710, (GLfloat) - 0.133733, (GLfloat) 0.985681, + (GLfloat) 0.099775, (GLfloat) - 0.134244, (GLfloat) 0.985913, + (GLfloat) 0.231521, (GLfloat) - 0.464011, (GLfloat) 0.855039, + (GLfloat) 0.236951, (GLfloat) - 0.462930, (GLfloat) 0.854137, + (GLfloat) - 0.295570, (GLfloat) 0.436154, (GLfloat) 0.849946, + (GLfloat) - 0.280583, (GLfloat) 0.437172, (GLfloat) 0.854490, + (GLfloat) - 0.178752, (GLfloat) 0.492834, (GLfloat) 0.851565, + (GLfloat) - 0.184330, (GLfloat) 0.491982, (GLfloat) 0.850868, + (GLfloat) - 0.033888, (GLfloat) 0.173633, (GLfloat) 0.984227, + (GLfloat) - 0.032872, (GLfloat) 0.173792, (GLfloat) 0.984234, + (GLfloat) - 0.140362, (GLfloat) 0.111822, (GLfloat) 0.983765, + (GLfloat) - 0.136701, (GLfloat) 0.111911, (GLfloat) 0.984271, + (GLfloat) 0.725871, (GLfloat) 0.640449, (GLfloat) 0.250870, + (GLfloat) 0.717328, (GLfloat) 0.635281, (GLfloat) 0.286109, + (GLfloat) 0.785252, (GLfloat) 0.532999, (GLfloat) 0.315105, + (GLfloat) 0.786013, (GLfloat) 0.538285, (GLfloat) 0.304028, + (GLfloat) 0.473766, (GLfloat) 0.428968, (GLfloat) 0.769111, + (GLfloat) 0.445991, (GLfloat) 0.427917, (GLfloat) 0.786117, + (GLfloat) 0.380921, (GLfloat) 0.670539, (GLfloat) 0.636613, + (GLfloat) 0.351469, (GLfloat) 0.675507, (GLfloat) 0.648198, + (GLfloat) 0.909972, (GLfloat) 0.319731, (GLfloat) 0.264053, + (GLfloat) 0.914034, (GLfloat) 0.290005, (GLfloat) 0.283618, + (GLfloat) 0.764793, (GLfloat) - 0.009035, (GLfloat) 0.644213, + (GLfloat) 0.748359, (GLfloat) - 0.049564, (GLfloat) 0.661439, + (GLfloat) 0.584615, (GLfloat) 0.165625, (GLfloat) 0.794225, + (GLfloat) 0.606922, (GLfloat) 0.199970, (GLfloat) 0.769193, + (GLfloat) 0.856780, (GLfloat) 0.408314, (GLfloat) 0.314973, + (GLfloat) 0.856353, (GLfloat) 0.416833, (GLfloat) 0.304811, + (GLfloat) - 0.450621, (GLfloat) 0.737913, (GLfloat) 0.502419, + (GLfloat) - 0.436449, (GLfloat) 0.741403, (GLfloat) 0.509739, + (GLfloat) - 0.507433, (GLfloat) 0.846833, (GLfloat) 0.159329, + (GLfloat) - 0.502539, (GLfloat) 0.849165, (GLfloat) 0.162398, + (GLfloat) - 0.409636, (GLfloat) 0.897074, (GLfloat) 0.165699, + (GLfloat) - 0.419809, (GLfloat) 0.893103, (GLfloat) 0.161638, + (GLfloat) - 0.332199, (GLfloat) 0.791771, (GLfloat) 0.512584, + (GLfloat) - 0.350779, (GLfloat) 0.787278, (GLfloat) 0.507097, + (GLfloat) - 0.436449, (GLfloat) 0.741403, (GLfloat) - 0.509738, + (GLfloat) - 0.450621, (GLfloat) 0.737913, (GLfloat) - 0.502419, + (GLfloat) - 0.332198, (GLfloat) 0.791771, (GLfloat) - 0.512584, + (GLfloat) - 0.350779, (GLfloat) 0.787278, (GLfloat) - 0.507097, + (GLfloat) - 0.419809, (GLfloat) 0.893103, (GLfloat) - 0.161638, + (GLfloat) - 0.409636, (GLfloat) 0.897074, (GLfloat) - 0.165699, + (GLfloat) - 0.507433, (GLfloat) 0.846833, (GLfloat) - 0.159329, + (GLfloat) - 0.502539, (GLfloat) 0.849165, (GLfloat) - 0.162398, + (GLfloat) 0.669290, (GLfloat) 0.713912, (GLfloat) - 0.205866, + (GLfloat) 0.688897, (GLfloat) 0.702641, (GLfloat) - 0.178093, + (GLfloat) 0.661903, (GLfloat) 0.745850, (GLfloat) - 0.074780, + (GLfloat) 0.670351, (GLfloat) 0.738996, (GLfloat) - 0.067190, + (GLfloat) 0.158706, (GLfloat) 0.978584, (GLfloat) - 0.131091, + (GLfloat) 0.119709, (GLfloat) 0.981678, (GLfloat) - 0.148253, + (GLfloat) 0.261869, (GLfloat) 0.885538, (GLfloat) - 0.383728, + (GLfloat) 0.223051, (GLfloat) 0.883291, (GLfloat) - 0.412366, + (GLfloat) 0.688897, (GLfloat) 0.702640, (GLfloat) 0.178092, + (GLfloat) 0.669290, (GLfloat) 0.713912, (GLfloat) 0.205867, + (GLfloat) 0.261868, (GLfloat) 0.885538, (GLfloat) 0.383728, + (GLfloat) 0.223050, (GLfloat) 0.883291, (GLfloat) 0.412366, + (GLfloat) 0.119709, (GLfloat) 0.981678, (GLfloat) 0.148253, + (GLfloat) 0.158706, (GLfloat) 0.978584, (GLfloat) 0.131091, + (GLfloat) 0.661903, (GLfloat) 0.745850, (GLfloat) 0.074780, + (GLfloat) 0.670351, (GLfloat) 0.738996, (GLfloat) 0.067190, + (GLfloat) - 0.295570, (GLfloat) 0.436154, (GLfloat) - 0.849946, + (GLfloat) - 0.280583, (GLfloat) 0.437172, (GLfloat) - 0.854490, + (GLfloat) - 0.136701, (GLfloat) 0.111911, (GLfloat) - 0.984271, + (GLfloat) - 0.140362, (GLfloat) 0.111822, (GLfloat) - 0.983765, + (GLfloat) - 0.033889, (GLfloat) 0.173633, (GLfloat) - 0.984227, + (GLfloat) - 0.032872, (GLfloat) 0.173792, (GLfloat) - 0.984234, + (GLfloat) - 0.184329, (GLfloat) 0.491983, (GLfloat) - 0.850868, + (GLfloat) - 0.178752, (GLfloat) 0.492834, (GLfloat) - 0.851565, + (GLfloat) 0.062265, (GLfloat) - 0.551355, (GLfloat) - 0.831944, + (GLfloat) 0.086707, (GLfloat) - 0.551973, (GLfloat) - 0.829342, + (GLfloat) 0.231522, (GLfloat) - 0.464010, (GLfloat) - 0.855039, + (GLfloat) 0.236951, (GLfloat) - 0.462929, (GLfloat) - 0.854137, + (GLfloat) 0.099774, (GLfloat) - 0.134244, (GLfloat) - 0.985913, + (GLfloat) 0.102710, (GLfloat) - 0.133733, (GLfloat) - 0.985681, + (GLfloat) - 0.014960, (GLfloat) - 0.207986, (GLfloat) - 0.978017, + (GLfloat) - 0.026687, (GLfloat) - 0.208021, (GLfloat) - 0.977760, + (GLfloat) 0.914034, (GLfloat) 0.290005, (GLfloat) - 0.283618, + (GLfloat) 0.909972, (GLfloat) 0.319730, (GLfloat) - 0.264054, + (GLfloat) 0.856780, (GLfloat) 0.408314, (GLfloat) - 0.314973, + (GLfloat) 0.856353, (GLfloat) 0.416833, (GLfloat) - 0.304811, + (GLfloat) 0.606923, (GLfloat) 0.199970, (GLfloat) - 0.769193, + (GLfloat) 0.584616, (GLfloat) 0.165625, (GLfloat) - 0.794224, + (GLfloat) 0.764793, (GLfloat) - 0.009035, (GLfloat) - 0.644213, + (GLfloat) 0.748360, (GLfloat) - 0.049564, (GLfloat) - 0.661439, + (GLfloat) 0.725871, (GLfloat) 0.640449, (GLfloat) - 0.250871, + (GLfloat) 0.717328, (GLfloat) 0.635281, (GLfloat) - 0.286109, + (GLfloat) 0.380922, (GLfloat) 0.670539, (GLfloat) - 0.636613, + (GLfloat) 0.351469, (GLfloat) 0.675507, (GLfloat) - 0.648197, + (GLfloat) 0.445992, (GLfloat) 0.427917, (GLfloat) - 0.786116, + (GLfloat) 0.473767, (GLfloat) 0.428968, (GLfloat) - 0.769111, + (GLfloat) 0.786013, (GLfloat) 0.538285, (GLfloat) - 0.304029, + (GLfloat) 0.785252, (GLfloat) 0.532999, (GLfloat) - 0.315105, + (GLfloat) 0.919156, (GLfloat) 0.373864, (GLfloat) 0.124010, + (GLfloat) 0.913260, (GLfloat) 0.384076, (GLfloat) 0.135802, + (GLfloat) 0.881886, (GLfloat) 0.458542, (GLfloat) 0.109621, + (GLfloat) 0.879452, (GLfloat) 0.461960, (GLfloat) 0.114709, + (GLfloat) 0.880239, (GLfloat) 0.473377, (GLfloat) 0.033080, + (GLfloat) 0.881697, (GLfloat) 0.470851, (GLfloat) 0.030163, + (GLfloat) 0.914779, (GLfloat) 0.401569, (GLfloat) 0.043834, + (GLfloat) 0.916978, (GLfloat) 0.396963, (GLfloat) 0.039657, + (GLfloat) 0.789250, (GLfloat) 0.598868, (GLfloat) 0.135802, + (GLfloat) 0.783354, (GLfloat) 0.609080, (GLfloat) 0.124010, + (GLfloat) 0.805159, (GLfloat) 0.591437, (GLfloat) 0.043834, + (GLfloat) 0.802269, (GLfloat) 0.595644, (GLfloat) 0.039656, + (GLfloat) 0.848617, (GLfloat) 0.528147, (GLfloat) 0.030163, + (GLfloat) 0.850075, (GLfloat) 0.525621, (GLfloat) 0.033079, + (GLfloat) 0.838052, (GLfloat) 0.534464, (GLfloat) 0.109621, + (GLfloat) 0.839795, (GLfloat) 0.530647, (GLfloat) 0.114709, + (GLfloat) 0.783354, (GLfloat) 0.609080, (GLfloat) - 0.124010, + (GLfloat) 0.789250, (GLfloat) 0.598868, (GLfloat) - 0.135802, + (GLfloat) 0.838052, (GLfloat) 0.534464, (GLfloat) - 0.109621, + (GLfloat) 0.839795, (GLfloat) 0.530647, (GLfloat) - 0.114709, + (GLfloat) 0.850075, (GLfloat) 0.525621, (GLfloat) - 0.033079, + (GLfloat) 0.848617, (GLfloat) 0.528147, (GLfloat) - 0.030163, + (GLfloat) 0.805159, (GLfloat) 0.591437, (GLfloat) - 0.043834, + (GLfloat) 0.802269, (GLfloat) 0.595644, (GLfloat) - 0.039656, + (GLfloat) 0.913260, (GLfloat) 0.384076, (GLfloat) - 0.135802, + (GLfloat) 0.919156, (GLfloat) 0.373864, (GLfloat) - 0.124010, + (GLfloat) 0.914779, (GLfloat) 0.401569, (GLfloat) - 0.043834, + (GLfloat) 0.916978, (GLfloat) 0.396963, (GLfloat) - 0.039657, + (GLfloat) 0.881697, (GLfloat) 0.470851, (GLfloat) - 0.030163, + (GLfloat) 0.880239, (GLfloat) 0.473377, (GLfloat) - 0.033080, + (GLfloat) 0.881886, (GLfloat) 0.458542, (GLfloat) - 0.109621, + (GLfloat) 0.879452, (GLfloat) 0.461960, (GLfloat) - 0.114709, + (GLfloat) 0.190919, (GLfloat) - 0.865460, (GLfloat) - 0.463172, + (GLfloat) 0.162958, (GLfloat) - 0.864281, (GLfloat) - 0.475881, + (GLfloat) 0.232098, (GLfloat) - 0.863386, (GLfloat) - 0.447991, + (GLfloat) 0.201152, (GLfloat) - 0.862208, (GLfloat) - 0.464904, + (GLfloat) 0.208595, (GLfloat) - 0.967433, (GLfloat) - 0.143393, + (GLfloat) 0.220092, (GLfloat) - 0.966009, (GLfloat) - 0.135597, + (GLfloat) 0.173391, (GLfloat) - 0.973662, (GLfloat) - 0.148045, + (GLfloat) 0.183752, (GLfloat) - 0.972679, (GLfloat) - 0.141883, + (GLfloat) 0.370543, (GLfloat) - 0.826392, (GLfloat) - 0.423998, + (GLfloat) 0.337718, (GLfloat) - 0.831172, (GLfloat) - 0.441702, + (GLfloat) 0.357949, (GLfloat) - 0.923976, (GLfloat) - 0.134692, + (GLfloat) 0.370172, (GLfloat) - 0.920284, (GLfloat) - 0.126690, + (GLfloat) 0.265644, (GLfloat) - 0.954091, (GLfloat) - 0.138357, + (GLfloat) 0.277857, (GLfloat) - 0.951799, (GLfloat) - 0.129901, + (GLfloat) 0.288098, (GLfloat) - 0.854015, (GLfloat) - 0.433195, + (GLfloat) 0.255240, (GLfloat) - 0.854757, (GLfloat) - 0.451932, + (GLfloat) 0.370543, (GLfloat) - 0.826392, (GLfloat) 0.423998, + (GLfloat) 0.337718, (GLfloat) - 0.831172, (GLfloat) 0.441701, + (GLfloat) 0.255240, (GLfloat) - 0.854757, (GLfloat) 0.451932, + (GLfloat) 0.288099, (GLfloat) - 0.854015, (GLfloat) 0.433195, + (GLfloat) 0.265644, (GLfloat) - 0.954091, (GLfloat) 0.138357, + (GLfloat) 0.277857, (GLfloat) - 0.951799, (GLfloat) 0.129901, + (GLfloat) 0.370172, (GLfloat) - 0.920284, (GLfloat) 0.126690, + (GLfloat) 0.357949, (GLfloat) - 0.923976, (GLfloat) 0.134692, + (GLfloat) 0.162958, (GLfloat) - 0.864281, (GLfloat) 0.475881, + (GLfloat) 0.190920, (GLfloat) - 0.865460, (GLfloat) 0.463172, + (GLfloat) 0.173391, (GLfloat) - 0.973662, (GLfloat) 0.148045, + (GLfloat) 0.183752, (GLfloat) - 0.972679, (GLfloat) 0.141883, + (GLfloat) 0.220093, (GLfloat) - 0.966009, (GLfloat) 0.135597, + (GLfloat) 0.208595, (GLfloat) - 0.967433, (GLfloat) 0.143394, + (GLfloat) 0.232098, (GLfloat) - 0.863386, (GLfloat) 0.447991, + (GLfloat) 0.201153, (GLfloat) - 0.862208, (GLfloat) 0.464904, + (GLfloat) - 0.220569, (GLfloat) 0.498423, (GLfloat) - 0.838406, + (GLfloat) - 0.196440, (GLfloat) 0.495475, (GLfloat) - 0.846118, + (GLfloat) - 0.216090, (GLfloat) 0.523731, (GLfloat) - 0.824021, + (GLfloat) - 0.187439, (GLfloat) 0.518039, (GLfloat) - 0.834567, + (GLfloat) - 0.035834, (GLfloat) 0.186611, (GLfloat) - 0.981780, + (GLfloat) - 0.049583, (GLfloat) 0.189912, (GLfloat) - 0.980548, + (GLfloat) - 0.057093, (GLfloat) 0.164206, (GLfloat) - 0.984772, + (GLfloat) - 0.067095, (GLfloat) 0.165750, (GLfloat) - 0.983883, + (GLfloat) - 0.313656, (GLfloat) 0.500321, (GLfloat) - 0.807031, + (GLfloat) - 0.288105, (GLfloat) 0.497578, (GLfloat) - 0.818176, + (GLfloat) - 0.079226, (GLfloat) 0.180632, (GLfloat) - 0.980355, + (GLfloat) - 0.092817, (GLfloat) 0.182734, (GLfloat) - 0.978771, + (GLfloat) - 0.045426, (GLfloat) 0.193014, (GLfloat) - 0.980144, + (GLfloat) - 0.060897, (GLfloat) 0.196689, (GLfloat) - 0.978573, + (GLfloat) - 0.250277, (GLfloat) 0.526446, (GLfloat) - 0.812537, + (GLfloat) - 0.220552, (GLfloat) 0.520843, (GLfloat) - 0.824669, + (GLfloat) 0.247012, (GLfloat) - 0.528860, (GLfloat) - 0.811968, + (GLfloat) 0.280618, (GLfloat) - 0.529785, (GLfloat) - 0.800363, + (GLfloat) 0.197390, (GLfloat) - 0.535630, (GLfloat) - 0.821059, + (GLfloat) 0.231067, (GLfloat) - 0.540483, (GLfloat) - 0.809003, + (GLfloat) 0.104568, (GLfloat) - 0.158183, (GLfloat) - 0.981857, + (GLfloat) 0.094460, (GLfloat) - 0.156029, (GLfloat) - 0.983225, + (GLfloat) 0.111854, (GLfloat) - 0.162201, (GLfloat) - 0.980398, + (GLfloat) 0.101426, (GLfloat) - 0.160983, (GLfloat) - 0.981732, + (GLfloat) 0.117566, (GLfloat) - 0.537019, (GLfloat) - 0.835338, + (GLfloat) 0.146549, (GLfloat) - 0.540970, (GLfloat) - 0.828175, + (GLfloat) 0.055888, (GLfloat) - 0.173264, (GLfloat) - 0.983288, + (GLfloat) 0.045018, (GLfloat) - 0.171643, (GLfloat) - 0.984130, + (GLfloat) 0.088354, (GLfloat) - 0.160681, (GLfloat) - 0.983044, + (GLfloat) 0.078052, (GLfloat) - 0.158368, (GLfloat) - 0.984290, + (GLfloat) 0.157434, (GLfloat) - 0.535002, (GLfloat) - 0.830053, + (GLfloat) 0.189212, (GLfloat) - 0.540730, (GLfloat) - 0.819640, + (GLfloat) - 0.196440, (GLfloat) 0.495475, (GLfloat) 0.846118, + (GLfloat) - 0.220568, (GLfloat) 0.498423, (GLfloat) 0.838406, + (GLfloat) - 0.057093, (GLfloat) 0.164206, (GLfloat) 0.984772, + (GLfloat) - 0.067095, (GLfloat) 0.165750, (GLfloat) 0.983883, + (GLfloat) - 0.049583, (GLfloat) 0.189912, (GLfloat) 0.980548, + (GLfloat) - 0.035834, (GLfloat) 0.186611, (GLfloat) 0.981780, + (GLfloat) - 0.216090, (GLfloat) 0.523731, (GLfloat) 0.824021, + (GLfloat) - 0.187439, (GLfloat) 0.518039, (GLfloat) 0.834567, + (GLfloat) 0.117567, (GLfloat) - 0.537019, (GLfloat) 0.835337, + (GLfloat) 0.146549, (GLfloat) - 0.540970, (GLfloat) 0.828176, + (GLfloat) 0.189212, (GLfloat) - 0.540730, (GLfloat) 0.819640, + (GLfloat) 0.157434, (GLfloat) - 0.535002, (GLfloat) 0.830053, + (GLfloat) 0.088354, (GLfloat) - 0.160681, (GLfloat) 0.983044, + (GLfloat) 0.078052, (GLfloat) - 0.158368, (GLfloat) 0.984290, + (GLfloat) 0.045018, (GLfloat) - 0.171643, (GLfloat) 0.984130, + (GLfloat) 0.055888, (GLfloat) - 0.173264, (GLfloat) 0.983288, + (GLfloat) 0.280617, (GLfloat) - 0.529785, (GLfloat) 0.800363, + (GLfloat) 0.247012, (GLfloat) - 0.528861, (GLfloat) 0.811968, + (GLfloat) 0.111853, (GLfloat) - 0.162201, (GLfloat) 0.980398, + (GLfloat) 0.101425, (GLfloat) - 0.160983, (GLfloat) 0.981732, + (GLfloat) 0.094460, (GLfloat) - 0.156028, (GLfloat) 0.983225, + (GLfloat) 0.104568, (GLfloat) - 0.158182, (GLfloat) 0.981857, + (GLfloat) 0.197390, (GLfloat) - 0.535630, (GLfloat) 0.821059, + (GLfloat) 0.231068, (GLfloat) - 0.540483, (GLfloat) 0.809003, + (GLfloat) - 0.313656, (GLfloat) 0.500320, (GLfloat) 0.807031, + (GLfloat) - 0.288106, (GLfloat) 0.497578, (GLfloat) 0.818175, + (GLfloat) - 0.220552, (GLfloat) 0.520843, (GLfloat) 0.824669, + (GLfloat) - 0.250276, (GLfloat) 0.526446, (GLfloat) 0.812537, + (GLfloat) - 0.045425, (GLfloat) 0.193015, (GLfloat) 0.980144, + (GLfloat) - 0.060896, (GLfloat) 0.196690, (GLfloat) 0.978573, + (GLfloat) - 0.092818, (GLfloat) 0.182733, (GLfloat) 0.978771, + (GLfloat) - 0.079226, (GLfloat) 0.180631, (GLfloat) 0.980355, + (GLfloat) - 0.349743, (GLfloat) 0.793198, (GLfloat) - 0.498515, + (GLfloat) - 0.370416, (GLfloat) 0.791707, (GLfloat) - 0.485790, + (GLfloat) - 0.425027, (GLfloat) 0.892201, (GLfloat) - 0.152739, + (GLfloat) - 0.418180, (GLfloat) 0.894483, (GLfloat) - 0.158197, + (GLfloat) - 0.425590, (GLfloat) 0.893099, (GLfloat) - 0.145761, + (GLfloat) - 0.418336, (GLfloat) 0.895388, (GLfloat) - 0.152561, + (GLfloat) - 0.348153, (GLfloat) 0.802874, (GLfloat) - 0.483924, + (GLfloat) - 0.370992, (GLfloat) 0.802293, (GLfloat) - 0.467643, + (GLfloat) - 0.349743, (GLfloat) 0.793198, (GLfloat) 0.498515, + (GLfloat) - 0.370416, (GLfloat) 0.791707, (GLfloat) 0.485790, + (GLfloat) - 0.370992, (GLfloat) 0.802293, (GLfloat) 0.467643, + (GLfloat) - 0.348153, (GLfloat) 0.802874, (GLfloat) 0.483924, + (GLfloat) - 0.425590, (GLfloat) 0.893099, (GLfloat) 0.145761, + (GLfloat) - 0.418336, (GLfloat) 0.895388, (GLfloat) 0.152561, + (GLfloat) - 0.418180, (GLfloat) 0.894483, (GLfloat) 0.158197, + (GLfloat) - 0.425027, (GLfloat) 0.892201, (GLfloat) 0.152739, + (GLfloat) - 0.497325, (GLfloat) 0.745242, (GLfloat) 0.444165, + (GLfloat) - 0.479548, (GLfloat) 0.747889, (GLfloat) 0.459017, + (GLfloat) - 0.556394, (GLfloat) 0.819599, (GLfloat) 0.136684, + (GLfloat) - 0.551239, (GLfloat) 0.822088, (GLfloat) 0.142503, + (GLfloat) - 0.465768, (GLfloat) 0.872611, (GLfloat) 0.147004, + (GLfloat) - 0.472480, (GLfloat) 0.870146, (GLfloat) 0.140027, + (GLfloat) - 0.394421, (GLfloat) 0.789665, (GLfloat) 0.469959, + (GLfloat) - 0.416499, (GLfloat) 0.788420, (GLfloat) 0.452684, + (GLfloat) - 0.479547, (GLfloat) 0.747889, (GLfloat) - 0.459017, + (GLfloat) - 0.497325, (GLfloat) 0.745242, (GLfloat) - 0.444165, + (GLfloat) - 0.394421, (GLfloat) 0.789665, (GLfloat) - 0.469959, + (GLfloat) - 0.416498, (GLfloat) 0.788420, (GLfloat) - 0.452684, + (GLfloat) - 0.472480, (GLfloat) 0.870146, (GLfloat) - 0.140027, + (GLfloat) - 0.465768, (GLfloat) 0.872611, (GLfloat) - 0.147004, + (GLfloat) - 0.556394, (GLfloat) 0.819599, (GLfloat) - 0.136684, + (GLfloat) - 0.551239, (GLfloat) 0.822088, (GLfloat) - 0.142503, + (GLfloat) - 0.459423, (GLfloat) 0.314205, (GLfloat) - 0.830786, + (GLfloat) - 0.469135, (GLfloat) 0.308642, (GLfloat) - 0.827438, + (GLfloat) - 0.156023, (GLfloat) 0.098476, (GLfloat) - 0.982832, + (GLfloat) - 0.151547, (GLfloat) 0.101367, (GLfloat) - 0.983239, + (GLfloat) - 0.168365, (GLfloat) 0.083796, (GLfloat) - 0.982157, + (GLfloat) - 0.160419, (GLfloat) 0.086730, (GLfloat) - 0.983231, + (GLfloat) - 0.460048, (GLfloat) 0.328491, (GLfloat) - 0.824894, + (GLfloat) - 0.469062, (GLfloat) 0.325364, (GLfloat) - 0.821048, + (GLfloat) 0.495554, (GLfloat) - 0.246920, (GLfloat) - 0.832741, + (GLfloat) 0.477125, (GLfloat) - 0.265003, (GLfloat) - 0.837929, + (GLfloat) 0.446738, (GLfloat) - 0.363453, (GLfloat) - 0.817512, + (GLfloat) 0.441753, (GLfloat) - 0.366614, (GLfloat) - 0.818809, + (GLfloat) 0.138045, (GLfloat) - 0.145699, (GLfloat) - 0.979651, + (GLfloat) 0.135385, (GLfloat) - 0.146968, (GLfloat) - 0.979832, + (GLfloat) 0.154178, (GLfloat) - 0.091800, (GLfloat) - 0.983769, + (GLfloat) 0.160344, (GLfloat) - 0.086930, (GLfloat) - 0.983226, + (GLfloat) 0.316237, (GLfloat) - 0.497953, (GLfloat) - 0.807488, + (GLfloat) 0.343267, (GLfloat) - 0.493329, (GLfloat) - 0.799246, + (GLfloat) 0.113533, (GLfloat) - 0.172349, (GLfloat) - 0.978471, + (GLfloat) 0.101829, (GLfloat) - 0.173041, (GLfloat) - 0.979636, + (GLfloat) 0.123751, (GLfloat) - 0.168767, (GLfloat) - 0.977856, + (GLfloat) 0.114456, (GLfloat) - 0.171068, (GLfloat) - 0.978589, + (GLfloat) 0.385418, (GLfloat) - 0.444520, (GLfloat) - 0.808613, + (GLfloat) 0.397936, (GLfloat) - 0.439743, (GLfloat) - 0.805154, + (GLfloat) - 0.398435, (GLfloat) 0.428657, (GLfloat) - 0.810865, + (GLfloat) - 0.386943, (GLfloat) 0.429063, (GLfloat) - 0.816198, + (GLfloat) - 0.443045, (GLfloat) 0.369548, (GLfloat) - 0.816790, + (GLfloat) - 0.444436, (GLfloat) 0.369300, (GLfloat) - 0.816146, + (GLfloat) - 0.163680, (GLfloat) 0.101509, (GLfloat) - 0.981277, + (GLfloat) - 0.158806, (GLfloat) 0.102320, (GLfloat) - 0.981994, + (GLfloat) - 0.135291, (GLfloat) 0.136613, (GLfloat) - 0.981343, + (GLfloat) - 0.139056, (GLfloat) 0.136609, (GLfloat) - 0.980817, + (GLfloat) - 0.727675, (GLfloat) 0.496263, (GLfloat) - 0.473510, + (GLfloat) - 0.726249, (GLfloat) 0.505128, (GLfloat) - 0.466270, + (GLfloat) - 0.710606, (GLfloat) 0.534378, (GLfloat) - 0.457688, + (GLfloat) - 0.711650, (GLfloat) 0.528248, (GLfloat) - 0.463150, + (GLfloat) - 0.787870, (GLfloat) 0.599385, (GLfloat) - 0.141417, + (GLfloat) - 0.788753, (GLfloat) 0.597790, (GLfloat) - 0.143234, + (GLfloat) - 0.812157, (GLfloat) 0.564556, (GLfloat) - 0.147234, + (GLfloat) - 0.810846, (GLfloat) 0.567072, (GLfloat) - 0.144768, + (GLfloat) - 0.599894, (GLfloat) 0.659162, (GLfloat) - 0.453468, + (GLfloat) - 0.607958, (GLfloat) 0.656733, (GLfloat) - 0.446194, + (GLfloat) - 0.673258, (GLfloat) 0.726567, (GLfloat) - 0.137198, + (GLfloat) - 0.671022, (GLfloat) 0.728096, (GLfloat) - 0.140020, + (GLfloat) - 0.744575, (GLfloat) 0.652826, (GLfloat) - 0.139376, + (GLfloat) - 0.744638, (GLfloat) 0.652728, (GLfloat) - 0.139500, + (GLfloat) - 0.673012, (GLfloat) 0.585174, (GLfloat) - 0.452357, + (GLfloat) - 0.673042, (GLfloat) 0.585047, (GLfloat) - 0.452476, + (GLfloat) - 0.599894, (GLfloat) 0.659162, (GLfloat) 0.453468, + (GLfloat) - 0.607958, (GLfloat) 0.656733, (GLfloat) 0.446194, + (GLfloat) - 0.673012, (GLfloat) 0.585174, (GLfloat) 0.452357, + (GLfloat) - 0.673042, (GLfloat) 0.585047, (GLfloat) 0.452476, + (GLfloat) - 0.744638, (GLfloat) 0.652728, (GLfloat) 0.139500, + (GLfloat) - 0.744575, (GLfloat) 0.652826, (GLfloat) 0.139376, + (GLfloat) - 0.671022, (GLfloat) 0.728096, (GLfloat) 0.140020, + (GLfloat) - 0.673258, (GLfloat) 0.726567, (GLfloat) 0.137198, + (GLfloat) - 0.727676, (GLfloat) 0.496263, (GLfloat) 0.473510, + (GLfloat) - 0.726250, (GLfloat) 0.505128, (GLfloat) 0.466269, + (GLfloat) - 0.810846, (GLfloat) 0.567072, (GLfloat) 0.144768, + (GLfloat) - 0.812157, (GLfloat) 0.564556, (GLfloat) 0.147234, + (GLfloat) - 0.787870, (GLfloat) 0.599385, (GLfloat) 0.141417, + (GLfloat) - 0.788753, (GLfloat) 0.597789, (GLfloat) 0.143234, + (GLfloat) - 0.711650, (GLfloat) 0.528248, (GLfloat) 0.463150, + (GLfloat) - 0.710607, (GLfloat) 0.534378, (GLfloat) 0.457688, + (GLfloat) - 0.459423, (GLfloat) 0.314205, (GLfloat) 0.830786, + (GLfloat) - 0.469134, (GLfloat) 0.308642, (GLfloat) 0.827438, + (GLfloat) - 0.469062, (GLfloat) 0.325364, (GLfloat) 0.821048, + (GLfloat) - 0.460048, (GLfloat) 0.328491, (GLfloat) 0.824894, + (GLfloat) - 0.168365, (GLfloat) 0.083796, (GLfloat) 0.982157, + (GLfloat) - 0.160419, (GLfloat) 0.086730, (GLfloat) 0.983231, + (GLfloat) - 0.151547, (GLfloat) 0.101367, (GLfloat) 0.983239, + (GLfloat) - 0.156023, (GLfloat) 0.098476, (GLfloat) 0.982832, + (GLfloat) - 0.386943, (GLfloat) 0.429064, (GLfloat) 0.816198, + (GLfloat) - 0.398435, (GLfloat) 0.428657, (GLfloat) 0.810865, + (GLfloat) - 0.135291, (GLfloat) 0.136613, (GLfloat) 0.981343, + (GLfloat) - 0.139055, (GLfloat) 0.136609, (GLfloat) 0.980817, + (GLfloat) - 0.158806, (GLfloat) 0.102320, (GLfloat) 0.981994, + (GLfloat) - 0.163680, (GLfloat) 0.101509, (GLfloat) 0.981277, + (GLfloat) - 0.443045, (GLfloat) 0.369548, (GLfloat) 0.816790, + (GLfloat) - 0.444437, (GLfloat) 0.369300, (GLfloat) 0.816145, + (GLfloat) 0.316237, (GLfloat) - 0.497952, (GLfloat) 0.807488, + (GLfloat) 0.343268, (GLfloat) - 0.493329, (GLfloat) 0.799246, + (GLfloat) 0.397936, (GLfloat) - 0.439744, (GLfloat) 0.805154, + (GLfloat) 0.385418, (GLfloat) - 0.444521, (GLfloat) 0.808613, + (GLfloat) 0.123751, (GLfloat) - 0.168768, (GLfloat) 0.977856, + (GLfloat) 0.114455, (GLfloat) - 0.171068, (GLfloat) 0.978589, + (GLfloat) 0.101830, (GLfloat) - 0.173040, (GLfloat) 0.979637, + (GLfloat) 0.113533, (GLfloat) - 0.172348, (GLfloat) 0.978471, + (GLfloat) 0.477126, (GLfloat) - 0.265003, (GLfloat) 0.837929, + (GLfloat) 0.495553, (GLfloat) - 0.246921, (GLfloat) 0.832741, + (GLfloat) 0.154178, (GLfloat) - 0.091800, (GLfloat) 0.983769, + (GLfloat) 0.160344, (GLfloat) - 0.086930, (GLfloat) 0.983226, + (GLfloat) 0.135385, (GLfloat) - 0.146968, (GLfloat) 0.979832, + (GLfloat) 0.138045, (GLfloat) - 0.145699, (GLfloat) 0.979651, + (GLfloat) 0.446739, (GLfloat) - 0.363453, (GLfloat) 0.817512, + (GLfloat) 0.441753, (GLfloat) - 0.366614, (GLfloat) 0.818809, + (GLfloat) 0.786198, (GLfloat) - 0.394047, (GLfloat) 0.476047, + (GLfloat) 0.792547, (GLfloat) - 0.363224, (GLfloat) 0.489834, + (GLfloat) 0.707476, (GLfloat) - 0.538845, (GLfloat) 0.457301, + (GLfloat) 0.711142, (GLfloat) - 0.529032, (GLfloat) 0.463037, + (GLfloat) 0.801588, (GLfloat) - 0.580242, (GLfloat) 0.144141, + (GLfloat) 0.799043, (GLfloat) - 0.584300, (GLfloat) 0.141857, + (GLfloat) 0.903357, (GLfloat) - 0.400085, (GLfloat) 0.154524, + (GLfloat) 0.898654, (GLfloat) - 0.412515, (GLfloat) 0.149172, + (GLfloat) 0.471890, (GLfloat) - 0.763546, (GLfloat) 0.440814, + (GLfloat) 0.497278, (GLfloat) - 0.754424, (GLfloat) 0.428437, + (GLfloat) 0.515315, (GLfloat) - 0.846316, (GLfloat) 0.134909, + (GLfloat) 0.524719, (GLfloat) - 0.841405, (GLfloat) 0.129258, + (GLfloat) 0.671646, (GLfloat) - 0.728471, (GLfloat) 0.134984, + (GLfloat) 0.668271, (GLfloat) - 0.731195, (GLfloat) 0.136994, + (GLfloat) 0.610971, (GLfloat) - 0.657561, (GLfloat) 0.440826, + (GLfloat) 0.601302, (GLfloat) - 0.663396, (GLfloat) 0.445356, + (GLfloat) 0.497278, (GLfloat) - 0.754424, (GLfloat) - 0.428437, + (GLfloat) 0.471890, (GLfloat) - 0.763546, (GLfloat) - 0.440814, + (GLfloat) 0.610971, (GLfloat) - 0.657561, (GLfloat) - 0.440826, + (GLfloat) 0.601301, (GLfloat) - 0.663396, (GLfloat) - 0.445356, + (GLfloat) 0.668271, (GLfloat) - 0.731195, (GLfloat) - 0.136994, + (GLfloat) 0.671646, (GLfloat) - 0.728471, (GLfloat) - 0.134984, + (GLfloat) 0.515315, (GLfloat) - 0.846316, (GLfloat) - 0.134909, + (GLfloat) 0.524719, (GLfloat) - 0.841405, (GLfloat) - 0.129258, + (GLfloat) 0.792547, (GLfloat) - 0.363225, (GLfloat) - 0.489834, + (GLfloat) 0.786198, (GLfloat) - 0.394046, (GLfloat) - 0.476047, + (GLfloat) 0.903357, (GLfloat) - 0.400085, (GLfloat) - 0.154524, + (GLfloat) 0.898654, (GLfloat) - 0.412515, (GLfloat) - 0.149172, + (GLfloat) 0.799043, (GLfloat) - 0.584299, (GLfloat) - 0.141858, + (GLfloat) 0.801588, (GLfloat) - 0.580242, (GLfloat) - 0.144141, + (GLfloat) 0.707476, (GLfloat) - 0.538845, (GLfloat) - 0.457301, + (GLfloat) 0.711142, (GLfloat) - 0.529031, (GLfloat) - 0.463037, + (GLfloat) 0.844921, (GLfloat) - 0.202233, (GLfloat) 0.495188, + (GLfloat) 0.846624, (GLfloat) - 0.162790, (GLfloat) 0.506682, + (GLfloat) 0.967461, (GLfloat) - 0.195075, (GLfloat) 0.161136, + (GLfloat) 0.965076, (GLfloat) - 0.210256, (GLfloat) 0.156272, + (GLfloat) 0.933716, (GLfloat) - 0.317920, (GLfloat) 0.164623, + (GLfloat) 0.928870, (GLfloat) - 0.334244, (GLfloat) 0.159632, + (GLfloat) 0.801028, (GLfloat) - 0.328506, (GLfloat) 0.500438, + (GLfloat) 0.805814, (GLfloat) - 0.302226, (GLfloat) 0.509238, + (GLfloat) 0.844921, (GLfloat) - 0.202233, (GLfloat) - 0.495188, + (GLfloat) 0.846624, (GLfloat) - 0.162790, (GLfloat) - 0.506682, + (GLfloat) 0.805814, (GLfloat) - 0.302226, (GLfloat) - 0.509238, + (GLfloat) 0.801028, (GLfloat) - 0.328507, (GLfloat) - 0.500438, + (GLfloat) 0.933716, (GLfloat) - 0.317920, (GLfloat) - 0.164623, + (GLfloat) 0.928870, (GLfloat) - 0.334244, (GLfloat) - 0.159632, + (GLfloat) 0.965076, (GLfloat) - 0.210256, (GLfloat) - 0.156272, + (GLfloat) 0.967461, (GLfloat) - 0.195075, (GLfloat) - 0.161136, + (GLfloat) 0.116677, (GLfloat) - 0.971600, (GLfloat) - 0.205866, + (GLfloat) 0.095439, (GLfloat) - 0.979375, (GLfloat) - 0.178092, + (GLfloat) 0.145951, (GLfloat) - 0.986885, (GLfloat) - 0.068965, + (GLfloat) 0.134470, (GLfloat) - 0.988213, (GLfloat) - 0.073162, + (GLfloat) 0.572548, (GLfloat) - 0.810794, (GLfloat) - 0.121664, + (GLfloat) 0.603894, (GLfloat) - 0.784891, (GLfloat) - 0.138773, + (GLfloat) 0.437036, (GLfloat) - 0.822210, (GLfloat) - 0.364650, + (GLfloat) 0.472429, (GLfloat) - 0.800503, (GLfloat) - 0.368789, + (GLfloat) 0.095438, (GLfloat) - 0.979375, (GLfloat) 0.178092, + (GLfloat) 0.116677, (GLfloat) - 0.971600, (GLfloat) 0.205866, + (GLfloat) 0.472430, (GLfloat) - 0.800503, (GLfloat) 0.368789, + (GLfloat) 0.437036, (GLfloat) - 0.822210, (GLfloat) 0.364650, + (GLfloat) 0.603894, (GLfloat) - 0.784891, (GLfloat) 0.138773, + (GLfloat) 0.572548, (GLfloat) - 0.810794, (GLfloat) 0.121664, + (GLfloat) 0.134470, (GLfloat) - 0.988213, (GLfloat) 0.073162, + (GLfloat) 0.145951, (GLfloat) - 0.986885, (GLfloat) 0.068965, + (GLfloat) 0.531733, (GLfloat) - 0.073239, (GLfloat) - 0.843739, + (GLfloat) 0.511681, (GLfloat) - 0.104754, (GLfloat) - 0.852766, + (GLfloat) 0.176179, (GLfloat) 0.024438, (GLfloat) - 0.984055, + (GLfloat) 0.188717, (GLfloat) 0.040307, (GLfloat) - 0.981204, + (GLfloat) 0.150895, (GLfloat) - 0.104293, (GLfloat) - 0.983033, + (GLfloat) 0.147932, (GLfloat) - 0.109363, (GLfloat) - 0.982932, + (GLfloat) 0.481880, (GLfloat) - 0.227373, (GLfloat) - 0.846223, + (GLfloat) 0.480166, (GLfloat) - 0.230321, (GLfloat) - 0.846400, + (GLfloat) - 0.443443, (GLfloat) 0.349023, (GLfloat) - 0.825555, + (GLfloat) - 0.447255, (GLfloat) 0.345654, (GLfloat) - 0.824916, + (GLfloat) - 0.494732, (GLfloat) 0.167751, (GLfloat) - 0.852701, + (GLfloat) - 0.499143, (GLfloat) 0.160727, (GLfloat) - 0.851483, + (GLfloat) - 0.167121, (GLfloat) 0.020158, (GLfloat) - 0.985730, + (GLfloat) - 0.166487, (GLfloat) 0.021208, (GLfloat) - 0.985815, + (GLfloat) - 0.129817, (GLfloat) 0.178023, (GLfloat) - 0.975426, + (GLfloat) - 0.132948, (GLfloat) 0.174752, (GLfloat) - 0.975595, + (GLfloat) - 0.353563, (GLfloat) - 0.901143, (GLfloat) - 0.250869, + (GLfloat) - 0.351628, (GLfloat) - 0.891347, (GLfloat) - 0.286110, + (GLfloat) - 0.232284, (GLfloat) - 0.920192, (GLfloat) - 0.315104, + (GLfloat) - 0.236990, (GLfloat) - 0.922714, (GLfloat) - 0.304029, + (GLfloat) - 0.244093, (GLfloat) - 0.592931, (GLfloat) - 0.767366, + (GLfloat) - 0.249996, (GLfloat) - 0.572960, (GLfloat) - 0.780525, + (GLfloat) - 0.510472, (GLfloat) - 0.553764, (GLfloat) - 0.657848, + (GLfloat) - 0.520671, (GLfloat) - 0.533495, (GLfloat) - 0.666547, + (GLfloat) 0.010781, (GLfloat) - 0.964447, (GLfloat) - 0.264055, + (GLfloat) 0.040104, (GLfloat) - 0.958098, (GLfloat) - 0.283621, + (GLfloat) 0.223629, (GLfloat) - 0.775786, (GLfloat) - 0.590040, + (GLfloat) 0.262682, (GLfloat) - 0.745474, (GLfloat) - 0.612590, + (GLfloat) 0.033849, (GLfloat) - 0.640593, (GLfloat) - 0.767134, + (GLfloat) 0.004138, (GLfloat) - 0.677809, (GLfloat) - 0.735226, + (GLfloat) - 0.092889, (GLfloat) - 0.948124, (GLfloat) - 0.304029, + (GLfloat) - 0.096449, (GLfloat) - 0.944143, (GLfloat) - 0.315104, + (GLfloat) - 0.719211, (GLfloat) 0.510808, (GLfloat) - 0.470968, + (GLfloat) - 0.720697, (GLfloat) 0.504519, (GLfloat) - 0.475454, + (GLfloat) - 0.811897, (GLfloat) 0.564936, (GLfloat) - 0.147209, + (GLfloat) - 0.813044, (GLfloat) 0.562871, (GLfloat) - 0.148783, + (GLfloat) - 0.910433, (GLfloat) 0.380820, (GLfloat) - 0.161519, + (GLfloat) - 0.907768, (GLfloat) 0.388545, (GLfloat) - 0.158079, + (GLfloat) - 0.804000, (GLfloat) 0.309508, (GLfloat) - 0.507729, + (GLfloat) - 0.801647, (GLfloat) 0.326768, (GLfloat) - 0.500584, + (GLfloat) - 0.720697, (GLfloat) 0.504519, (GLfloat) 0.475454, + (GLfloat) - 0.719210, (GLfloat) 0.510808, (GLfloat) 0.470968, + (GLfloat) - 0.804000, (GLfloat) 0.309509, (GLfloat) 0.507729, + (GLfloat) - 0.801647, (GLfloat) 0.326768, (GLfloat) 0.500585, + (GLfloat) - 0.907768, (GLfloat) 0.388545, (GLfloat) 0.158079, + (GLfloat) - 0.910433, (GLfloat) 0.380820, (GLfloat) 0.161519, + (GLfloat) - 0.811897, (GLfloat) 0.564936, (GLfloat) 0.147209, + (GLfloat) - 0.813044, (GLfloat) 0.562871, (GLfloat) 0.148783, + (GLfloat) - 0.441947, (GLfloat) - 0.873099, (GLfloat) 0.205867, + (GLfloat) - 0.424648, (GLfloat) - 0.887670, (GLfloat) 0.178091, + (GLfloat) - 0.474684, (GLfloat) - 0.877450, (GLfloat) 0.068965, + (GLfloat) - 0.464350, (GLfloat) - 0.882625, (GLfloat) 0.073162, + (GLfloat) - 0.909934, (GLfloat) - 0.390292, (GLfloat) 0.140328, + (GLfloat) - 0.923715, (GLfloat) - 0.349249, (GLfloat) 0.157405, + (GLfloat) - 0.775101, (GLfloat) - 0.483039, (GLfloat) 0.407299, + (GLfloat) - 0.785487, (GLfloat) - 0.436754, (GLfloat) 0.438470, + (GLfloat) - 0.424649, (GLfloat) - 0.887669, (GLfloat) - 0.178092, + (GLfloat) - 0.441947, (GLfloat) - 0.873099, (GLfloat) - 0.205866, + (GLfloat) - 0.775100, (GLfloat) - 0.483039, (GLfloat) - 0.407299, + (GLfloat) - 0.785487, (GLfloat) - 0.436754, (GLfloat) - 0.438470, + (GLfloat) - 0.923715, (GLfloat) - 0.349249, (GLfloat) - 0.157405, + (GLfloat) - 0.909934, (GLfloat) - 0.390292, (GLfloat) - 0.140328, + (GLfloat) - 0.464350, (GLfloat) - 0.882625, (GLfloat) - 0.073162, + (GLfloat) - 0.474684, (GLfloat) - 0.877450, (GLfloat) - 0.068965, + (GLfloat) - 0.447255, (GLfloat) 0.345654, (GLfloat) 0.824916, + (GLfloat) - 0.443443, (GLfloat) 0.349023, (GLfloat) 0.825555, + (GLfloat) - 0.129817, (GLfloat) 0.178023, (GLfloat) 0.975426, + (GLfloat) - 0.132949, (GLfloat) 0.174752, (GLfloat) 0.975595, + (GLfloat) - 0.166487, (GLfloat) 0.021208, (GLfloat) 0.985815, + (GLfloat) - 0.167121, (GLfloat) 0.020158, (GLfloat) 0.985730, + (GLfloat) - 0.494732, (GLfloat) 0.167753, (GLfloat) 0.852701, + (GLfloat) - 0.499144, (GLfloat) 0.160728, (GLfloat) 0.851482, + (GLfloat) 0.531733, (GLfloat) - 0.073239, (GLfloat) 0.843739, + (GLfloat) 0.511681, (GLfloat) - 0.104754, (GLfloat) 0.852765, + (GLfloat) 0.480166, (GLfloat) - 0.230321, (GLfloat) 0.846400, + (GLfloat) 0.481881, (GLfloat) - 0.227371, (GLfloat) 0.846223, + (GLfloat) 0.150895, (GLfloat) - 0.104294, (GLfloat) 0.983033, + (GLfloat) 0.147933, (GLfloat) - 0.109363, (GLfloat) 0.982932, + (GLfloat) 0.188717, (GLfloat) 0.040307, (GLfloat) 0.981204, + (GLfloat) 0.176179, (GLfloat) 0.024438, (GLfloat) 0.984055, + (GLfloat) 0.040104, (GLfloat) - 0.958098, (GLfloat) 0.283620, + (GLfloat) 0.010781, (GLfloat) - 0.964447, (GLfloat) 0.264055, + (GLfloat) - 0.096449, (GLfloat) - 0.944143, (GLfloat) 0.315104, + (GLfloat) - 0.092889, (GLfloat) - 0.948124, (GLfloat) 0.304029, + (GLfloat) 0.004138, (GLfloat) - 0.677808, (GLfloat) 0.735227, + (GLfloat) 0.033849, (GLfloat) - 0.640593, (GLfloat) 0.767135, + (GLfloat) 0.223629, (GLfloat) - 0.775785, (GLfloat) 0.590040, + (GLfloat) 0.262682, (GLfloat) - 0.745474, (GLfloat) 0.612591, + (GLfloat) - 0.353563, (GLfloat) - 0.901143, (GLfloat) 0.250868, + (GLfloat) - 0.351627, (GLfloat) - 0.891347, (GLfloat) 0.286109, + (GLfloat) - 0.510472, (GLfloat) - 0.553764, (GLfloat) 0.657848, + (GLfloat) - 0.520671, (GLfloat) - 0.533495, (GLfloat) 0.666547, + (GLfloat) - 0.249996, (GLfloat) - 0.572959, (GLfloat) 0.780525, + (GLfloat) - 0.244093, (GLfloat) - 0.592931, (GLfloat) 0.767367, + (GLfloat) - 0.236991, (GLfloat) - 0.922714, (GLfloat) 0.304029, + (GLfloat) - 0.232284, (GLfloat) - 0.920192, (GLfloat) 0.315104, + (GLfloat) - 0.036947, (GLfloat) - 0.991593, (GLfloat) - 0.124011, + (GLfloat) - 0.048560, (GLfloat) - 0.989545, (GLfloat) - 0.135802, + (GLfloat) - 0.129266, (GLfloat) - 0.985532, (GLfloat) - 0.109621, + (GLfloat) - 0.133311, (GLfloat) - 0.984414, (GLfloat) - 0.114709, + (GLfloat) - 0.143769, (GLfloat) - 0.989058, (GLfloat) - 0.033079, + (GLfloat) - 0.140897, (GLfloat) - 0.989565, (GLfloat) - 0.030163, + (GLfloat) - 0.064478, (GLfloat) - 0.996956, (GLfloat) - 0.043834, + (GLfloat) - 0.059398, (GLfloat) - 0.997446, (GLfloat) - 0.039656, + (GLfloat) - 0.292813, (GLfloat) - 0.946477, (GLfloat) - 0.135802, + (GLfloat) - 0.304426, (GLfloat) - 0.944429, (GLfloat) - 0.124011, + (GLfloat) - 0.280390, (GLfloat) - 0.958885, (GLfloat) - 0.043834, + (GLfloat) - 0.285331, (GLfloat) - 0.957608, (GLfloat) - 0.039656, + (GLfloat) - 0.206051, (GLfloat) - 0.978076, (GLfloat) - 0.030163, + (GLfloat) - 0.203179, (GLfloat) - 0.978583, (GLfloat) - 0.033079, + (GLfloat) - 0.215602, (GLfloat) - 0.970309, (GLfloat) - 0.109621, + (GLfloat) - 0.211418, (GLfloat) - 0.970641, (GLfloat) - 0.114709, + (GLfloat) - 0.304426, (GLfloat) - 0.944429, (GLfloat) 0.124011, + (GLfloat) - 0.292813, (GLfloat) - 0.946477, (GLfloat) 0.135803, + (GLfloat) - 0.215602, (GLfloat) - 0.970309, (GLfloat) 0.109621, + (GLfloat) - 0.211418, (GLfloat) - 0.970641, (GLfloat) 0.114709, + (GLfloat) - 0.203179, (GLfloat) - 0.978583, (GLfloat) 0.033079, + (GLfloat) - 0.206051, (GLfloat) - 0.978076, (GLfloat) 0.030163, + (GLfloat) - 0.280390, (GLfloat) - 0.958885, (GLfloat) 0.043834, + (GLfloat) - 0.285331, (GLfloat) - 0.957608, (GLfloat) 0.039656, + (GLfloat) - 0.048560, (GLfloat) - 0.989545, (GLfloat) 0.135802, + (GLfloat) - 0.036947, (GLfloat) - 0.991593, (GLfloat) 0.124011, + (GLfloat) - 0.064478, (GLfloat) - 0.996956, (GLfloat) 0.043834, + (GLfloat) - 0.059398, (GLfloat) - 0.997446, (GLfloat) 0.039656, + (GLfloat) - 0.140897, (GLfloat) - 0.989565, (GLfloat) 0.030163, + (GLfloat) - 0.143769, (GLfloat) - 0.989058, (GLfloat) 0.033079, + (GLfloat) - 0.129266, (GLfloat) - 0.985532, (GLfloat) 0.109621, + (GLfloat) - 0.133311, (GLfloat) - 0.984414, (GLfloat) 0.114709, +}; + +static unsigned short int s1_3_POLS[] = +{ + 3, 82, 12, 76, 1, 3, 76, 74, 82, 1, 3, 22, 78, 74, 1, 3, 22, 74, 76, 1, + 3, 78, 20, 80, 1, 3, 80, 74, 78, 1, 3, 28, 82, 74, 1, 3, 28, 74, 80, 1, + 3, 88, 13, 84, 1, 3, 84, 77, 88, 1, 3, 24, 86, 77, 1, 3, 24, 77, 84, 1, + 3, 86, 20, 78, 1, 3, 78, 77, 86, 1, 3, 22, 88, 77, 1, 3, 22, 77, 78, 1, + 3, 14, 90, 85, 1, 3, 14, 85, 93, 1, 3, 26, 91, 85, 1, 3, 26, 85, 90, 1, + 3, 20, 86, 85, 1, 3, 20, 85, 91, 1, 3, 24, 93, 85, 1, 3, 24, 85, 86, 1, + 3, 15, 95, 79, 1, 3, 15, 79, 97, 1, 3, 28, 80, 79, 1, 3, 28, 79, 95, 1, + 3, 20, 91, 79, 1, 3, 20, 79, 80, 1, 3, 26, 97, 79, 1, 3, 26, 79, 91, 1, + 3, 13, 99, 83, 1, 3, 13, 83, 84, 1, 3, 99, 30, 101, 1, 3, 101, 83, 99, 1, + 3, 23, 102, 83, 1, 3, 23, 83, 101, 1, 3, 102, 24, 84, 1, 3, 84, 83, 102, 1, + 3, 108, 16, 104, 1, 3, 104, 100, 108, 1, 3, 32, 106, 100, 1, 3, 32, 100, 104, 1, + 3, 106, 23, 101, 1, 3, 101, 100, 106, 1, 3, 30, 108, 100, 1, 3, 30, 100, 101, 1, + 3, 113, 17, 110, 1, 3, 110, 105, 113, 1, 3, 33, 111, 105, 1, 3, 33, 105, 110, 1, + 3, 23, 106, 105, 1, 3, 23, 105, 111, 1, 3, 106, 32, 113, 1, 3, 113, 105, 106, 1, + 3, 14, 93, 92, 1, 3, 14, 92, 114, 1, 3, 93, 24, 102, 1, 3, 102, 92, 93, 1, +3, 23, 111, 92, 1, 3, 23, 92, 102, 1, 3, 111, 33, 114, 1, 3, 114, 92, 111, 1, + 3, 16, 116, 103, 1, 3, 16, 103, 104, 1, 3, 116, 35, 118, 1, 3, 118, 103, 116, 1, + 3, 31, 119, 103, 1, 3, 31, 103, 118, 1, 3, 119, 32, 104, 1, 3, 104, 103, 119, 1, + 3, 18, 121, 117, 1, 3, 18, 117, 125, 1, 3, 121, 36, 123, 1, 3, 123, 117, 121, 1, + 3, 31, 118, 117, 1, 3, 31, 117, 123, 1, 3, 118, 35, 125, 1, 3, 125, 117, 118, 1, + 3, 19, 127, 122, 1, 3, 19, 122, 130, 1, 3, 127, 37, 128, 1, 3, 128, 122, 127, 1, + 3, 31, 123, 122, 1, 3, 31, 122, 128, 1, 3, 123, 36, 130, 1, 3, 130, 122, 123, 1, + 3, 17, 113, 112, 1, 3, 17, 112, 131, 1, 3, 113, 32, 119, 1, 3, 119, 112, 113, 1, + 3, 31, 128, 112, 1, 3, 31, 112, 119, 1, 3, 128, 37, 131, 1, 3, 131, 112, 128, 1, + 3, 121, 18, 133, 1, 3, 133, 120, 121, 1, 3, 39, 134, 120, 1, 3, 39, 120, 133, 1, + 3, 134, 27, 135, 1, 3, 135, 120, 134, 1, 3, 36, 121, 120, 1, 3, 36, 120, 135, 1, + 3, 12, 82, 81, 1, 3, 12, 81, 138, 1, 3, 82, 28, 136, 1, 3, 136, 81, 82, 1, +3, 27, 134, 81, 1, 3, 27, 81, 136, 1, 3, 134, 39, 138, 1, 3, 138, 81, 134, 1, + 3, 15, 139, 94, 1, 3, 15, 94, 95, 1, 3, 139, 40, 140, 1, 3, 140, 94, 139, 1, + 3, 27, 136, 94, 1, 3, 27, 94, 140, 1, 3, 136, 28, 95, 1, 3, 95, 94, 136, 1, + 3, 141, 19, 130, 1, 3, 130, 129, 141, 1, 3, 130, 36, 135, 1, 3, 135, 129, 130, 1, + 3, 27, 140, 129, 1, 3, 27, 129, 135, 1, 3, 40, 141, 129, 1, 3, 40, 129, 140, 1, + 3, 14, 114, 89, 1, 3, 14, 89, 90, 1, 3, 114, 33, 142, 1, 3, 142, 89, 114, 1, + 3, 25, 143, 89, 1, 3, 25, 89, 142, 1, 3, 143, 26, 90, 1, 3, 90, 89, 143, 1, + 3, 17, 131, 109, 1, 3, 17, 109, 110, 1, 3, 131, 37, 144, 1, 3, 144, 109, 131, 1, + 3, 25, 142, 109, 1, 3, 25, 109, 144, 1, 3, 142, 33, 110, 1, 3, 110, 109, 142, 1, + 3, 19, 141, 126, 1, 3, 19, 126, 127, 1, 3, 141, 40, 145, 1, 3, 145, 126, 141, 1, + 3, 25, 144, 126, 1, 3, 25, 126, 145, 1, 3, 144, 37, 127, 1, 3, 127, 126, 144, 1, + 3, 15, 97, 96, 1, 3, 15, 96, 139, 1, 3, 97, 26, 143, 1, 3, 143, 96, 97, 1, +3, 25, 145, 96, 1, 3, 25, 96, 143, 1, 3, 145, 40, 139, 1, 3, 139, 96, 145, 1, + 3, 12, 146, 75, 1, 3, 12, 75, 76, 1, 3, 146, 41, 148, 1, 3, 148, 75, 146, 1, + 3, 21, 149, 75, 1, 3, 21, 75, 148, 1, 3, 149, 22, 76, 1, 3, 76, 75, 149, 1, + 3, 155, 8, 151, 1, 3, 151, 147, 155, 1, 3, 43, 153, 147, 1, 3, 43, 147, 151, 1, + 3, 153, 21, 148, 1, 3, 148, 147, 153, 1, 3, 41, 155, 147, 1, 3, 41, 147, 148, 1, + 3, 160, 11, 157, 1, 3, 157, 152, 160, 1, 3, 44, 158, 152, 1, 3, 44, 152, 157, 1, + 3, 158, 21, 153, 1, 3, 153, 152, 158, 1, 3, 43, 160, 152, 1, 3, 43, 152, 153, 1, + 3, 13, 88, 87, 1, 3, 13, 87, 161, 1, 3, 88, 22, 149, 1, 3, 149, 87, 88, 1, +3, 21, 158, 87, 1, 3, 21, 87, 149, 1, 3, 158, 44, 161, 1, 3, 161, 87, 158, 1, + 3, 18, 162, 132, 1, 3, 18, 132, 133, 1, 3, 162, 45, 164, 1, 3, 164, 132, 162, 1, + 3, 38, 165, 132, 1, 3, 38, 132, 164, 1, 3, 165, 39, 133, 1, 3, 133, 132, 165, 1, + 3, 170, 9, 167, 1, 3, 167, 163, 170, 1, 3, 47, 168, 163, 1, 3, 47, 163, 167, 1, + 3, 168, 38, 164, 1, 3, 164, 163, 168, 1, 3, 45, 170, 163, 1, 3, 45, 163, 164, 1, +3, 8, 155, 154, 1, 3, 8, 154, 173, 1, 3, 155, 41, 171, 1, 3, 171, 154, 155, 1, + 3, 38, 168, 154, 1, 3, 38, 154, 171, 1, 3, 168, 47, 173, 1, 3, 173, 154, 168, 1, + 3, 146, 12, 138, 1, 3, 138, 137, 146, 1, 3, 39, 165, 137, 1, 3, 39, 137, 138, 1, + 3, 165, 38, 171, 1, 3, 171, 137, 165, 1, 3, 41, 146, 137, 1, 3, 41, 137, 171, 1, + 3, 16, 108, 107, 1, 3, 16, 107, 177, 1, 3, 108, 30, 174, 1, 3, 174, 107, 108, 1, + 3, 29, 176, 107, 1, 3, 29, 107, 174, 1, 3, 176, 50, 177, 1, 3, 177, 107, 176, 1, + 3, 99, 13, 161, 1, 3, 161, 98, 99, 1, 3, 44, 178, 98, 1, 3, 44, 98, 161, 1, + 3, 178, 29, 174, 1, 3, 174, 98, 178, 1, 3, 30, 99, 98, 1, 3, 30, 98, 174, 1, + 3, 11, 180, 156, 1, 3, 11, 156, 157, 1, 3, 180, 49, 181, 1, 3, 181, 156, 180, 1, + 3, 29, 178, 156, 1, 3, 29, 156, 181, 1, 3, 178, 44, 157, 1, 3, 157, 156, 178, 1, + 3, 185, 10, 183, 1, 3, 183, 175, 185, 1, 3, 50, 176, 175, 1, 3, 50, 175, 183, 1, + 3, 176, 29, 181, 1, 3, 181, 175, 176, 1, 3, 49, 185, 175, 1, 3, 49, 175, 181, 1, + 3, 162, 18, 125, 1, 3, 125, 124, 162, 1, 3, 35, 186, 124, 1, 3, 35, 124, 125, 1, + 3, 186, 34, 187, 1, 3, 187, 124, 186, 1, 3, 45, 162, 124, 1, 3, 45, 124, 187, 1, + 3, 116, 16, 177, 1, 3, 177, 115, 116, 1, 3, 50, 188, 115, 1, 3, 50, 115, 177, 1, + 3, 188, 34, 186, 1, 3, 186, 115, 188, 1, 3, 35, 116, 115, 1, 3, 35, 115, 186, 1, + 3, 10, 190, 182, 1, 3, 10, 182, 183, 1, 3, 190, 52, 191, 1, 3, 191, 182, 190, 1, + 3, 34, 188, 182, 1, 3, 34, 182, 191, 1, 3, 188, 50, 183, 1, 3, 183, 182, 188, 1, +3, 9, 170, 169, 1, 3, 9, 169, 193, 1, 3, 170, 45, 187, 1, 3, 187, 169, 170, 1, + 3, 34, 191, 169, 1, 3, 34, 169, 187, 1, 3, 191, 52, 193, 1, 3, 193, 169, 191, 1, + 3, 201, 1, 196, 1, 3, 196, 194, 201, 1, 3, 54, 198, 194, 1, 3, 54, 194, 196, 1, + 3, 198, 46, 199, 1, 3, 199, 194, 198, 1, 3, 56, 201, 194, 1, 3, 56, 194, 199, 1, +3, 3, 203, 197, 1, 3, 3, 197, 206, 1, 3, 203, 55, 204, 1, 3, 204, 197, 203, 1, + 3, 46, 198, 197, 1, 3, 46, 197, 204, 1, 3, 198, 54, 206, 1, 3, 206, 197, 198, 1, + 3, 208, 8, 173, 1, 3, 173, 172, 208, 1, 3, 47, 207, 172, 1, 3, 47, 172, 173, 1, + 3, 207, 46, 204, 1, 3, 204, 172, 207, 1, 3, 55, 208, 172, 1, 3, 55, 172, 204, 1, +3, 9, 209, 166, 1, 3, 9, 166, 167, 1, 3, 209, 56, 199, 1, 3, 199, 166, 209, 1, + 3, 46, 207, 166, 1, 3, 46, 166, 199, 1, 3, 207, 47, 167, 1, 3, 167, 166, 207, 1, + 3, 214, 1, 201, 1, 3, 201, 200, 214, 1, 3, 56, 210, 200, 1, 3, 56, 200, 201, 1, + 3, 210, 51, 212, 1, 3, 212, 200, 210, 1, 3, 59, 214, 200, 1, 3, 59, 200, 212, 1, + 3, 209, 9, 193, 1, 3, 193, 192, 209, 1, 3, 52, 215, 192, 1, 3, 52, 192, 193, 1, + 3, 51, 210, 192, 1, 3, 51, 192, 215, 1, 3, 210, 56, 209, 1, 3, 209, 192, 210, 1, + 3, 190, 10, 216, 1, 3, 216, 189, 190, 1, 3, 216, 57, 217, 1, 3, 217, 189, 216, 1, + 3, 51, 215, 189, 1, 3, 51, 189, 217, 1, 3, 52, 190, 189, 1, 3, 52, 189, 215, 1, + 3, 221, 0, 219, 1, 3, 219, 211, 221, 1, 3, 59, 212, 211, 1, 3, 59, 211, 219, 1, + 3, 212, 51, 217, 1, 3, 217, 211, 212, 1, 3, 57, 221, 211, 1, 3, 57, 211, 217, 1, + 3, 226, 0, 221, 1, 3, 221, 220, 226, 1, 3, 57, 222, 220, 1, 3, 57, 220, 221, 1, + 3, 222, 48, 224, 1, 3, 224, 220, 222, 1, 3, 62, 226, 220, 1, 3, 62, 220, 224, 1, + 3, 10, 185, 184, 1, 3, 10, 184, 216, 1, 3, 185, 49, 227, 1, 3, 227, 184, 185, 1, + 3, 48, 222, 184, 1, 3, 48, 184, 227, 1, 3, 222, 57, 216, 1, 3, 216, 184, 222, 1, + 3, 180, 11, 228, 1, 3, 228, 179, 180, 1, 3, 60, 229, 179, 1, 3, 60, 179, 228, 1, + 3, 229, 48, 227, 1, 3, 227, 179, 229, 1, 3, 49, 180, 179, 1, 3, 49, 179, 227, 1, +3, 2, 231, 223, 1, 3, 2, 223, 233, 1, 3, 231, 62, 224, 1, 3, 224, 223, 231, 1, + 3, 48, 229, 223, 1, 3, 48, 223, 224, 1, 3, 229, 60, 233, 1, 3, 233, 223, 229, 1, +3, 2, 233, 232, 1, 3, 2, 232, 237, 1, 3, 233, 60, 234, 1, 3, 234, 232, 233, 1, + 3, 42, 235, 232, 1, 3, 42, 232, 234, 1, 3, 235, 64, 237, 1, 3, 237, 232, 235, 1, + 3, 11, 160, 159, 1, 3, 11, 159, 228, 1, 3, 160, 43, 238, 1, 3, 238, 159, 160, 1, + 3, 42, 234, 159, 1, 3, 42, 159, 238, 1, 3, 234, 60, 228, 1, 3, 228, 159, 234, 1, +3, 8, 208, 150, 1, 3, 8, 150, 151, 1, 3, 208, 55, 239, 1, 3, 239, 150, 208, 1, + 3, 42, 238, 150, 1, 3, 42, 150, 239, 1, 3, 238, 43, 151, 1, 3, 151, 150, 238, 1, +3, 3, 241, 202, 1, 3, 3, 202, 203, 1, 3, 241, 64, 235, 1, 3, 235, 202, 241, 1, + 3, 42, 239, 202, 1, 3, 42, 202, 235, 1, 3, 239, 55, 203, 1, 3, 203, 202, 239, 1, + 3, 245, 2, 237, 1, 3, 237, 236, 245, 1, 3, 64, 242, 236, 1, 3, 64, 236, 237, 1, + 3, 242, 63, 244, 1, 3, 244, 236, 242, 1, 3, 68, 245, 236, 1, 3, 68, 236, 244, 1, + 3, 241, 3, 246, 1, 3, 246, 240, 241, 1, 3, 65, 248, 240, 1, 3, 65, 240, 246, 1, + 3, 248, 63, 242, 1, 3, 242, 240, 248, 1, 3, 64, 241, 240, 1, 3, 64, 240, 242, 1, +3, 4, 250, 247, 1, 3, 4, 247, 253, 1, 3, 67, 251, 247, 1, 3, 67, 247, 250, 1, + 3, 63, 248, 247, 1, 3, 63, 247, 251, 1, 3, 65, 253, 247, 1, 3, 65, 247, 248, 1, +3, 7, 255, 243, 1, 3, 7, 243, 257, 1, 3, 68, 244, 243, 1, 3, 68, 243, 255, 1, + 3, 63, 251, 243, 1, 3, 63, 243, 244, 1, 3, 67, 257, 243, 1, 3, 67, 243, 251, 1, + 3, 246, 3, 206, 1, 3, 206, 205, 246, 1, 3, 54, 258, 205, 1, 3, 54, 205, 206, 1, + 3, 258, 53, 259, 1, 3, 259, 205, 258, 1, 3, 65, 246, 205, 1, 3, 65, 205, 259, 1, +3, 1, 260, 195, 1, 3, 1, 195, 196, 1, 3, 260, 69, 262, 1, 3, 262, 195, 260, 1, + 3, 53, 258, 195, 1, 3, 53, 195, 262, 1, 3, 258, 54, 196, 1, 3, 196, 195, 258, 1, + 3, 267, 5, 264, 1, 3, 264, 261, 267, 1, 3, 70, 265, 261, 1, 3, 70, 261, 264, 1, + 3, 53, 262, 261, 1, 3, 53, 261, 265, 1, 3, 262, 69, 267, 1, 3, 267, 261, 262, 1, +3, 4, 253, 252, 1, 3, 4, 252, 268, 1, 3, 253, 65, 259, 1, 3, 259, 252, 253, 1, + 3, 53, 265, 252, 1, 3, 53, 252, 259, 1, 3, 70, 268, 252, 1, 3, 70, 252, 265, 1, +3, 1, 214, 213, 1, 3, 1, 213, 260, 1, 3, 214, 59, 269, 1, 3, 269, 213, 214, 1, + 3, 58, 270, 213, 1, 3, 58, 213, 269, 1, 3, 270, 69, 260, 1, 3, 260, 213, 270, 1, +3, 0, 271, 218, 1, 3, 0, 218, 219, 1, 3, 271, 71, 273, 1, 3, 273, 218, 271, 1, + 3, 58, 269, 218, 1, 3, 58, 218, 273, 1, 3, 269, 59, 219, 1, 3, 219, 218, 269, 1, +3, 6, 275, 272, 1, 3, 6, 272, 278, 1, 3, 72, 276, 272, 1, 3, 72, 272, 275, 1, + 3, 58, 273, 272, 1, 3, 58, 272, 276, 1, 3, 273, 71, 278, 1, 3, 278, 272, 273, 1, +3, 5, 267, 266, 1, 3, 5, 266, 279, 1, 3, 267, 69, 270, 1, 3, 270, 266, 267, 1, + 3, 58, 276, 266, 1, 3, 58, 266, 270, 1, 3, 72, 279, 266, 1, 3, 72, 266, 276, 1, +3, 0, 226, 225, 1, 3, 0, 225, 271, 1, 3, 226, 62, 280, 1, 3, 280, 225, 226, 1, + 3, 61, 281, 225, 1, 3, 61, 225, 280, 1, 3, 281, 71, 271, 1, 3, 271, 225, 281, 1, + 3, 231, 2, 245, 1, 3, 245, 230, 231, 1, 3, 68, 282, 230, 1, 3, 68, 230, 245, 1, + 3, 282, 61, 280, 1, 3, 280, 230, 282, 1, 3, 62, 231, 230, 1, 3, 62, 230, 280, 1, +3, 7, 283, 254, 1, 3, 7, 254, 255, 1, 3, 73, 284, 254, 1, 3, 73, 254, 283, 1, + 3, 61, 282, 254, 1, 3, 61, 254, 284, 1, 3, 282, 68, 255, 1, 3, 255, 254, 282, 1, + 3, 285, 6, 278, 1, 3, 278, 277, 285, 1, 3, 278, 71, 281, 1, 3, 281, 277, 278, 1, + 3, 61, 284, 277, 1, 3, 61, 277, 281, 1, 3, 73, 285, 277, 1, 3, 73, 277, 284, 1, +3, 4, 268, 249, 1, 3, 4, 249, 250, 1, 3, 268, 70, 286, 1, 3, 286, 249, 268, 1, + 3, 66, 287, 249, 1, 3, 66, 249, 286, 1, 3, 287, 67, 250, 1, 3, 250, 249, 287, 1, +3, 5, 279, 263, 1, 3, 5, 263, 264, 1, 3, 279, 72, 288, 1, 3, 288, 263, 279, 1, + 3, 66, 286, 263, 1, 3, 66, 263, 288, 1, 3, 286, 70, 264, 1, 3, 264, 263, 286, 1, +3, 6, 285, 274, 1, 3, 6, 274, 275, 1, 3, 285, 73, 289, 1, 3, 289, 274, 285, 1, + 3, 66, 288, 274, 1, 3, 66, 274, 289, 1, 3, 288, 72, 275, 1, 3, 275, 274, 288, 1, +3, 7, 257, 256, 1, 3, 7, 256, 283, 1, 3, 257, 67, 287, 1, 3, 287, 256, 257, 1, + 3, 66, 289, 256, 1, 3, 66, 256, 287, 1, 3, 289, 73, 283, 1, 3, 283, 256, 289, 1, + + 0 +}; + +struct lwo LWO_s1_3 = +{ + 290, /* number of points */ + s1_3_PNTS, s1_3_normals, s1_3_POLS, 0L +}; + +#endif /* USE_GL */ + +/* End of s1_3.c */ diff --git a/hacks/glx/s1_4.c b/hacks/glx/s1_4.c new file mode 100644 index 00000000..46e19cc2 --- /dev/null +++ b/hacks/glx/s1_4.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_4.c 4.2 97/04/20 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render "s1_4" in 3D. + * + * Generated by lw2ogl. Link this with your program but do + * not edit by hand. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat s1_4_PNTS[] = +{ + (GLfloat) 0.691977, (GLfloat) 0.424648, (GLfloat) - 0.335934, + (GLfloat) 0.691977, (GLfloat) 0.424648, (GLfloat) - 0.664066, + (GLfloat) 0.910107, (GLfloat) 0.206343, (GLfloat) - 0.335934, + (GLfloat) 0.910107, (GLfloat) 0.206343, (GLfloat) - 0.664066, + (GLfloat) 0.820528, (GLfloat) 0.154011, (GLfloat) - 0.638667, + (GLfloat) 0.608078, (GLfloat) 0.332278, (GLfloat) - 0.638667, + (GLfloat) 0.608078, (GLfloat) 0.332278, (GLfloat) - 0.361333, + (GLfloat) 0.820528, (GLfloat) 0.154011, (GLfloat) - 0.361333, + (GLfloat) 1.065609, (GLfloat) 0.289676, (GLfloat) - 0.638205, + (GLfloat) 1.074101, (GLfloat) 0.505017, (GLfloat) - 0.638205, + (GLfloat) 1.074101, (GLfloat) 0.505017, (GLfloat) - 0.361795, + (GLfloat) 1.065609, (GLfloat) 0.289676, (GLfloat) - 0.361795, + (GLfloat) 1.235562, (GLfloat) 0.083949, (GLfloat) - 0.664066, + (GLfloat) 1.235562, (GLfloat) 0.083949, (GLfloat) - 0.335934, + (GLfloat) 1.331736, (GLfloat) 0.017726, (GLfloat) - 0.361333, + (GLfloat) 1.331736, (GLfloat) 0.017726, (GLfloat) - 0.638667, + (GLfloat) 1.431839, (GLfloat) 0.331232, (GLfloat) - 0.335934, + (GLfloat) 1.517309, (GLfloat) 0.223825, (GLfloat) - 0.361333, + (GLfloat) 1.431839, (GLfloat) 0.331232, (GLfloat) - 0.664066, + (GLfloat) 1.517309, (GLfloat) 0.223825, (GLfloat) - 0.638667, + (GLfloat) 1.243033, (GLfloat) - 0.034453, (GLfloat) - 0.500000, + (GLfloat) 1.136909, (GLfloat) 0.161755, (GLfloat) - 0.500000, + (GLfloat) 1.199875, (GLfloat) 0.038989, (GLfloat) - 0.500000, + (GLfloat) 1.400739, (GLfloat) 0.142695, (GLfloat) - 0.261940, + (GLfloat) 1.284897, (GLfloat) 0.013483, (GLfloat) - 0.325812, + (GLfloat) 1.438241, (GLfloat) 0.108423, (GLfloat) - 0.500000, + (GLfloat) 1.310688, (GLfloat) - 0.015661, (GLfloat) - 0.500000, + (GLfloat) 1.400739, (GLfloat) 0.142695, (GLfloat) - 0.738060, + (GLfloat) 1.284897, (GLfloat) 0.013483, (GLfloat) - 0.674188, + (GLfloat) 1.216443, (GLfloat) 0.317256, (GLfloat) - 0.300040, + (GLfloat) 1.333700, (GLfloat) 0.207591, (GLfloat) - 0.276273, + (GLfloat) 1.558444, (GLfloat) 0.319842, (GLfloat) - 0.500000, + (GLfloat) 1.515677, (GLfloat) 0.272720, (GLfloat) - 0.325812, + (GLfloat) 1.429500, (GLfloat) 0.116294, (GLfloat) - 0.322437, + (GLfloat) 1.295978, (GLfloat) 0.472757, (GLfloat) - 0.500000, + (GLfloat) 1.467526, (GLfloat) 0.376193, (GLfloat) - 0.500000, + (GLfloat) 1.515677, (GLfloat) 0.272720, (GLfloat) - 0.674188, + (GLfloat) 1.548313, (GLfloat) 0.248248, (GLfloat) - 0.500000, + (GLfloat) 1.216443, (GLfloat) 0.317256, (GLfloat) - 0.699960, + (GLfloat) 1.333700, (GLfloat) 0.207591, (GLfloat) - 0.723727, + (GLfloat) 1.429500, (GLfloat) 0.116294, (GLfloat) - 0.677562, + (GLfloat) 1.158118, (GLfloat) 0.203222, (GLfloat) - 0.646637, + (GLfloat) 0.998811, (GLfloat) 0.235426, (GLfloat) - 0.500000, + (GLfloat) 1.064065, (GLfloat) 0.250523, (GLfloat) - 0.500000, + (GLfloat) 1.158118, (GLfloat) 0.203222, (GLfloat) - 0.353363, + (GLfloat) 1.274769, (GLfloat) 0.431290, (GLfloat) - 0.646637, + (GLfloat) 0.920924, (GLfloat) 0.379919, (GLfloat) - 0.699960, + (GLfloat) 1.069855, (GLfloat) 0.397346, (GLfloat) - 0.688461, + (GLfloat) 0.920924, (GLfloat) 0.379919, (GLfloat) - 0.300040, + (GLfloat) 1.069855, (GLfloat) 0.397346, (GLfloat) - 0.311539, + (GLfloat) 1.274769, (GLfloat) 0.431290, (GLfloat) - 0.353363, + (GLfloat) 0.843038, (GLfloat) 0.524412, (GLfloat) - 0.500000, + (GLfloat) 1.075645, (GLfloat) 0.544169, (GLfloat) - 0.500000, + (GLfloat) 0.735693, (GLfloat) 0.265534, (GLfloat) - 0.738060, + (GLfloat) 0.801042, (GLfloat) 0.315496, (GLfloat) - 0.723727, + (GLfloat) 0.978041, (GLfloat) 0.273957, (GLfloat) - 0.646637, + (GLfloat) 0.863808, (GLfloat) 0.485881, (GLfloat) - 0.646637, + (GLfloat) 0.863808, (GLfloat) 0.485881, (GLfloat) - 0.353363, + (GLfloat) 0.555594, (GLfloat) 0.419060, (GLfloat) - 0.500000, + (GLfloat) 0.652318, (GLfloat) 0.464340, (GLfloat) - 0.500000, + (GLfloat) 0.978041, (GLfloat) 0.273957, (GLfloat) - 0.353363, + (GLfloat) 0.735693, (GLfloat) 0.265534, (GLfloat) - 0.261940, + (GLfloat) 0.801042, (GLfloat) 0.315496, (GLfloat) - 0.276273, + (GLfloat) 0.915792, (GLfloat) 0.112008, (GLfloat) - 0.500000, + (GLfloat) 0.949767, (GLfloat) 0.166652, (GLfloat) - 0.500000, + (GLfloat) 0.867858, (GLfloat) 0.153664, (GLfloat) - 0.674188, + (GLfloat) 0.702437, (GLfloat) 0.229003, (GLfloat) - 0.500000, + (GLfloat) 0.846018, (GLfloat) 0.123878, (GLfloat) - 0.500000, + (GLfloat) 0.867858, (GLfloat) 0.153664, (GLfloat) - 0.325812, + (GLfloat) 0.604310, (GLfloat) 0.378335, (GLfloat) - 0.674188, + (GLfloat) 0.709997, (GLfloat) 0.238013, (GLfloat) - 0.677562, + (GLfloat) 0.604310, (GLfloat) 0.378335, (GLfloat) - 0.325812, + (GLfloat) 0.573976, (GLfloat) 0.352148, (GLfloat) - 0.500000, + (GLfloat) 0.709997, (GLfloat) 0.238013, (GLfloat) - 0.322437, + (GLfloat) 1.231827, (GLfloat) 0.004686, (GLfloat) - 0.594296, + (GLfloat) 1.178115, (GLfloat) 0.109780, (GLfloat) - 0.584482, + (GLfloat) 1.208797, (GLfloat) 0.050229, (GLfloat) - 0.589491, + (GLfloat) 1.231827, (GLfloat) 0.004686, (GLfloat) - 0.405704, + (GLfloat) 1.221734, (GLfloat) - 0.007055, (GLfloat) - 0.500000, + (GLfloat) 1.279887, (GLfloat) - 0.026194, (GLfloat) - 0.587500, + (GLfloat) 1.253444, (GLfloat) - 0.022303, (GLfloat) - 0.594949, + (GLfloat) 1.312568, (GLfloat) 0.098620, (GLfloat) - 0.720025, + (GLfloat) 1.262105, (GLfloat) 0.039911, (GLfloat) - 0.672877, + (GLfloat) 1.312568, (GLfloat) 0.098620, (GLfloat) - 0.279975, + (GLfloat) 1.262105, (GLfloat) 0.039911, (GLfloat) - 0.327123, + (GLfloat) 1.279887, (GLfloat) - 0.026194, (GLfloat) - 0.412500, + (GLfloat) 1.253444, (GLfloat) - 0.022303, (GLfloat) - 0.405051, + (GLfloat) 1.178115, (GLfloat) 0.109780, (GLfloat) - 0.415518, + (GLfloat) 1.208797, (GLfloat) 0.050229, (GLfloat) - 0.410509, + (GLfloat) 1.373428, (GLfloat) 0.045002, (GLfloat) - 0.409500, + (GLfloat) 1.317700, (GLfloat) - 0.004566, (GLfloat) - 0.417500, + (GLfloat) 1.270418, (GLfloat) - 0.038526, (GLfloat) - 0.500000, + (GLfloat) 1.359179, (GLfloat) 0.061869, (GLfloat) - 0.294000, + (GLfloat) 1.309178, (GLfloat) 0.008154, (GLfloat) - 0.339125, + (GLfloat) 1.359179, (GLfloat) 0.061869, (GLfloat) - 0.706000, + (GLfloat) 1.309178, (GLfloat) 0.008154, (GLfloat) - 0.660875, + (GLfloat) 1.373428, (GLfloat) 0.045002, (GLfloat) - 0.590500, + (GLfloat) 1.317700, (GLfloat) - 0.004566, (GLfloat) - 0.582500, + (GLfloat) 1.236552, (GLfloat) 0.195985, (GLfloat) - 0.302876, + (GLfloat) 1.280170, (GLfloat) 0.140150, (GLfloat) - 0.291188, + (GLfloat) 1.433681, (GLfloat) 0.239521, (GLfloat) - 0.279975, + (GLfloat) 1.373124, (GLfloat) 0.169070, (GLfloat) - 0.264259, + (GLfloat) 1.337615, (GLfloat) 0.072243, (GLfloat) - 0.277994, + (GLfloat) 1.514422, (GLfloat) 0.333454, (GLfloat) - 0.405704, + (GLfloat) 1.484144, (GLfloat) 0.298229, (GLfloat) - 0.327123, + (GLfloat) 1.476277, (GLfloat) 0.191919, (GLfloat) - 0.294000, + (GLfloat) 1.463411, (GLfloat) 0.213552, (GLfloat) - 0.277994, + (GLfloat) 1.324207, (GLfloat) 0.325294, (GLfloat) - 0.302876, + (GLfloat) 1.387230, (GLfloat) 0.275032, (GLfloat) - 0.291188, + (GLfloat) 1.494540, (GLfloat) 0.179511, (GLfloat) - 0.409500, + (GLfloat) 1.483059, (GLfloat) 0.179084, (GLfloat) - 0.335375, + (GLfloat) 1.418631, (GLfloat) 0.126081, (GLfloat) - 0.278500, + (GLfloat) 1.555568, (GLfloat) 0.279982, (GLfloat) - 0.412500, + (GLfloat) 1.524471, (GLfloat) 0.247261, (GLfloat) - 0.339125, + (GLfloat) 1.372652, (GLfloat) 0.056465, (GLfloat) - 0.335375, + (GLfloat) 1.382643, (GLfloat) 0.411500, (GLfloat) - 0.415518, + (GLfloat) 1.458604, (GLfloat) 0.364953, (GLfloat) - 0.410509, + (GLfloat) 1.514422, (GLfloat) 0.333454, (GLfloat) - 0.594296, + (GLfloat) 1.524515, (GLfloat) 0.345196, (GLfloat) - 0.500000, + (GLfloat) 1.547582, (GLfloat) 0.308099, (GLfloat) - 0.405051, + (GLfloat) 1.433681, (GLfloat) 0.239521, (GLfloat) - 0.720025, + (GLfloat) 1.484144, (GLfloat) 0.298229, (GLfloat) - 0.672877, + (GLfloat) 1.555568, (GLfloat) 0.279982, (GLfloat) - 0.587500, + (GLfloat) 1.547582, (GLfloat) 0.308099, (GLfloat) - 0.594949, + (GLfloat) 1.382643, (GLfloat) 0.411500, (GLfloat) - 0.584482, + (GLfloat) 1.458604, (GLfloat) 0.364953, (GLfloat) - 0.589491, + (GLfloat) 1.494540, (GLfloat) 0.179511, (GLfloat) - 0.590500, + (GLfloat) 1.538011, (GLfloat) 0.240115, (GLfloat) - 0.582500, + (GLfloat) 1.566843, (GLfloat) 0.290687, (GLfloat) - 0.500000, + (GLfloat) 1.476277, (GLfloat) 0.191919, (GLfloat) - 0.706000, + (GLfloat) 1.524471, (GLfloat) 0.247261, (GLfloat) - 0.660875, + (GLfloat) 1.538011, (GLfloat) 0.240115, (GLfloat) - 0.417500, + (GLfloat) 1.324207, (GLfloat) 0.325294, (GLfloat) - 0.697124, + (GLfloat) 1.387230, (GLfloat) 0.275032, (GLfloat) - 0.708812, + (GLfloat) 1.373124, (GLfloat) 0.169070, (GLfloat) - 0.735741, + (GLfloat) 1.463411, (GLfloat) 0.213552, (GLfloat) - 0.722006, + (GLfloat) 1.337615, (GLfloat) 0.072243, (GLfloat) - 0.722006, + (GLfloat) 1.236552, (GLfloat) 0.195985, (GLfloat) - 0.697124, + (GLfloat) 1.280170, (GLfloat) 0.140150, (GLfloat) - 0.708812, + (GLfloat) 1.372652, (GLfloat) 0.056465, (GLfloat) - 0.664625, + (GLfloat) 1.418631, (GLfloat) 0.126081, (GLfloat) - 0.721500, + (GLfloat) 1.483059, (GLfloat) 0.179084, (GLfloat) - 0.664625, + (GLfloat) 1.436048, (GLfloat) 0.110398, (GLfloat) - 0.402250, + (GLfloat) 1.370641, (GLfloat) 0.037756, (GLfloat) - 0.500000, + (GLfloat) 1.501456, (GLfloat) 0.183040, (GLfloat) - 0.500000, + (GLfloat) 1.436048, (GLfloat) 0.110398, (GLfloat) - 0.597750, + (GLfloat) 1.200029, (GLfloat) 0.142107, (GLfloat) - 0.654883, + (GLfloat) 1.103513, (GLfloat) 0.226037, (GLfloat) - 0.576713, + (GLfloat) 1.142211, (GLfloat) 0.172121, (GLfloat) - 0.579984, + (GLfloat) 1.170811, (GLfloat) 0.099004, (GLfloat) - 0.500000, + (GLfloat) 1.027452, (GLfloat) 0.263727, (GLfloat) - 0.576713, + (GLfloat) 1.064451, (GLfloat) 0.260311, (GLfloat) - 0.575384, + (GLfloat) 1.103513, (GLfloat) 0.226037, (GLfloat) - 0.423287, + (GLfloat) 1.100538, (GLfloat) 0.216006, (GLfloat) - 0.500000, + (GLfloat) 1.127320, (GLfloat) 0.306289, (GLfloat) - 0.678998, + (GLfloat) 1.112441, (GLfloat) 0.256132, (GLfloat) - 0.640641, + (GLfloat) 1.127320, (GLfloat) 0.306289, (GLfloat) - 0.321002, + (GLfloat) 1.112441, (GLfloat) 0.256132, (GLfloat) - 0.359359, + (GLfloat) 1.142211, (GLfloat) 0.172121, (GLfloat) - 0.420016, + (GLfloat) 1.027452, (GLfloat) 0.263727, (GLfloat) - 0.423287, + (GLfloat) 1.064451, (GLfloat) 0.260311, (GLfloat) - 0.424615, + (GLfloat) 1.200029, (GLfloat) 0.142107, (GLfloat) - 0.345117, + (GLfloat) 1.360730, (GLfloat) 0.379173, (GLfloat) - 0.654883, + (GLfloat) 1.163029, (GLfloat) 0.426667, (GLfloat) - 0.678998, + (GLfloat) 1.248257, (GLfloat) 0.379456, (GLfloat) - 0.686629, + (GLfloat) 1.280379, (GLfloat) 0.260640, (GLfloat) - 0.711204, + (GLfloat) 0.979330, (GLfloat) 0.456830, (GLfloat) - 0.678998, + (GLfloat) 1.072171, (GLfloat) 0.456076, (GLfloat) - 0.675897, + (GLfloat) 1.145175, (GLfloat) 0.366478, (GLfloat) - 0.691783, + (GLfloat) 1.186836, (GLfloat) 0.506919, (GLfloat) - 0.576713, + (GLfloat) 1.177908, (GLfloat) 0.476825, (GLfloat) - 0.640641, + (GLfloat) 1.184630, (GLfloat) 0.255055, (GLfloat) - 0.686629, + (GLfloat) 1.008203, (GLfloat) 0.340968, (GLfloat) - 0.678998, + (GLfloat) 1.067539, (GLfloat) 0.338617, (GLfloat) - 0.675897, + (GLfloat) 1.280379, (GLfloat) 0.260640, (GLfloat) - 0.288796, + (GLfloat) 1.163029, (GLfloat) 0.426667, (GLfloat) - 0.321002, + (GLfloat) 1.248257, (GLfloat) 0.379456, (GLfloat) - 0.313371, + (GLfloat) 1.360730, (GLfloat) 0.379173, (GLfloat) - 0.345117, + (GLfloat) 1.184630, (GLfloat) 0.255055, (GLfloat) - 0.313371, + (GLfloat) 1.008203, (GLfloat) 0.340968, (GLfloat) - 0.321002, + (GLfloat) 1.067539, (GLfloat) 0.338617, (GLfloat) - 0.324103, + (GLfloat) 1.145175, (GLfloat) 0.366478, (GLfloat) - 0.308217, + (GLfloat) 1.186836, (GLfloat) 0.506919, (GLfloat) - 0.423287, + (GLfloat) 1.177908, (GLfloat) 0.476825, (GLfloat) - 0.359359, + (GLfloat) 0.979330, (GLfloat) 0.456830, (GLfloat) - 0.321002, + (GLfloat) 1.072171, (GLfloat) 0.456076, (GLfloat) - 0.324103, + (GLfloat) 1.389948, (GLfloat) 0.422275, (GLfloat) - 0.500000, + (GLfloat) 1.290676, (GLfloat) 0.462390, (GLfloat) - 0.579984, + (GLfloat) 1.290676, (GLfloat) 0.462390, (GLfloat) - 0.420016, + (GLfloat) 0.960081, (GLfloat) 0.534071, (GLfloat) - 0.423287, + (GLfloat) 1.075259, (GLfloat) 0.534381, (GLfloat) - 0.424615, + (GLfloat) 1.189812, (GLfloat) 0.516951, (GLfloat) - 0.500000, + (GLfloat) 0.960081, (GLfloat) 0.534071, (GLfloat) - 0.576713, + (GLfloat) 1.075259, (GLfloat) 0.534381, (GLfloat) - 0.575384, + (GLfloat) 0.808756, (GLfloat) 0.407522, (GLfloat) - 0.697124, + (GLfloat) 0.693423, (GLfloat) 0.349037, (GLfloat) - 0.720025, + (GLfloat) 0.741552, (GLfloat) 0.375033, (GLfloat) - 0.708812, + (GLfloat) 0.901933, (GLfloat) 0.290859, (GLfloat) - 0.697124, + (GLfloat) 0.855345, (GLfloat) 0.349190, (GLfloat) - 0.711204, + (GLfloat) 0.889770, (GLfloat) 0.437716, (GLfloat) - 0.686629, + (GLfloat) 0.746638, (GLfloat) 0.485298, (GLfloat) - 0.584482, + (GLfloat) 0.769932, (GLfloat) 0.456132, (GLfloat) - 0.654883, + (GLfloat) 0.964051, (GLfloat) 0.213083, (GLfloat) - 0.584482, + (GLfloat) 0.940757, (GLfloat) 0.242249, (GLfloat) - 0.654883, + (GLfloat) 0.952079, (GLfloat) 0.322122, (GLfloat) - 0.686629, + (GLfloat) 0.830643, (GLfloat) 0.226200, (GLfloat) - 0.720025, + (GLfloat) 0.860532, (GLfloat) 0.255958, (GLfloat) - 0.708812, + (GLfloat) 0.993766, (GLfloat) 0.398899, (GLfloat) - 0.691783, + (GLfloat) 1.020234, (GLfloat) 0.292692, (GLfloat) - 0.640641, + (GLfloat) 0.967299, (GLfloat) 0.505105, (GLfloat) - 0.640641, + (GLfloat) 0.848231, (GLfloat) 0.514780, (GLfloat) - 0.579984, + (GLfloat) 0.746638, (GLfloat) 0.485298, (GLfloat) - 0.415518, + (GLfloat) 0.738873, (GLfloat) 0.495020, (GLfloat) - 0.500000, + (GLfloat) 0.601944, (GLfloat) 0.430927, (GLfloat) - 0.594296, + (GLfloat) 0.662233, (GLfloat) 0.454417, (GLfloat) - 0.589491, + (GLfloat) 0.957675, (GLfloat) 0.543726, (GLfloat) - 0.500000, + (GLfloat) 0.967299, (GLfloat) 0.505105, (GLfloat) - 0.359359, + (GLfloat) 0.848231, (GLfloat) 0.514780, (GLfloat) - 0.420016, + (GLfloat) 0.601944, (GLfloat) 0.430927, (GLfloat) - 0.405704, + (GLfloat) 0.662233, (GLfloat) 0.454417, (GLfloat) - 0.410509, + (GLfloat) 0.808756, (GLfloat) 0.407522, (GLfloat) - 0.302876, + (GLfloat) 0.769932, (GLfloat) 0.456132, (GLfloat) - 0.345117, + (GLfloat) 0.889770, (GLfloat) 0.437716, (GLfloat) - 0.313371, + (GLfloat) 0.901933, (GLfloat) 0.290859, (GLfloat) - 0.302876, + (GLfloat) 0.855345, (GLfloat) 0.349190, (GLfloat) - 0.288796, + (GLfloat) 0.693423, (GLfloat) 0.349037, (GLfloat) - 0.279975, + (GLfloat) 0.741552, (GLfloat) 0.375033, (GLfloat) - 0.291188, + (GLfloat) 0.993766, (GLfloat) 0.398899, (GLfloat) - 0.308217, + (GLfloat) 1.020234, (GLfloat) 0.292692, (GLfloat) - 0.359359, + (GLfloat) 0.952079, (GLfloat) 0.322122, (GLfloat) - 0.313371, + (GLfloat) 0.830643, (GLfloat) 0.226200, (GLfloat) - 0.279975, + (GLfloat) 0.860532, (GLfloat) 0.255958, (GLfloat) - 0.291188, + (GLfloat) 0.964051, (GLfloat) 0.213083, (GLfloat) - 0.415518, + (GLfloat) 0.940757, (GLfloat) 0.242249, (GLfloat) - 0.345117, + (GLfloat) 0.993618, (GLfloat) 0.245059, (GLfloat) - 0.420016, + (GLfloat) 0.971816, (GLfloat) 0.203361, (GLfloat) - 0.500000, + (GLfloat) 0.922122, (GLfloat) 0.144310, (GLfloat) - 0.405704, + (GLfloat) 0.939852, (GLfloat) 0.176575, (GLfloat) - 0.410509, + (GLfloat) 1.029858, (GLfloat) 0.254072, (GLfloat) - 0.500000, + (GLfloat) 0.993618, (GLfloat) 0.245059, (GLfloat) - 0.579984, + (GLfloat) 0.922122, (GLfloat) 0.144310, (GLfloat) - 0.594296, + (GLfloat) 0.939852, (GLfloat) 0.176575, (GLfloat) - 0.589491, + (GLfloat) 0.933557, (GLfloat) 0.134073, (GLfloat) - 0.500000, + (GLfloat) 0.877985, (GLfloat) 0.117734, (GLfloat) - 0.412500, + (GLfloat) 0.903840, (GLfloat) 0.122594, (GLfloat) - 0.405051, + (GLfloat) 0.887817, (GLfloat) 0.175019, (GLfloat) - 0.327123, + (GLfloat) 0.887817, (GLfloat) 0.175019, (GLfloat) - 0.672877, + (GLfloat) 0.877985, (GLfloat) 0.117734, (GLfloat) - 0.587500, + (GLfloat) 0.903840, (GLfloat) 0.122594, (GLfloat) - 0.594949, + (GLfloat) 0.775446, (GLfloat) 0.175219, (GLfloat) - 0.590500, + (GLfloat) 0.837530, (GLfloat) 0.133890, (GLfloat) - 0.582500, + (GLfloat) 0.889078, (GLfloat) 0.106840, (GLfloat) - 0.500000, + (GLfloat) 0.787209, (GLfloat) 0.193905, (GLfloat) - 0.706000, + (GLfloat) 0.844199, (GLfloat) 0.147671, (GLfloat) - 0.660875, + (GLfloat) 0.787209, (GLfloat) 0.193905, (GLfloat) - 0.294000, + (GLfloat) 0.844199, (GLfloat) 0.147671, (GLfloat) - 0.339125, + (GLfloat) 0.775446, (GLfloat) 0.175219, (GLfloat) - 0.409500, + (GLfloat) 0.837530, (GLfloat) 0.133890, (GLfloat) - 0.417500, + (GLfloat) 0.762033, (GLfloat) 0.287619, (GLfloat) - 0.735741, + (GLfloat) 0.807717, (GLfloat) 0.204533, (GLfloat) - 0.722006, + (GLfloat) 0.636249, (GLfloat) 0.400218, (GLfloat) - 0.672877, + (GLfloat) 0.653151, (GLfloat) 0.306393, (GLfloat) - 0.706000, + (GLfloat) 0.664060, (GLfloat) 0.327000, (GLfloat) - 0.722006, + (GLfloat) 0.636792, (GLfloat) 0.291564, (GLfloat) - 0.590500, + (GLfloat) 0.648221, (GLfloat) 0.292739, (GLfloat) - 0.664625, + (GLfloat) 0.719399, (GLfloat) 0.249218, (GLfloat) - 0.721500, + (GLfloat) 0.562375, (GLfloat) 0.382563, (GLfloat) - 0.587500, + (GLfloat) 0.597724, (GLfloat) 0.354488, (GLfloat) - 0.660875, + (GLfloat) 0.774619, (GLfloat) 0.186679, (GLfloat) - 0.664625, + (GLfloat) 0.590509, (GLfloat) 0.441164, (GLfloat) - 0.500000, + (GLfloat) 0.567937, (GLfloat) 0.408940, (GLfloat) - 0.594949, + (GLfloat) 0.636249, (GLfloat) 0.400218, (GLfloat) - 0.327123, + (GLfloat) 0.562375, (GLfloat) 0.382563, (GLfloat) - 0.412500, + (GLfloat) 0.567937, (GLfloat) 0.408940, (GLfloat) - 0.405051, + (GLfloat) 0.636792, (GLfloat) 0.291564, (GLfloat) - 0.409500, + (GLfloat) 0.585310, (GLfloat) 0.345528, (GLfloat) - 0.417500, + (GLfloat) 0.549720, (GLfloat) 0.391595, (GLfloat) - 0.500000, + (GLfloat) 0.653151, (GLfloat) 0.306393, (GLfloat) - 0.294000, + (GLfloat) 0.597724, (GLfloat) 0.354488, (GLfloat) - 0.339125, + (GLfloat) 0.585310, (GLfloat) 0.345528, (GLfloat) - 0.582500, + (GLfloat) 0.762033, (GLfloat) 0.287619, (GLfloat) - 0.264259, + (GLfloat) 0.664060, (GLfloat) 0.327000, (GLfloat) - 0.277994, + (GLfloat) 0.807717, (GLfloat) 0.204533, (GLfloat) - 0.277994, + (GLfloat) 0.774619, (GLfloat) 0.186679, (GLfloat) - 0.335375, + (GLfloat) 0.719399, (GLfloat) 0.249218, (GLfloat) - 0.278500, + (GLfloat) 0.648221, (GLfloat) 0.292739, (GLfloat) - 0.335375, + (GLfloat) 0.704334, (GLfloat) 0.231264, (GLfloat) - 0.597750, + (GLfloat) 0.779215, (GLfloat) 0.168431, (GLfloat) - 0.500000, + (GLfloat) 0.629453, (GLfloat) 0.294096, (GLfloat) - 0.500000, + (GLfloat) 0.704334, (GLfloat) 0.231264, (GLfloat) - 0.402250, +}; + +static GLfloat s1_4_normals[] = +{ + (GLfloat) - 0.797489, (GLfloat) - 0.388285, (GLfloat) - 0.461786, + (GLfloat) - 0.806184, (GLfloat) - 0.357959, (GLfloat) - 0.471096, + (GLfloat) - 0.893364, (GLfloat) - 0.424111, (GLfloat) - 0.148429, + (GLfloat) - 0.889195, (GLfloat) - 0.434532, (GLfloat) - 0.143226, + (GLfloat) - 0.778943, (GLfloat) - 0.605569, (GLfloat) - 0.162894, + (GLfloat) - 0.772426, (GLfloat) - 0.614820, (GLfloat) - 0.159231, + (GLfloat) - 0.666558, (GLfloat) - 0.549876, (GLfloat) - 0.503327, + (GLfloat) - 0.677911, (GLfloat) - 0.530666, (GLfloat) - 0.508753, + (GLfloat) - 0.797489, (GLfloat) - 0.388284, (GLfloat) 0.461786, + (GLfloat) - 0.806184, (GLfloat) - 0.357959, (GLfloat) 0.471097, + (GLfloat) - 0.677911, (GLfloat) - 0.530666, (GLfloat) 0.508753, + (GLfloat) - 0.666558, (GLfloat) - 0.549876, (GLfloat) 0.503327, + (GLfloat) - 0.778943, (GLfloat) - 0.605569, (GLfloat) 0.162893, + (GLfloat) - 0.772426, (GLfloat) - 0.614820, (GLfloat) 0.159231, + (GLfloat) - 0.889195, (GLfloat) - 0.434532, (GLfloat) 0.143226, + (GLfloat) - 0.893364, (GLfloat) - 0.424111, (GLfloat) 0.148429, + (GLfloat) 0.506235, (GLfloat) - 0.837464, (GLfloat) 0.205866, + (GLfloat) 0.527758, (GLfloat) - 0.830515, (GLfloat) 0.178091, + (GLfloat) 0.492576, (GLfloat) - 0.867532, (GLfloat) 0.068965, + (GLfloat) 0.502441, (GLfloat) - 0.861510, (GLfloat) 0.073162, + (GLfloat) - 0.106119, (GLfloat) - 0.984780, (GLfloat) 0.137644, + (GLfloat) - 0.145376, (GLfloat) - 0.977399, (GLfloat) 0.153482, + (GLfloat) 0.021131, (GLfloat) - 0.914284, (GLfloat) 0.404523, + (GLfloat) - 0.012401, (GLfloat) - 0.903702, (GLfloat) 0.427982, + (GLfloat) 0.527757, (GLfloat) - 0.830515, (GLfloat) - 0.178092, + (GLfloat) 0.506235, (GLfloat) - 0.837464, (GLfloat) - 0.205866, + (GLfloat) 0.021132, (GLfloat) - 0.914284, (GLfloat) - 0.404523, + (GLfloat) - 0.012401, (GLfloat) - 0.903702, (GLfloat) - 0.427983, + (GLfloat) - 0.145376, (GLfloat) - 0.977399, (GLfloat) - 0.153482, + (GLfloat) - 0.106119, (GLfloat) - 0.984780, (GLfloat) - 0.137645, + (GLfloat) 0.502441, (GLfloat) - 0.861510, (GLfloat) - 0.073162, + (GLfloat) 0.492576, (GLfloat) - 0.867532, (GLfloat) - 0.068965, + (GLfloat) - 0.548436, (GLfloat) - 0.209256, (GLfloat) 0.809586, + (GLfloat) - 0.557133, (GLfloat) - 0.173326, (GLfloat) 0.812134, + (GLfloat) - 0.281454, (GLfloat) 0.011196, (GLfloat) 0.959509, + (GLfloat) - 0.287811, (GLfloat) 0.033884, (GLfloat) 0.957087, + (GLfloat) - 0.161493, (GLfloat) - 0.079455, (GLfloat) 0.983670, + (GLfloat) - 0.160469, (GLfloat) - 0.081504, (GLfloat) 0.983670, + (GLfloat) - 0.417652, (GLfloat) - 0.317957, (GLfloat) 0.851158, + (GLfloat) - 0.412553, (GLfloat) - 0.327906, (GLfloat) 0.849869, + (GLfloat) 0.183686, (GLfloat) 0.514678, (GLfloat) 0.837476, + (GLfloat) 0.191133, (GLfloat) 0.514047, (GLfloat) 0.836196, + (GLfloat) 0.305019, (GLfloat) 0.420960, (GLfloat) 0.854258, + (GLfloat) 0.309443, (GLfloat) 0.419398, (GLfloat) 0.853434, + (GLfloat) 0.070662, (GLfloat) 0.160554, (GLfloat) 0.984494, + (GLfloat) 0.072116, (GLfloat) 0.157712, (GLfloat) 0.984848, + (GLfloat) - 0.043552, (GLfloat) 0.248570, (GLfloat) 0.967634, + (GLfloat) - 0.045553, (GLfloat) 0.254642, (GLfloat) 0.965962, + (GLfloat) 0.833765, (GLfloat) - 0.473703, (GLfloat) 0.283620, + (GLfloat) 0.823611, (GLfloat) - 0.501937, (GLfloat) 0.264054, + (GLfloat) 0.753164, (GLfloat) - 0.577527, (GLfloat) 0.314971, + (GLfloat) 0.750976, (GLfloat) - 0.585768, (GLfloat) 0.304813, + (GLfloat) 0.524744, (GLfloat) - 0.282162, (GLfloat) 0.803137, + (GLfloat) 0.515479, (GLfloat) - 0.259037, (GLfloat) 0.816812, + (GLfloat) 0.731077, (GLfloat) - 0.100383, (GLfloat) 0.674870, + (GLfloat) 0.725771, (GLfloat) - 0.074391, (GLfloat) 0.683903, + (GLfloat) 0.576854, (GLfloat) - 0.777370, (GLfloat) 0.250869, + (GLfloat) 0.569572, (GLfloat) - 0.770539, (GLfloat) 0.286108, + (GLfloat) 0.204307, (GLfloat) - 0.721596, (GLfloat) 0.661481, + (GLfloat) 0.158422, (GLfloat) - 0.717392, (GLfloat) 0.678418, + (GLfloat) 0.308874, (GLfloat) - 0.483661, (GLfloat) 0.818944, + (GLfloat) 0.351163, (GLfloat) - 0.495655, (GLfloat) 0.794362, + (GLfloat) 0.653090, (GLfloat) - 0.688670, (GLfloat) 0.314971, + (GLfloat) 0.661058, (GLfloat) - 0.685633, (GLfloat) 0.304812, + (GLfloat) 0.403257, (GLfloat) 0.770775, (GLfloat) 0.493244, + (GLfloat) 0.393266, (GLfloat) 0.772882, (GLfloat) 0.497991, + (GLfloat) 0.471763, (GLfloat) 0.867363, (GLfloat) 0.158497, + (GLfloat) 0.475196, (GLfloat) 0.865916, (GLfloat) 0.156134, + (GLfloat) 0.590364, (GLfloat) 0.790041, (GLfloat) 0.165246, + (GLfloat) 0.597402, (GLfloat) 0.785461, (GLfloat) 0.161746, + (GLfloat) 0.528711, (GLfloat) 0.679696, (GLfloat) 0.508407, + (GLfloat) 0.514728, (GLfloat) 0.686399, (GLfloat) 0.513723, + (GLfloat) 0.403257, (GLfloat) 0.770775, (GLfloat) - 0.493244, + (GLfloat) 0.393266, (GLfloat) 0.772882, (GLfloat) - 0.497991, + (GLfloat) 0.514728, (GLfloat) 0.686399, (GLfloat) - 0.513723, + (GLfloat) 0.528711, (GLfloat) 0.679696, (GLfloat) - 0.508407, + (GLfloat) 0.590364, (GLfloat) 0.790041, (GLfloat) - 0.165246, + (GLfloat) 0.597402, (GLfloat) 0.785461, (GLfloat) - 0.161746, + (GLfloat) 0.475196, (GLfloat) 0.865916, (GLfloat) - 0.156134, + (GLfloat) 0.471763, (GLfloat) 0.867363, (GLfloat) - 0.158497, + (GLfloat) 0.885792, (GLfloat) - 0.415923, (GLfloat) - 0.205866, + (GLfloat) 0.881131, (GLfloat) - 0.438054, (GLfloat) - 0.178091, + (GLfloat) 0.914268, (GLfloat) - 0.399196, (GLfloat) - 0.068966, + (GLfloat) 0.909310, (GLfloat) - 0.409637, (GLfloat) - 0.073163, + (GLfloat) 0.961663, (GLfloat) 0.236259, (GLfloat) - 0.139234, + (GLfloat) 0.949193, (GLfloat) 0.273441, (GLfloat) - 0.155762, + (GLfloat) 0.901801, (GLfloat) 0.090517, (GLfloat) - 0.422565, + (GLfloat) 0.894672, (GLfloat) 0.141897, (GLfloat) - 0.423589, + (GLfloat) 0.881131, (GLfloat) - 0.438054, (GLfloat) 0.178091, + (GLfloat) 0.885792, (GLfloat) - 0.415923, (GLfloat) 0.205866, + (GLfloat) 0.894672, (GLfloat) 0.141897, (GLfloat) 0.423589, + (GLfloat) 0.901801, (GLfloat) 0.090518, (GLfloat) 0.422565, + (GLfloat) 0.949193, (GLfloat) 0.273441, (GLfloat) 0.155762, + (GLfloat) 0.961663, (GLfloat) 0.236259, (GLfloat) 0.139234, + (GLfloat) 0.909310, (GLfloat) - 0.409637, (GLfloat) 0.073163, + (GLfloat) 0.914268, (GLfloat) - 0.399196, (GLfloat) 0.068966, + (GLfloat) 0.191133, (GLfloat) 0.514047, (GLfloat) - 0.836196, + (GLfloat) 0.183686, (GLfloat) 0.514678, (GLfloat) - 0.837476, + (GLfloat) - 0.045553, (GLfloat) 0.254642, (GLfloat) - 0.965962, + (GLfloat) - 0.043552, (GLfloat) 0.248570, (GLfloat) - 0.967634, + (GLfloat) 0.070662, (GLfloat) 0.160554, (GLfloat) - 0.984494, + (GLfloat) 0.072116, (GLfloat) 0.157712, (GLfloat) - 0.984848, + (GLfloat) 0.305019, (GLfloat) 0.420960, (GLfloat) - 0.854258, + (GLfloat) 0.309443, (GLfloat) 0.419398, (GLfloat) - 0.853434, + (GLfloat) - 0.557133, (GLfloat) - 0.173326, (GLfloat) - 0.812134, + (GLfloat) - 0.548436, (GLfloat) - 0.209256, (GLfloat) - 0.809586, + (GLfloat) - 0.417652, (GLfloat) - 0.317957, (GLfloat) - 0.851158, + (GLfloat) - 0.412553, (GLfloat) - 0.327906, (GLfloat) - 0.849869, + (GLfloat) - 0.160469, (GLfloat) - 0.081504, (GLfloat) - 0.983670, + (GLfloat) - 0.161493, (GLfloat) - 0.079455, (GLfloat) - 0.983670, + (GLfloat) - 0.281454, (GLfloat) 0.011196, (GLfloat) - 0.959509, + (GLfloat) - 0.287811, (GLfloat) 0.033884, (GLfloat) - 0.957088, + (GLfloat) 0.576854, (GLfloat) - 0.777370, (GLfloat) - 0.250869, + (GLfloat) 0.569572, (GLfloat) - 0.770539, (GLfloat) - 0.286108, + (GLfloat) 0.653090, (GLfloat) - 0.688670, (GLfloat) - 0.314971, + (GLfloat) 0.661058, (GLfloat) - 0.685633, (GLfloat) - 0.304812, + (GLfloat) 0.351164, (GLfloat) - 0.495655, (GLfloat) - 0.794362, + (GLfloat) 0.308874, (GLfloat) - 0.483661, (GLfloat) - 0.818944, + (GLfloat) 0.204308, (GLfloat) - 0.721597, (GLfloat) - 0.661480, + (GLfloat) 0.158422, (GLfloat) - 0.717393, (GLfloat) - 0.678418, + (GLfloat) 0.823611, (GLfloat) - 0.501936, (GLfloat) - 0.264055, + (GLfloat) 0.833765, (GLfloat) - 0.473703, (GLfloat) - 0.283621, + (GLfloat) 0.731077, (GLfloat) - 0.100384, (GLfloat) - 0.674869, + (GLfloat) 0.725771, (GLfloat) - 0.074392, (GLfloat) - 0.683902, + (GLfloat) 0.515479, (GLfloat) - 0.259037, (GLfloat) - 0.816812, + (GLfloat) 0.524744, (GLfloat) - 0.282163, (GLfloat) - 0.803136, + (GLfloat) 0.753164, (GLfloat) - 0.577527, (GLfloat) - 0.314971, + (GLfloat) 0.750976, (GLfloat) - 0.585768, (GLfloat) - 0.304813, + (GLfloat) 0.639601, (GLfloat) - 0.758638, (GLfloat) 0.124011, + (GLfloat) 0.647491, (GLfloat) - 0.749875, (GLfloat) 0.135802, + (GLfloat) 0.708617, (GLfloat) - 0.697026, (GLfloat) 0.109621, + (GLfloat) 0.711116, (GLfloat) - 0.693654, (GLfloat) 0.114709, + (GLfloat) 0.722217, (GLfloat) - 0.690875, (GLfloat) 0.033080, + (GLfloat) 0.720265, (GLfloat) - 0.693043, (GLfloat) 0.030163, + (GLfloat) 0.664597, (GLfloat) - 0.745915, (GLfloat) 0.043834, + (GLfloat) 0.660896, (GLfloat) - 0.749429, (GLfloat) 0.039656, + (GLfloat) 0.813450, (GLfloat) - 0.565559, (GLfloat) 0.135803, + (GLfloat) 0.821340, (GLfloat) - 0.556796, (GLfloat) 0.124011, + (GLfloat) 0.811298, (GLfloat) - 0.582987, (GLfloat) 0.043835, + (GLfloat) 0.814407, (GLfloat) - 0.578938, (GLfloat) 0.039656, + (GLfloat) 0.764534, (GLfloat) - 0.643877, (GLfloat) 0.030163, + (GLfloat) 0.762583, (GLfloat) - 0.646044, (GLfloat) 0.033079, + (GLfloat) 0.767278, (GLfloat) - 0.631876, (GLfloat) 0.109621, + (GLfloat) 0.764186, (GLfloat) - 0.634714, (GLfloat) 0.114709, + (GLfloat) 0.821340, (GLfloat) - 0.556796, (GLfloat) - 0.124011, + (GLfloat) 0.813450, (GLfloat) - 0.565559, (GLfloat) - 0.135803, + (GLfloat) 0.767278, (GLfloat) - 0.631876, (GLfloat) - 0.109621, + (GLfloat) 0.764186, (GLfloat) - 0.634714, (GLfloat) - 0.114709, + (GLfloat) 0.762583, (GLfloat) - 0.646044, (GLfloat) - 0.033079, + (GLfloat) 0.764534, (GLfloat) - 0.643877, (GLfloat) - 0.030163, + (GLfloat) 0.811298, (GLfloat) - 0.582987, (GLfloat) - 0.043835, + (GLfloat) 0.814407, (GLfloat) - 0.578938, (GLfloat) - 0.039656, + (GLfloat) 0.647491, (GLfloat) - 0.749875, (GLfloat) - 0.135802, + (GLfloat) 0.639601, (GLfloat) - 0.758638, (GLfloat) - 0.124011, + (GLfloat) 0.664597, (GLfloat) - 0.745915, (GLfloat) - 0.043834, + (GLfloat) 0.660896, (GLfloat) - 0.749429, (GLfloat) - 0.039656, + (GLfloat) 0.720265, (GLfloat) - 0.693043, (GLfloat) - 0.030163, + (GLfloat) 0.722217, (GLfloat) - 0.690875, (GLfloat) - 0.033080, + (GLfloat) 0.708617, (GLfloat) - 0.697026, (GLfloat) - 0.109621, + (GLfloat) 0.711116, (GLfloat) - 0.693654, (GLfloat) - 0.114709, + (GLfloat) - 0.795834, (GLfloat) - 0.416890, (GLfloat) - 0.439148, + (GLfloat) - 0.804928, (GLfloat) - 0.376107, (GLfloat) - 0.458949, + (GLfloat) - 0.777496, (GLfloat) - 0.478056, (GLfloat) - 0.408610, + (GLfloat) - 0.791178, (GLfloat) - 0.423850, (GLfloat) - 0.440894, + (GLfloat) - 0.871703, (GLfloat) - 0.470947, (GLfloat) - 0.135440, + (GLfloat) - 0.863971, (GLfloat) - 0.488878, (GLfloat) - 0.120637, + (GLfloat) - 0.890766, (GLfloat) - 0.431382, (GLfloat) - 0.142987, + (GLfloat) - 0.885536, (GLfloat) - 0.445027, (GLfloat) - 0.133330, + (GLfloat) - 0.626883, (GLfloat) - 0.701314, (GLfloat) - 0.339376, + (GLfloat) - 0.543140, (GLfloat) - 0.727904, (GLfloat) - 0.418515, + (GLfloat) - 0.684101, (GLfloat) - 0.722860, (GLfloat) - 0.097361, + (GLfloat) - 0.656897, (GLfloat) - 0.743919, (GLfloat) - 0.122761, + (GLfloat) - 0.823965, (GLfloat) - 0.552405, (GLfloat) - 0.126218, + (GLfloat) - 0.810821, (GLfloat) - 0.575485, (GLfloat) - 0.106707, + (GLfloat) - 0.722436, (GLfloat) - 0.581233, (GLfloat) - 0.374506, + (GLfloat) - 0.749781, (GLfloat) - 0.512777, (GLfloat) - 0.418197, + (GLfloat) - 0.543140, (GLfloat) - 0.727904, (GLfloat) 0.418515, + (GLfloat) - 0.626883, (GLfloat) - 0.701314, (GLfloat) 0.339376, + (GLfloat) - 0.749781, (GLfloat) - 0.512777, (GLfloat) 0.418197, + (GLfloat) - 0.722436, (GLfloat) - 0.581233, (GLfloat) 0.374506, + (GLfloat) - 0.823965, (GLfloat) - 0.552405, (GLfloat) 0.126218, + (GLfloat) - 0.810821, (GLfloat) - 0.575485, (GLfloat) 0.106707, + (GLfloat) - 0.684101, (GLfloat) - 0.722860, (GLfloat) 0.097361, + (GLfloat) - 0.656897, (GLfloat) - 0.743919, (GLfloat) 0.122761, + (GLfloat) - 0.804928, (GLfloat) - 0.376106, (GLfloat) 0.458949, + (GLfloat) - 0.795834, (GLfloat) - 0.416890, (GLfloat) 0.439148, + (GLfloat) - 0.890766, (GLfloat) - 0.431382, (GLfloat) 0.142986, + (GLfloat) - 0.885536, (GLfloat) - 0.445027, (GLfloat) 0.133330, + (GLfloat) - 0.863971, (GLfloat) - 0.488878, (GLfloat) 0.120637, + (GLfloat) - 0.871703, (GLfloat) - 0.470947, (GLfloat) 0.135440, + (GLfloat) - 0.777496, (GLfloat) - 0.478056, (GLfloat) 0.408610, + (GLfloat) - 0.791178, (GLfloat) - 0.423850, (GLfloat) 0.440894, + (GLfloat) 0.229002, (GLfloat) 0.499702, (GLfloat) - 0.835378, + (GLfloat) 0.231853, (GLfloat) 0.486589, (GLfloat) - 0.842304, + (GLfloat) 0.233876, (GLfloat) 0.516110, (GLfloat) - 0.823973, + (GLfloat) 0.237238, (GLfloat) 0.494666, (GLfloat) - 0.836076, + (GLfloat) 0.010383, (GLfloat) 0.206054, (GLfloat) - 0.978486, + (GLfloat) 0.010515, (GLfloat) 0.204402, (GLfloat) - 0.978831, + (GLfloat) - 0.008079, (GLfloat) 0.222043, (GLfloat) - 0.975003, + (GLfloat) - 0.007459, (GLfloat) 0.217610, (GLfloat) - 0.976007, + (GLfloat) 0.144536, (GLfloat) 0.600180, (GLfloat) - 0.786698, + (GLfloat) 0.157013, (GLfloat) 0.570113, (GLfloat) - 0.806423, + (GLfloat) 0.037521, (GLfloat) 0.196979, (GLfloat) - 0.979689, + (GLfloat) 0.033902, (GLfloat) 0.207800, (GLfloat) - 0.977584, + (GLfloat) 0.024105, (GLfloat) 0.197695, (GLfloat) - 0.979967, + (GLfloat) 0.023654, (GLfloat) 0.201010, (GLfloat) - 0.979303, + (GLfloat) 0.210423, (GLfloat) 0.553707, (GLfloat) - 0.805687, + (GLfloat) 0.216765, (GLfloat) 0.524423, (GLfloat) - 0.823404, + (GLfloat) - 0.387850, (GLfloat) - 0.484551, (GLfloat) - 0.784081, + (GLfloat) - 0.344102, (GLfloat) - 0.564354, (GLfloat) - 0.750399, + (GLfloat) - 0.507279, (GLfloat) - 0.348613, (GLfloat) - 0.788123, + (GLfloat) - 0.488679, (GLfloat) - 0.433878, (GLfloat) - 0.756930, + (GLfloat) - 0.209869, (GLfloat) - 0.143196, (GLfloat) - 0.967187, + (GLfloat) - 0.216489, (GLfloat) - 0.097461, (GLfloat) - 0.971408, + (GLfloat) - 0.125932, (GLfloat) - 0.202782, (GLfloat) - 0.971092, + (GLfloat) - 0.140256, (GLfloat) - 0.165750, (GLfloat) - 0.976143, + (GLfloat) - 0.549569, (GLfloat) - 0.208003, (GLfloat) - 0.809141, + (GLfloat) - 0.543770, (GLfloat) - 0.257592, (GLfloat) - 0.798724, + (GLfloat) - 0.260213, (GLfloat) - 0.033756, (GLfloat) - 0.964961, + (GLfloat) - 0.263665, (GLfloat) - 0.004051, (GLfloat) - 0.964606, + (GLfloat) - 0.243217, (GLfloat) - 0.082726, (GLfloat) - 0.966438, + (GLfloat) - 0.245939, (GLfloat) - 0.044154, (GLfloat) - 0.968279, + (GLfloat) - 0.539327, (GLfloat) - 0.261873, (GLfloat) - 0.800343, + (GLfloat) - 0.532344, (GLfloat) - 0.329385, (GLfloat) - 0.779818, + (GLfloat) 0.231853, (GLfloat) 0.486589, (GLfloat) 0.842304, + (GLfloat) 0.229002, (GLfloat) 0.499702, (GLfloat) 0.835378, + (GLfloat) - 0.008079, (GLfloat) 0.222044, (GLfloat) 0.975003, + (GLfloat) - 0.007460, (GLfloat) 0.217609, (GLfloat) 0.976008, + (GLfloat) 0.010515, (GLfloat) 0.204402, (GLfloat) 0.978830, + (GLfloat) 0.010383, (GLfloat) 0.206054, (GLfloat) 0.978486, + (GLfloat) 0.233876, (GLfloat) 0.516110, (GLfloat) 0.823973, + (GLfloat) 0.237238, (GLfloat) 0.494666, (GLfloat) 0.836076, + (GLfloat) - 0.549569, (GLfloat) - 0.208003, (GLfloat) 0.809141, + (GLfloat) - 0.543770, (GLfloat) - 0.257592, (GLfloat) 0.798724, + (GLfloat) - 0.532344, (GLfloat) - 0.329384, (GLfloat) 0.779818, + (GLfloat) - 0.539327, (GLfloat) - 0.261873, (GLfloat) 0.800343, + (GLfloat) - 0.243217, (GLfloat) - 0.082726, (GLfloat) 0.966438, + (GLfloat) - 0.245939, (GLfloat) - 0.044154, (GLfloat) 0.968279, + (GLfloat) - 0.263665, (GLfloat) - 0.004051, (GLfloat) 0.964606, + (GLfloat) - 0.260214, (GLfloat) - 0.033755, (GLfloat) 0.964961, + (GLfloat) - 0.344101, (GLfloat) - 0.564354, (GLfloat) 0.750399, + (GLfloat) - 0.387850, (GLfloat) - 0.484551, (GLfloat) 0.784081, + (GLfloat) - 0.125932, (GLfloat) - 0.202782, (GLfloat) 0.971093, + (GLfloat) - 0.140255, (GLfloat) - 0.165749, (GLfloat) 0.976143, + (GLfloat) - 0.216489, (GLfloat) - 0.097462, (GLfloat) 0.971408, + (GLfloat) - 0.209869, (GLfloat) - 0.143196, (GLfloat) 0.967187, + (GLfloat) - 0.507278, (GLfloat) - 0.348612, (GLfloat) 0.788123, + (GLfloat) - 0.488678, (GLfloat) - 0.433878, (GLfloat) 0.756930, + (GLfloat) 0.144536, (GLfloat) 0.600181, (GLfloat) 0.786697, + (GLfloat) 0.157013, (GLfloat) 0.570113, (GLfloat) 0.806423, + (GLfloat) 0.216765, (GLfloat) 0.524422, (GLfloat) 0.823404, + (GLfloat) 0.210423, (GLfloat) 0.553707, (GLfloat) 0.805687, + (GLfloat) 0.024105, (GLfloat) 0.197695, (GLfloat) 0.979967, + (GLfloat) 0.023654, (GLfloat) 0.201010, (GLfloat) 0.979304, + (GLfloat) 0.033902, (GLfloat) 0.207800, (GLfloat) 0.977584, + (GLfloat) 0.037522, (GLfloat) 0.196978, (GLfloat) 0.979690, + (GLfloat) 0.429831, (GLfloat) 0.754772, (GLfloat) - 0.495545, + (GLfloat) 0.445178, (GLfloat) 0.753116, (GLfloat) - 0.484389, + (GLfloat) 0.504382, (GLfloat) 0.849100, (GLfloat) - 0.156932, + (GLfloat) 0.509098, (GLfloat) 0.847167, (GLfloat) - 0.152075, + (GLfloat) 0.473721, (GLfloat) 0.868820, (GLfloat) - 0.144012, + (GLfloat) 0.467781, (GLfloat) 0.870761, (GLfloat) - 0.151512, + (GLfloat) 0.426275, (GLfloat) 0.776501, (GLfloat) - 0.464043, + (GLfloat) 0.405841, (GLfloat) 0.776082, (GLfloat) - 0.482690, + (GLfloat) 0.445178, (GLfloat) 0.753116, (GLfloat) 0.484389, + (GLfloat) 0.429830, (GLfloat) 0.754772, (GLfloat) 0.495545, + (GLfloat) 0.426275, (GLfloat) 0.776501, (GLfloat) 0.464043, + (GLfloat) 0.405841, (GLfloat) 0.776082, (GLfloat) 0.482690, + (GLfloat) 0.467781, (GLfloat) 0.870761, (GLfloat) 0.151512, + (GLfloat) 0.473721, (GLfloat) 0.868820, (GLfloat) 0.144012, + (GLfloat) 0.504382, (GLfloat) 0.849100, (GLfloat) 0.156932, + (GLfloat) 0.509098, (GLfloat) 0.847167, (GLfloat) 0.152075, + (GLfloat) 0.229278, (GLfloat) 0.880155, (GLfloat) 0.415643, + (GLfloat) 0.209637, (GLfloat) 0.873049, (GLfloat) 0.440270, + (GLfloat) 0.229791, (GLfloat) 0.963838, (GLfloat) 0.134951, + (GLfloat) 0.235661, (GLfloat) 0.963590, (GLfloat) 0.126323, + (GLfloat) 0.380317, (GLfloat) 0.913635, (GLfloat) 0.143628, + (GLfloat) 0.386968, (GLfloat) 0.912260, (GLfloat) 0.134303, + (GLfloat) 0.360099, (GLfloat) 0.823680, (GLfloat) 0.438041, + (GLfloat) 0.336980, (GLfloat) 0.819830, (GLfloat) 0.462950, + (GLfloat) 0.229278, (GLfloat) 0.880155, (GLfloat) - 0.415643, + (GLfloat) 0.209637, (GLfloat) 0.873049, (GLfloat) - 0.440270, + (GLfloat) 0.336980, (GLfloat) 0.819830, (GLfloat) - 0.462951, + (GLfloat) 0.360099, (GLfloat) 0.823680, (GLfloat) - 0.438041, + (GLfloat) 0.380318, (GLfloat) 0.913635, (GLfloat) - 0.143628, + (GLfloat) 0.386968, (GLfloat) 0.912260, (GLfloat) - 0.134303, + (GLfloat) 0.235661, (GLfloat) 0.963590, (GLfloat) - 0.126323, + (GLfloat) 0.229791, (GLfloat) 0.963838, (GLfloat) - 0.134951, + (GLfloat) - 0.140641, (GLfloat) 0.581880, (GLfloat) - 0.801022, + (GLfloat) - 0.142183, (GLfloat) 0.582121, (GLfloat) - 0.800574, + (GLfloat) 0.051917, (GLfloat) 0.273318, (GLfloat) - 0.960522, + (GLfloat) 0.034217, (GLfloat) 0.274901, (GLfloat) - 0.960864, + (GLfloat) 0.048940, (GLfloat) 0.249448, (GLfloat) - 0.967151, + (GLfloat) 0.029460, (GLfloat) 0.256714, (GLfloat) - 0.966038, + (GLfloat) - 0.118911, (GLfloat) 0.595461, (GLfloat) - 0.794536, + (GLfloat) - 0.119035, (GLfloat) 0.595511, (GLfloat) - 0.794479, + (GLfloat) 0.515773, (GLfloat) - 0.229138, (GLfloat) - 0.825515, + (GLfloat) 0.492630, (GLfloat) - 0.312368, (GLfloat) - 0.812245, + (GLfloat) 0.432249, (GLfloat) - 0.426645, (GLfloat) - 0.794440, + (GLfloat) 0.467347, (GLfloat) - 0.336981, (GLfloat) - 0.817332, + (GLfloat) 0.202207, (GLfloat) - 0.074217, (GLfloat) - 0.976526, + (GLfloat) 0.254570, (GLfloat) - 0.084963, (GLfloat) - 0.963315, + (GLfloat) 0.231800, (GLfloat) - 0.012060, (GLfloat) - 0.972689, + (GLfloat) 0.278802, (GLfloat) - 0.009127, (GLfloat) - 0.960305, + (GLfloat) 0.001969, (GLfloat) - 0.610219, (GLfloat) - 0.792230, + (GLfloat) 0.016464, (GLfloat) - 0.619478, (GLfloat) - 0.784841, + (GLfloat) 0.038477, (GLfloat) - 0.206205, (GLfloat) - 0.977752, + (GLfloat) 0.042684, (GLfloat) - 0.210618, (GLfloat) - 0.976636, + (GLfloat) 0.147830, (GLfloat) - 0.145929, (GLfloat) - 0.978188, + (GLfloat) 0.187657, (GLfloat) - 0.166867, (GLfloat) - 0.967957, + (GLfloat) 0.332157, (GLfloat) - 0.490109, (GLfloat) - 0.805894, + (GLfloat) 0.291047, (GLfloat) - 0.549638, (GLfloat) - 0.783064, + (GLfloat) 0.018324, (GLfloat) 0.624772, (GLfloat) - 0.780593, + (GLfloat) 0.031411, (GLfloat) 0.609093, (GLfloat) - 0.792477, + (GLfloat) - 0.068754, (GLfloat) 0.615108, (GLfloat) - 0.785439, + (GLfloat) - 0.063190, (GLfloat) 0.611137, (GLfloat) - 0.788999, + (GLfloat) 0.050001, (GLfloat) 0.227113, (GLfloat) - 0.972584, + (GLfloat) 0.031314, (GLfloat) 0.240630, (GLfloat) - 0.970112, + (GLfloat) 0.046887, (GLfloat) 0.207201, (GLfloat) - 0.977174, + (GLfloat) 0.034344, (GLfloat) 0.223544, (GLfloat) - 0.974089, + (GLfloat) - 0.289358, (GLfloat) 0.846699, (GLfloat) - 0.446512, + (GLfloat) - 0.282981, (GLfloat) 0.846581, (GLfloat) - 0.450803, + (GLfloat) - 0.237609, (GLfloat) 0.869708, (GLfloat) - 0.432607, + (GLfloat) - 0.232787, (GLfloat) 0.868834, (GLfloat) - 0.436964, + (GLfloat) - 0.269102, (GLfloat) 0.953677, (GLfloat) - 0.134480, + (GLfloat) - 0.270832, (GLfloat) 0.953476, (GLfloat) - 0.132414, + (GLfloat) - 0.330792, (GLfloat) 0.933242, (GLfloat) - 0.140129, + (GLfloat) - 0.333075, (GLfloat) 0.932754, (GLfloat) - 0.137953, + (GLfloat) 0.010415, (GLfloat) 0.905793, (GLfloat) - 0.423593, + (GLfloat) 0.002305, (GLfloat) 0.910958, (GLfloat) - 0.412492, + (GLfloat) - 0.003726, (GLfloat) 0.991671, (GLfloat) - 0.128743, + (GLfloat) - 0.001231, (GLfloat) 0.992167, (GLfloat) - 0.124913, + (GLfloat) - 0.164759, (GLfloat) 0.977931, (GLfloat) - 0.128473, + (GLfloat) - 0.164919, (GLfloat) 0.977933, (GLfloat) - 0.128255, + (GLfloat) - 0.141914, (GLfloat) 0.895522, (GLfloat) - 0.421783, + (GLfloat) - 0.142144, (GLfloat) 0.895607, (GLfloat) - 0.421525, + (GLfloat) 0.010415, (GLfloat) 0.905793, (GLfloat) 0.423593, + (GLfloat) 0.002305, (GLfloat) 0.910958, (GLfloat) 0.412492, + (GLfloat) - 0.142144, (GLfloat) 0.895607, (GLfloat) 0.421525, + (GLfloat) - 0.141914, (GLfloat) 0.895522, (GLfloat) 0.421783, + (GLfloat) - 0.164759, (GLfloat) 0.977931, (GLfloat) 0.128473, + (GLfloat) - 0.164919, (GLfloat) 0.977933, (GLfloat) 0.128255, + (GLfloat) - 0.003726, (GLfloat) 0.991671, (GLfloat) 0.128743, + (GLfloat) - 0.001231, (GLfloat) 0.992167, (GLfloat) 0.124913, + (GLfloat) - 0.282980, (GLfloat) 0.846581, (GLfloat) 0.450803, + (GLfloat) - 0.289358, (GLfloat) 0.846699, (GLfloat) 0.446512, + (GLfloat) - 0.330792, (GLfloat) 0.933242, (GLfloat) 0.140129, + (GLfloat) - 0.333075, (GLfloat) 0.932754, (GLfloat) 0.137953, + (GLfloat) - 0.270832, (GLfloat) 0.953476, (GLfloat) 0.132414, + (GLfloat) - 0.269102, (GLfloat) 0.953677, (GLfloat) 0.134480, + (GLfloat) - 0.237609, (GLfloat) 0.869708, (GLfloat) 0.432607, + (GLfloat) - 0.232787, (GLfloat) 0.868834, (GLfloat) 0.436964, + (GLfloat) - 0.140641, (GLfloat) 0.581880, (GLfloat) 0.801022, + (GLfloat) - 0.142183, (GLfloat) 0.582121, (GLfloat) 0.800574, + (GLfloat) - 0.119034, (GLfloat) 0.595511, (GLfloat) 0.794479, + (GLfloat) - 0.118911, (GLfloat) 0.595461, (GLfloat) 0.794536, + (GLfloat) 0.048939, (GLfloat) 0.249448, (GLfloat) 0.967151, + (GLfloat) 0.029461, (GLfloat) 0.256714, (GLfloat) 0.966038, + (GLfloat) 0.034217, (GLfloat) 0.274901, (GLfloat) 0.960863, + (GLfloat) 0.051918, (GLfloat) 0.273319, (GLfloat) 0.960521, + (GLfloat) 0.031411, (GLfloat) 0.609093, (GLfloat) 0.792477, + (GLfloat) 0.018324, (GLfloat) 0.624772, (GLfloat) 0.780593, + (GLfloat) 0.046887, (GLfloat) 0.207200, (GLfloat) 0.977174, + (GLfloat) 0.034344, (GLfloat) 0.223543, (GLfloat) 0.974089, + (GLfloat) 0.031314, (GLfloat) 0.240631, (GLfloat) 0.970111, + (GLfloat) 0.050002, (GLfloat) 0.227113, (GLfloat) 0.972584, + (GLfloat) - 0.068754, (GLfloat) 0.615108, (GLfloat) 0.785440, + (GLfloat) - 0.063191, (GLfloat) 0.611137, (GLfloat) 0.788999, + (GLfloat) 0.001969, (GLfloat) - 0.610219, (GLfloat) 0.792230, + (GLfloat) 0.016464, (GLfloat) - 0.619478, (GLfloat) 0.784841, + (GLfloat) 0.332157, (GLfloat) - 0.490109, (GLfloat) 0.805894, + (GLfloat) 0.291047, (GLfloat) - 0.549638, (GLfloat) 0.783064, + (GLfloat) 0.147831, (GLfloat) - 0.145929, (GLfloat) 0.978188, + (GLfloat) 0.187656, (GLfloat) - 0.166866, (GLfloat) 0.967957, + (GLfloat) 0.042684, (GLfloat) - 0.210618, (GLfloat) 0.976636, + (GLfloat) 0.038477, (GLfloat) - 0.206204, (GLfloat) 0.977752, + (GLfloat) 0.515773, (GLfloat) - 0.229138, (GLfloat) 0.825515, + (GLfloat) 0.492630, (GLfloat) - 0.312368, (GLfloat) 0.812245, + (GLfloat) 0.231801, (GLfloat) - 0.012059, (GLfloat) 0.972689, + (GLfloat) 0.278802, (GLfloat) - 0.009127, (GLfloat) 0.960305, + (GLfloat) 0.254571, (GLfloat) - 0.084963, (GLfloat) 0.963315, + (GLfloat) 0.202207, (GLfloat) - 0.074217, (GLfloat) 0.976527, + (GLfloat) 0.467347, (GLfloat) - 0.336981, (GLfloat) 0.817332, + (GLfloat) 0.432250, (GLfloat) - 0.426645, (GLfloat) 0.794440, + (GLfloat) 0.731946, (GLfloat) - 0.508941, (GLfloat) 0.453029, + (GLfloat) 0.760718, (GLfloat) - 0.438585, (GLfloat) 0.478489, + (GLfloat) 0.696013, (GLfloat) - 0.585025, (GLfloat) 0.416308, + (GLfloat) 0.630794, (GLfloat) - 0.620580, (GLfloat) 0.465810, + (GLfloat) 0.757142, (GLfloat) - 0.637420, (GLfloat) 0.142942, + (GLfloat) 0.737097, (GLfloat) - 0.663598, (GLfloat) 0.127771, + (GLfloat) 0.847507, (GLfloat) - 0.509047, (GLfloat) 0.150342, + (GLfloat) 0.834151, (GLfloat) - 0.533962, (GLfloat) 0.138115, + (GLfloat) - 0.068175, (GLfloat) - 0.903325, (GLfloat) 0.423504, + (GLfloat) - 0.038664, (GLfloat) - 0.911816, (GLfloat) 0.408775, + (GLfloat) - 0.102320, (GLfloat) - 0.986404, (GLfloat) 0.128602, + (GLfloat) - 0.086898, (GLfloat) - 0.988753, (GLfloat) 0.121719, + (GLfloat) 0.488656, (GLfloat) - 0.861887, (GLfloat) 0.135524, + (GLfloat) 0.510932, (GLfloat) - 0.850761, (GLfloat) 0.123102, + (GLfloat) 0.415769, (GLfloat) - 0.794938, (GLfloat) 0.441826, + (GLfloat) 0.471036, (GLfloat) - 0.782278, (GLfloat) 0.407634, + (GLfloat) - 0.038664, (GLfloat) - 0.911816, (GLfloat) - 0.408775, + (GLfloat) - 0.068174, (GLfloat) - 0.903325, (GLfloat) - 0.423504, + (GLfloat) 0.415769, (GLfloat) - 0.794938, (GLfloat) - 0.441826, + (GLfloat) 0.471037, (GLfloat) - 0.782278, (GLfloat) - 0.407634, + (GLfloat) 0.510932, (GLfloat) - 0.850761, (GLfloat) - 0.123102, + (GLfloat) 0.488656, (GLfloat) - 0.861887, (GLfloat) - 0.135524, + (GLfloat) - 0.102320, (GLfloat) - 0.986404, (GLfloat) - 0.128602, + (GLfloat) - 0.086898, (GLfloat) - 0.988753, (GLfloat) - 0.121719, + (GLfloat) 0.760718, (GLfloat) - 0.438585, (GLfloat) - 0.478489, + (GLfloat) 0.731946, (GLfloat) - 0.508941, (GLfloat) - 0.453029, + (GLfloat) 0.847507, (GLfloat) - 0.509047, (GLfloat) - 0.150343, + (GLfloat) 0.834151, (GLfloat) - 0.533962, (GLfloat) - 0.138115, + (GLfloat) 0.737097, (GLfloat) - 0.663599, (GLfloat) - 0.127771, + (GLfloat) 0.757142, (GLfloat) - 0.637420, (GLfloat) - 0.142942, + (GLfloat) 0.630794, (GLfloat) - 0.620580, (GLfloat) - 0.465810, + (GLfloat) 0.696012, (GLfloat) - 0.585025, (GLfloat) - 0.416309, + (GLfloat) 0.774435, (GLfloat) - 0.417338, (GLfloat) 0.475479, + (GLfloat) 0.793442, (GLfloat) - 0.363272, (GLfloat) 0.488348, + (GLfloat) 0.884471, (GLfloat) - 0.440088, (GLfloat) 0.155030, + (GLfloat) 0.875885, (GLfloat) - 0.459272, (GLfloat) 0.147967, + (GLfloat) 0.768156, (GLfloat) - 0.618465, (GLfloat) 0.165642, + (GLfloat) 0.757446, (GLfloat) - 0.632850, (GLfloat) 0.160551, + (GLfloat) 0.645602, (GLfloat) - 0.572394, (GLfloat) 0.505533, + (GLfloat) 0.663605, (GLfloat) - 0.543212, (GLfloat) 0.514343, + (GLfloat) 0.774435, (GLfloat) - 0.417338, (GLfloat) - 0.475479, + (GLfloat) 0.793442, (GLfloat) - 0.363271, (GLfloat) - 0.488348, + (GLfloat) 0.663604, (GLfloat) - 0.543213, (GLfloat) - 0.514343, + (GLfloat) 0.645602, (GLfloat) - 0.572394, (GLfloat) - 0.505533, + (GLfloat) 0.768156, (GLfloat) - 0.618465, (GLfloat) - 0.165643, + (GLfloat) 0.757446, (GLfloat) - 0.632850, (GLfloat) - 0.160551, + (GLfloat) 0.875885, (GLfloat) - 0.459272, (GLfloat) - 0.147967, + (GLfloat) 0.884471, (GLfloat) - 0.440088, (GLfloat) - 0.155030, + (GLfloat) - 0.384755, (GLfloat) - 0.899768, (GLfloat) - 0.205866, + (GLfloat) - 0.407035, (GLfloat) - 0.895883, (GLfloat) - 0.178092, + (GLfloat) - 0.367045, (GLfloat) - 0.927643, (GLfloat) - 0.068965, + (GLfloat) - 0.377652, (GLfloat) - 0.923053, (GLfloat) - 0.073163, + (GLfloat) 0.147492, (GLfloat) - 0.980758, (GLfloat) - 0.127908, + (GLfloat) 0.187942, (GLfloat) - 0.971451, (GLfloat) - 0.144776, + (GLfloat) 0.017404, (GLfloat) - 0.922933, (GLfloat) - 0.384567, + (GLfloat) 0.060977, (GLfloat) - 0.919535, (GLfloat) - 0.388250, + (GLfloat) - 0.407035, (GLfloat) - 0.895883, (GLfloat) 0.178092, + (GLfloat) - 0.384755, (GLfloat) - 0.899768, (GLfloat) 0.205866, + (GLfloat) 0.060977, (GLfloat) - 0.919535, (GLfloat) 0.388250, + (GLfloat) 0.017405, (GLfloat) - 0.922933, (GLfloat) 0.384568, + (GLfloat) 0.187942, (GLfloat) - 0.971451, (GLfloat) 0.144776, + (GLfloat) 0.147492, (GLfloat) - 0.980758, (GLfloat) 0.127908, + (GLfloat) - 0.377652, (GLfloat) - 0.923053, (GLfloat) 0.073163, + (GLfloat) - 0.367045, (GLfloat) - 0.927643, (GLfloat) 0.068965, + (GLfloat) 0.525096, (GLfloat) - 0.217383, (GLfloat) - 0.822811, + (GLfloat) 0.542855, (GLfloat) - 0.154089, (GLfloat) - 0.825569, + (GLfloat) 0.263018, (GLfloat) 0.047234, (GLfloat) - 0.963634, + (GLfloat) 0.298263, (GLfloat) 0.059374, (GLfloat) - 0.952635, + (GLfloat) 0.152826, (GLfloat) - 0.078814, (GLfloat) - 0.985105, + (GLfloat) 0.157225, (GLfloat) - 0.076313, (GLfloat) - 0.984610, + (GLfloat) 0.407888, (GLfloat) - 0.328946, (GLfloat) - 0.851717, + (GLfloat) 0.393565, (GLfloat) - 0.338248, (GLfloat) - 0.854807, + (GLfloat) - 0.131636, (GLfloat) 0.588079, (GLfloat) - 0.798019, + (GLfloat) - 0.131727, (GLfloat) 0.588071, (GLfloat) - 0.798011, + (GLfloat) - 0.280070, (GLfloat) 0.459269, (GLfloat) - 0.842990, + (GLfloat) - 0.285882, (GLfloat) 0.456692, (GLfloat) - 0.842439, + (GLfloat) - 0.064116, (GLfloat) 0.179568, (GLfloat) - 0.981654, + (GLfloat) - 0.067311, (GLfloat) 0.177967, (GLfloat) - 0.981732, + (GLfloat) 0.071348, (GLfloat) 0.308885, (GLfloat) - 0.948419, + (GLfloat) 0.056168, (GLfloat) 0.305937, (GLfloat) - 0.950393, + (GLfloat) - 0.756765, (GLfloat) - 0.603631, (GLfloat) - 0.250870, + (GLfloat) - 0.750192, (GLfloat) - 0.596115, (GLfloat) - 0.286110, + (GLfloat) - 0.661260, (GLfloat) - 0.680768, (GLfloat) - 0.315104, + (GLfloat) - 0.666597, (GLfloat) - 0.680599, (GLfloat) - 0.304029, + (GLfloat) - 0.487239, (GLfloat) - 0.360038, (GLfloat) - 0.795595, + (GLfloat) - 0.481713, (GLfloat) - 0.339088, (GLfloat) - 0.808067, + (GLfloat) - 0.706427, (GLfloat) - 0.186136, (GLfloat) - 0.682872, + (GLfloat) - 0.704353, (GLfloat) - 0.163662, (GLfloat) - 0.690726, + (GLfloat) - 0.472887, (GLfloat) - 0.840626, (GLfloat) - 0.264056, + (GLfloat) - 0.444319, (GLfloat) - 0.849789, (GLfloat) - 0.283620, + (GLfloat) - 0.155246, (GLfloat) - 0.767829, (GLfloat) - 0.621561, + (GLfloat) - 0.107581, (GLfloat) - 0.759164, (GLfloat) - 0.641947, + (GLfloat) - 0.262880, (GLfloat) - 0.545316, (GLfloat) - 0.795943, + (GLfloat) - 0.306478, (GLfloat) - 0.563718, (GLfloat) - 0.767002, + (GLfloat) - 0.550890, (GLfloat) - 0.772860, (GLfloat) - 0.314972, + (GLfloat) - 0.559203, (GLfloat) - 0.770962, (GLfloat) - 0.304813, + (GLfloat) - 0.296632, (GLfloat) 0.840312, (GLfloat) - 0.453745, + (GLfloat) - 0.291339, (GLfloat) 0.841021, (GLfloat) - 0.455856, + (GLfloat) - 0.347498, (GLfloat) 0.926752, (GLfloat) - 0.142743, + (GLfloat) - 0.349577, (GLfloat) 0.926172, (GLfloat) - 0.141427, + (GLfloat) - 0.528222, (GLfloat) 0.834354, (GLfloat) - 0.157592, + (GLfloat) - 0.534297, (GLfloat) 0.830965, (GLfloat) - 0.154997, + (GLfloat) - 0.477964, (GLfloat) 0.727109, (GLfloat) - 0.492812, + (GLfloat) - 0.464577, (GLfloat) 0.733270, (GLfloat) - 0.496471, + (GLfloat) - 0.296632, (GLfloat) 0.840312, (GLfloat) 0.453745, + (GLfloat) - 0.291339, (GLfloat) 0.841021, (GLfloat) 0.455856, + (GLfloat) - 0.464577, (GLfloat) 0.733270, (GLfloat) 0.496471, + (GLfloat) - 0.477964, (GLfloat) 0.727109, (GLfloat) 0.492812, + (GLfloat) - 0.528222, (GLfloat) 0.834354, (GLfloat) 0.157592, + (GLfloat) - 0.534297, (GLfloat) 0.830965, (GLfloat) 0.154997, + (GLfloat) - 0.349577, (GLfloat) 0.926172, (GLfloat) 0.141427, + (GLfloat) - 0.347498, (GLfloat) 0.926752, (GLfloat) 0.142743, + (GLfloat) - 0.819286, (GLfloat) - 0.535153, (GLfloat) 0.205866, + (GLfloat) - 0.811591, (GLfloat) - 0.556420, (GLfloat) 0.178092, + (GLfloat) - 0.849813, (GLfloat) - 0.522553, (GLfloat) 0.068965, + (GLfloat) - 0.843450, (GLfloat) - 0.532202, (GLfloat) 0.073162, + (GLfloat) - 0.975674, (GLfloat) 0.164943, (GLfloat) 0.144407, + (GLfloat) - 0.965143, (GLfloat) 0.206428, (GLfloat) 0.160894, + (GLfloat) - 0.906538, (GLfloat) 0.014845, (GLfloat) 0.421862, + (GLfloat) - 0.890094, (GLfloat) 0.060087, (GLfloat) 0.451800, + (GLfloat) - 0.811591, (GLfloat) - 0.556419, (GLfloat) - 0.178092, + (GLfloat) - 0.819286, (GLfloat) - 0.535153, (GLfloat) - 0.205865, + (GLfloat) - 0.906538, (GLfloat) 0.014844, (GLfloat) - 0.421862, + (GLfloat) - 0.890094, (GLfloat) 0.060087, (GLfloat) - 0.451800, + (GLfloat) - 0.965143, (GLfloat) 0.206428, (GLfloat) - 0.160894, + (GLfloat) - 0.975674, (GLfloat) 0.164943, (GLfloat) - 0.144407, + (GLfloat) - 0.843450, (GLfloat) - 0.532202, (GLfloat) - 0.073162, + (GLfloat) - 0.849813, (GLfloat) - 0.522553, (GLfloat) - 0.068965, + (GLfloat) - 0.131727, (GLfloat) 0.588071, (GLfloat) 0.798011, + (GLfloat) - 0.131636, (GLfloat) 0.588079, (GLfloat) 0.798019, + (GLfloat) 0.071348, (GLfloat) 0.308886, (GLfloat) 0.948419, + (GLfloat) 0.056168, (GLfloat) 0.305937, (GLfloat) 0.950393, + (GLfloat) - 0.067311, (GLfloat) 0.177967, (GLfloat) 0.981732, + (GLfloat) - 0.064116, (GLfloat) 0.179568, (GLfloat) 0.981654, + (GLfloat) - 0.280070, (GLfloat) 0.459269, (GLfloat) 0.842990, + (GLfloat) - 0.285882, (GLfloat) 0.456692, (GLfloat) 0.842439, + (GLfloat) 0.542855, (GLfloat) - 0.154089, (GLfloat) 0.825569, + (GLfloat) 0.525096, (GLfloat) - 0.217383, (GLfloat) 0.822811, + (GLfloat) 0.393565, (GLfloat) - 0.338248, (GLfloat) 0.854807, + (GLfloat) 0.407888, (GLfloat) - 0.328946, (GLfloat) 0.851717, + (GLfloat) 0.152826, (GLfloat) - 0.078814, (GLfloat) 0.985105, + (GLfloat) 0.157225, (GLfloat) - 0.076313, (GLfloat) 0.984610, + (GLfloat) 0.298263, (GLfloat) 0.059374, (GLfloat) 0.952635, + (GLfloat) 0.263018, (GLfloat) 0.047234, (GLfloat) 0.963634, + (GLfloat) - 0.444319, (GLfloat) - 0.849789, (GLfloat) 0.283620, + (GLfloat) - 0.472887, (GLfloat) - 0.840626, (GLfloat) 0.264055, + (GLfloat) - 0.550890, (GLfloat) - 0.772861, (GLfloat) 0.314972, + (GLfloat) - 0.559203, (GLfloat) - 0.770962, (GLfloat) 0.304813, + (GLfloat) - 0.306478, (GLfloat) - 0.563718, (GLfloat) 0.767003, + (GLfloat) - 0.262880, (GLfloat) - 0.545316, (GLfloat) 0.795943, + (GLfloat) - 0.155245, (GLfloat) - 0.767828, (GLfloat) 0.621562, + (GLfloat) - 0.107581, (GLfloat) - 0.759164, (GLfloat) 0.641947, + (GLfloat) - 0.756765, (GLfloat) - 0.603631, (GLfloat) 0.250869, + (GLfloat) - 0.750192, (GLfloat) - 0.596115, (GLfloat) 0.286110, + (GLfloat) - 0.706427, (GLfloat) - 0.186135, (GLfloat) 0.682873, + (GLfloat) - 0.704352, (GLfloat) - 0.163662, (GLfloat) 0.690726, + (GLfloat) - 0.481713, (GLfloat) - 0.339088, (GLfloat) 0.808067, + (GLfloat) - 0.487239, (GLfloat) - 0.360037, (GLfloat) 0.795595, + (GLfloat) - 0.666597, (GLfloat) - 0.680599, (GLfloat) 0.304029, + (GLfloat) - 0.661260, (GLfloat) - 0.680768, (GLfloat) 0.315104, + (GLfloat) - 0.527794, (GLfloat) - 0.840271, (GLfloat) - 0.124011, + (GLfloat) - 0.536826, (GLfloat) - 0.832691, (GLfloat) - 0.135802, + (GLfloat) - 0.604714, (GLfloat) - 0.788863, (GLfloat) - 0.109621, + (GLfloat) - 0.607657, (GLfloat) - 0.785872, (GLfloat) - 0.114709, + (GLfloat) - 0.619037, (GLfloat) - 0.784665, (GLfloat) - 0.033079, + (GLfloat) - 0.616803, (GLfloat) - 0.786539, (GLfloat) - 0.030163, + (GLfloat) - 0.554318, (GLfloat) - 0.831150, (GLfloat) - 0.043834, + (GLfloat) - 0.550163, (GLfloat) - 0.834115, (GLfloat) - 0.039656, + (GLfloat) - 0.726822, (GLfloat) - 0.673266, (GLfloat) - 0.135802, + (GLfloat) - 0.735855, (GLfloat) - 0.665687, (GLfloat) - 0.124011, + (GLfloat) - 0.722267, (GLfloat) - 0.690224, (GLfloat) - 0.043834, + (GLfloat) - 0.725908, (GLfloat) - 0.686648, (GLfloat) - 0.039656, + (GLfloat) - 0.667483, (GLfloat) - 0.744014, (GLfloat) - 0.030163, + (GLfloat) - 0.665249, (GLfloat) - 0.745888, (GLfloat) - 0.033079, + (GLfloat) - 0.671871, (GLfloat) - 0.732511, (GLfloat) - 0.109621, + (GLfloat) - 0.668414, (GLfloat) - 0.734891, (GLfloat) - 0.114709, + (GLfloat) - 0.735855, (GLfloat) - 0.665687, (GLfloat) 0.124011, + (GLfloat) - 0.726822, (GLfloat) - 0.673266, (GLfloat) 0.135802, + (GLfloat) - 0.671871, (GLfloat) - 0.732511, (GLfloat) 0.109621, + (GLfloat) - 0.668414, (GLfloat) - 0.734891, (GLfloat) 0.114709, + (GLfloat) - 0.665249, (GLfloat) - 0.745888, (GLfloat) 0.033079, + (GLfloat) - 0.667483, (GLfloat) - 0.744014, (GLfloat) 0.030163, + (GLfloat) - 0.722267, (GLfloat) - 0.690224, (GLfloat) 0.043834, + (GLfloat) - 0.725908, (GLfloat) - 0.686648, (GLfloat) 0.039656, + (GLfloat) - 0.536826, (GLfloat) - 0.832691, (GLfloat) 0.135802, + (GLfloat) - 0.527794, (GLfloat) - 0.840271, (GLfloat) 0.124011, + (GLfloat) - 0.554318, (GLfloat) - 0.831150, (GLfloat) 0.043834, + (GLfloat) - 0.550163, (GLfloat) - 0.834115, (GLfloat) 0.039656, + (GLfloat) - 0.616803, (GLfloat) - 0.786539, (GLfloat) 0.030163, + (GLfloat) - 0.619037, (GLfloat) - 0.784665, (GLfloat) 0.033079, + (GLfloat) - 0.604714, (GLfloat) - 0.788863, (GLfloat) 0.109621, + (GLfloat) - 0.607657, (GLfloat) - 0.785872, (GLfloat) 0.114709, +}; + +static unsigned short int s1_4_POLS[] = +{ + 3, 82, 12, 76, 1, 3, 76, 74, 82, 1, 3, 22, 78, 74, 1, 3, 22, 74, 76, 1, + 3, 78, 20, 80, 1, 3, 80, 74, 78, 1, 3, 28, 82, 74, 1, 3, 28, 74, 80, 1, + 3, 88, 13, 84, 1, 3, 84, 77, 88, 1, 3, 24, 86, 77, 1, 3, 24, 77, 84, 1, + 3, 86, 20, 78, 1, 3, 78, 77, 86, 1, 3, 22, 88, 77, 1, 3, 22, 77, 78, 1, + 3, 14, 90, 85, 1, 3, 14, 85, 93, 1, 3, 26, 91, 85, 1, 3, 26, 85, 90, 1, + 3, 20, 86, 85, 1, 3, 20, 85, 91, 1, 3, 86, 24, 93, 1, 3, 93, 85, 86, 1, + 3, 15, 95, 79, 1, 3, 15, 79, 97, 1, 3, 95, 28, 80, 1, 3, 80, 79, 95, 1, + 3, 20, 91, 79, 1, 3, 20, 79, 80, 1, 3, 26, 97, 79, 1, 3, 26, 79, 91, 1, + 3, 13, 99, 83, 1, 3, 13, 83, 84, 1, 3, 99, 30, 101, 1, 3, 101, 83, 99, 1, + 3, 23, 102, 83, 1, 3, 23, 83, 101, 1, 3, 102, 24, 84, 1, 3, 84, 83, 102, 1, + 3, 16, 104, 100, 1, 3, 16, 100, 108, 1, 3, 104, 32, 106, 1, 3, 106, 100, 104, 1, + 3, 106, 23, 101, 1, 3, 101, 100, 106, 1, 3, 30, 108, 100, 1, 3, 30, 100, 101, 1, + 3, 17, 110, 105, 1, 3, 17, 105, 113, 1, 3, 110, 33, 111, 1, 3, 111, 105, 110, 1, + 3, 23, 106, 105, 1, 3, 23, 105, 111, 1, 3, 106, 32, 113, 1, 3, 113, 105, 106, 1, + 3, 114, 14, 93, 1, 3, 93, 92, 114, 1, 3, 93, 24, 102, 1, 3, 102, 92, 93, 1, +3, 23, 111, 92, 1, 3, 23, 92, 102, 1, 3, 111, 33, 114, 1, 3, 114, 92, 111, 1, + 3, 104, 16, 116, 1, 3, 116, 103, 104, 1, 3, 35, 118, 103, 1, 3, 35, 103, 116, 1, + 3, 118, 31, 119, 1, 3, 119, 103, 118, 1, 3, 32, 104, 103, 1, 3, 32, 103, 119, 1, + 3, 125, 18, 121, 1, 3, 121, 117, 125, 1, 3, 36, 123, 117, 1, 3, 36, 117, 121, 1, + 3, 123, 31, 118, 1, 3, 118, 117, 123, 1, 3, 35, 125, 117, 1, 3, 35, 117, 118, 1, + 3, 19, 127, 122, 1, 3, 19, 122, 130, 1, 3, 37, 128, 122, 1, 3, 37, 122, 127, 1, + 3, 31, 123, 122, 1, 3, 31, 122, 128, 1, 3, 36, 130, 122, 1, 3, 36, 122, 123, 1, + 3, 17, 113, 112, 1, 3, 17, 112, 131, 1, 3, 32, 119, 112, 1, 3, 32, 112, 113, 1, + 3, 31, 128, 112, 1, 3, 31, 112, 119, 1, 3, 37, 131, 112, 1, 3, 37, 112, 128, 1, + 3, 18, 133, 120, 1, 3, 18, 120, 121, 1, 3, 39, 134, 120, 1, 3, 39, 120, 133, 1, + 3, 134, 27, 135, 1, 3, 135, 120, 134, 1, 3, 135, 36, 121, 1, 3, 121, 120, 135, 1, + 3, 12, 82, 81, 1, 3, 12, 81, 138, 1, 3, 82, 28, 136, 1, 3, 136, 81, 82, 1, +3, 27, 134, 81, 1, 3, 27, 81, 136, 1, 3, 134, 39, 138, 1, 3, 138, 81, 134, 1, +3, 95, 15, 139, 1, 3, 139, 94, 95, 1, 3, 139, 40, 140, 1, 3, 140, 94, 139, 1, + 3, 27, 136, 94, 1, 3, 27, 94, 140, 1, 3, 136, 28, 95, 1, 3, 95, 94, 136, 1, + 3, 19, 130, 129, 1, 3, 19, 129, 141, 1, 3, 130, 36, 135, 1, 3, 135, 129, 130, 1, + 3, 27, 140, 129, 1, 3, 27, 129, 135, 1, 3, 140, 40, 141, 1, 3, 141, 129, 140, 1, + 3, 14, 114, 89, 1, 3, 14, 89, 90, 1, 3, 114, 33, 142, 1, 3, 142, 89, 114, 1, + 3, 25, 143, 89, 1, 3, 25, 89, 142, 1, 3, 143, 26, 90, 1, 3, 90, 89, 143, 1, + 3, 17, 131, 109, 1, 3, 17, 109, 110, 1, 3, 131, 37, 144, 1, 3, 144, 109, 131, 1, + 3, 25, 142, 109, 1, 3, 25, 109, 144, 1, 3, 142, 33, 110, 1, 3, 110, 109, 142, 1, + 3, 19, 141, 126, 1, 3, 19, 126, 127, 1, 3, 141, 40, 145, 1, 3, 145, 126, 141, 1, + 3, 25, 144, 126, 1, 3, 25, 126, 145, 1, 3, 144, 37, 127, 1, 3, 127, 126, 144, 1, + 3, 15, 97, 96, 1, 3, 15, 96, 139, 1, 3, 97, 26, 143, 1, 3, 143, 96, 97, 1, +3, 25, 145, 96, 1, 3, 25, 96, 143, 1, 3, 145, 40, 139, 1, 3, 139, 96, 145, 1, + 3, 12, 146, 75, 1, 3, 12, 75, 76, 1, 3, 146, 41, 148, 1, 3, 148, 75, 146, 1, + 3, 21, 149, 75, 1, 3, 21, 75, 148, 1, 3, 149, 22, 76, 1, 3, 76, 75, 149, 1, +3, 8, 151, 147, 1, 3, 8, 147, 155, 1, 3, 151, 43, 153, 1, 3, 153, 147, 151, 1, + 3, 153, 21, 148, 1, 3, 148, 147, 153, 1, 3, 41, 155, 147, 1, 3, 41, 147, 148, 1, + 3, 11, 157, 152, 1, 3, 11, 152, 160, 1, 3, 44, 158, 152, 1, 3, 44, 152, 157, 1, + 3, 158, 21, 153, 1, 3, 153, 152, 158, 1, 3, 153, 43, 160, 1, 3, 160, 152, 153, 1, + 3, 13, 88, 87, 1, 3, 13, 87, 161, 1, 3, 88, 22, 149, 1, 3, 149, 87, 88, 1, +3, 21, 158, 87, 1, 3, 21, 87, 149, 1, 3, 158, 44, 161, 1, 3, 161, 87, 158, 1, + 3, 18, 162, 132, 1, 3, 18, 132, 133, 1, 3, 162, 45, 164, 1, 3, 164, 132, 162, 1, + 3, 38, 165, 132, 1, 3, 38, 132, 164, 1, 3, 165, 39, 133, 1, 3, 133, 132, 165, 1, + 3, 170, 9, 167, 1, 3, 167, 163, 170, 1, 3, 47, 168, 163, 1, 3, 47, 163, 167, 1, + 3, 168, 38, 164, 1, 3, 164, 163, 168, 1, 3, 45, 170, 163, 1, 3, 45, 163, 164, 1, +3, 8, 155, 154, 1, 3, 8, 154, 173, 1, 3, 155, 41, 171, 1, 3, 171, 154, 155, 1, + 3, 38, 168, 154, 1, 3, 38, 154, 171, 1, 3, 168, 47, 173, 1, 3, 173, 154, 168, 1, + 3, 146, 12, 138, 1, 3, 138, 137, 146, 1, 3, 39, 165, 137, 1, 3, 39, 137, 138, 1, + 3, 165, 38, 171, 1, 3, 171, 137, 165, 1, 3, 41, 146, 137, 1, 3, 41, 137, 171, 1, + 3, 16, 108, 107, 1, 3, 16, 107, 177, 1, 3, 108, 30, 174, 1, 3, 174, 107, 108, 1, + 3, 29, 176, 107, 1, 3, 29, 107, 174, 1, 3, 176, 50, 177, 1, 3, 177, 107, 176, 1, + 3, 99, 13, 161, 1, 3, 161, 98, 99, 1, 3, 44, 178, 98, 1, 3, 44, 98, 161, 1, + 3, 178, 29, 174, 1, 3, 174, 98, 178, 1, 3, 30, 99, 98, 1, 3, 30, 98, 174, 1, + 3, 11, 180, 156, 1, 3, 11, 156, 157, 1, 3, 180, 49, 181, 1, 3, 181, 156, 180, 1, + 3, 29, 178, 156, 1, 3, 29, 156, 181, 1, 3, 178, 44, 157, 1, 3, 157, 156, 178, 1, + 3, 185, 10, 183, 1, 3, 183, 175, 185, 1, 3, 50, 176, 175, 1, 3, 50, 175, 183, 1, + 3, 176, 29, 181, 1, 3, 181, 175, 176, 1, 3, 49, 185, 175, 1, 3, 49, 175, 181, 1, + 3, 18, 125, 124, 1, 3, 18, 124, 162, 1, 3, 125, 35, 186, 1, 3, 186, 124, 125, 1, + 3, 34, 187, 124, 1, 3, 34, 124, 186, 1, 3, 187, 45, 162, 1, 3, 162, 124, 187, 1, + 3, 16, 177, 115, 1, 3, 16, 115, 116, 1, 3, 177, 50, 188, 1, 3, 188, 115, 177, 1, + 3, 34, 186, 115, 1, 3, 34, 115, 188, 1, 3, 186, 35, 116, 1, 3, 116, 115, 186, 1, + 3, 183, 10, 190, 1, 3, 190, 182, 183, 1, 3, 52, 191, 182, 1, 3, 52, 182, 190, 1, + 3, 191, 34, 188, 1, 3, 188, 182, 191, 1, 3, 50, 183, 182, 1, 3, 50, 182, 188, 1, + 3, 193, 9, 170, 1, 3, 170, 169, 193, 1, 3, 45, 187, 169, 1, 3, 45, 169, 170, 1, + 3, 187, 34, 191, 1, 3, 191, 169, 187, 1, 3, 52, 193, 169, 1, 3, 52, 169, 191, 1, + 3, 201, 1, 196, 1, 3, 196, 194, 201, 1, 3, 54, 198, 194, 1, 3, 54, 194, 196, 1, + 3, 198, 46, 199, 1, 3, 199, 194, 198, 1, 3, 56, 201, 194, 1, 3, 56, 194, 199, 1, + 3, 206, 3, 203, 1, 3, 203, 197, 206, 1, 3, 55, 204, 197, 1, 3, 55, 197, 203, 1, + 3, 46, 198, 197, 1, 3, 46, 197, 204, 1, 3, 198, 54, 206, 1, 3, 206, 197, 198, 1, + 3, 208, 8, 173, 1, 3, 173, 172, 208, 1, 3, 47, 207, 172, 1, 3, 47, 172, 173, 1, + 3, 207, 46, 204, 1, 3, 204, 172, 207, 1, 3, 204, 55, 208, 1, 3, 208, 172, 204, 1, +3, 9, 209, 166, 1, 3, 9, 166, 167, 1, 3, 209, 56, 199, 1, 3, 199, 166, 209, 1, + 3, 46, 207, 166, 1, 3, 46, 166, 199, 1, 3, 207, 47, 167, 1, 3, 167, 166, 207, 1, +3, 1, 201, 200, 1, 3, 1, 200, 214, 1, 3, 201, 56, 210, 1, 3, 210, 200, 201, 1, + 3, 51, 212, 200, 1, 3, 51, 200, 210, 1, 3, 212, 59, 214, 1, 3, 214, 200, 212, 1, + 3, 209, 9, 193, 1, 3, 193, 192, 209, 1, 3, 193, 52, 215, 1, 3, 215, 192, 193, 1, + 3, 215, 51, 210, 1, 3, 210, 192, 215, 1, 3, 56, 209, 192, 1, 3, 56, 192, 210, 1, + 3, 190, 10, 216, 1, 3, 216, 189, 190, 1, 3, 57, 217, 189, 1, 3, 57, 189, 216, 1, + 3, 217, 51, 215, 1, 3, 215, 189, 217, 1, 3, 215, 52, 190, 1, 3, 190, 189, 215, 1, +3, 0, 219, 211, 1, 3, 0, 211, 221, 1, 3, 219, 59, 212, 1, 3, 212, 211, 219, 1, + 3, 51, 217, 211, 1, 3, 51, 211, 212, 1, 3, 217, 57, 221, 1, 3, 221, 211, 217, 1, + 3, 226, 0, 221, 1, 3, 221, 220, 226, 1, 3, 57, 222, 220, 1, 3, 57, 220, 221, 1, + 3, 222, 48, 224, 1, 3, 224, 220, 222, 1, 3, 62, 226, 220, 1, 3, 62, 220, 224, 1, + 3, 10, 185, 184, 1, 3, 10, 184, 216, 1, 3, 185, 49, 227, 1, 3, 227, 184, 185, 1, + 3, 48, 222, 184, 1, 3, 48, 184, 227, 1, 3, 222, 57, 216, 1, 3, 216, 184, 222, 1, + 3, 180, 11, 228, 1, 3, 228, 179, 180, 1, 3, 228, 60, 229, 1, 3, 229, 179, 228, 1, + 3, 229, 48, 227, 1, 3, 227, 179, 229, 1, 3, 49, 180, 179, 1, 3, 49, 179, 227, 1, + 3, 233, 2, 231, 1, 3, 231, 223, 233, 1, 3, 231, 62, 224, 1, 3, 224, 223, 231, 1, + 3, 48, 229, 223, 1, 3, 48, 223, 224, 1, 3, 60, 233, 223, 1, 3, 60, 223, 229, 1, +3, 2, 233, 232, 1, 3, 2, 232, 237, 1, 3, 60, 234, 232, 1, 3, 60, 232, 233, 1, + 3, 42, 235, 232, 1, 3, 42, 232, 234, 1, 3, 235, 64, 237, 1, 3, 237, 232, 235, 1, + 3, 11, 160, 159, 1, 3, 11, 159, 228, 1, 3, 160, 43, 238, 1, 3, 238, 159, 160, 1, + 3, 42, 234, 159, 1, 3, 42, 159, 238, 1, 3, 234, 60, 228, 1, 3, 228, 159, 234, 1, +3, 8, 208, 150, 1, 3, 8, 150, 151, 1, 3, 208, 55, 239, 1, 3, 239, 150, 208, 1, + 3, 42, 238, 150, 1, 3, 42, 150, 239, 1, 3, 238, 43, 151, 1, 3, 151, 150, 238, 1, +3, 3, 241, 202, 1, 3, 3, 202, 203, 1, 3, 241, 64, 235, 1, 3, 235, 202, 241, 1, + 3, 42, 239, 202, 1, 3, 42, 202, 235, 1, 3, 55, 203, 202, 1, 3, 55, 202, 239, 1, + 3, 245, 2, 237, 1, 3, 237, 236, 245, 1, 3, 64, 242, 236, 1, 3, 64, 236, 237, 1, + 3, 242, 63, 244, 1, 3, 244, 236, 242, 1, 3, 68, 245, 236, 1, 3, 68, 236, 244, 1, + 3, 241, 3, 246, 1, 3, 246, 240, 241, 1, 3, 65, 248, 240, 1, 3, 65, 240, 246, 1, + 3, 248, 63, 242, 1, 3, 242, 240, 248, 1, 3, 64, 241, 240, 1, 3, 64, 240, 242, 1, +3, 4, 250, 247, 1, 3, 4, 247, 253, 1, 3, 67, 251, 247, 1, 3, 67, 247, 250, 1, + 3, 63, 248, 247, 1, 3, 63, 247, 251, 1, 3, 65, 253, 247, 1, 3, 65, 247, 248, 1, +3, 7, 255, 243, 1, 3, 7, 243, 257, 1, 3, 68, 244, 243, 1, 3, 68, 243, 255, 1, + 3, 63, 251, 243, 1, 3, 63, 243, 244, 1, 3, 67, 257, 243, 1, 3, 67, 243, 251, 1, +3, 3, 206, 205, 1, 3, 3, 205, 246, 1, 3, 54, 258, 205, 1, 3, 54, 205, 206, 1, + 3, 258, 53, 259, 1, 3, 259, 205, 258, 1, 3, 65, 246, 205, 1, 3, 65, 205, 259, 1, +3, 1, 260, 195, 1, 3, 1, 195, 196, 1, 3, 260, 69, 262, 1, 3, 262, 195, 260, 1, + 3, 53, 258, 195, 1, 3, 53, 195, 262, 1, 3, 258, 54, 196, 1, 3, 196, 195, 258, 1, + 3, 267, 5, 264, 1, 3, 264, 261, 267, 1, 3, 70, 265, 261, 1, 3, 70, 261, 264, 1, + 3, 53, 262, 261, 1, 3, 53, 261, 265, 1, 3, 262, 69, 267, 1, 3, 267, 261, 262, 1, +3, 4, 253, 252, 1, 3, 4, 252, 268, 1, 3, 253, 65, 259, 1, 3, 259, 252, 253, 1, + 3, 53, 265, 252, 1, 3, 53, 252, 259, 1, 3, 265, 70, 268, 1, 3, 268, 252, 265, 1, + 3, 260, 1, 214, 1, 3, 214, 213, 260, 1, 3, 59, 269, 213, 1, 3, 59, 213, 214, 1, + 3, 269, 58, 270, 1, 3, 270, 213, 269, 1, 3, 69, 260, 213, 1, 3, 69, 213, 270, 1, + 3, 219, 0, 271, 1, 3, 271, 218, 219, 1, 3, 71, 273, 218, 1, 3, 71, 218, 271, 1, + 3, 273, 58, 269, 1, 3, 269, 218, 273, 1, 3, 59, 219, 218, 1, 3, 59, 218, 269, 1, +3, 6, 275, 272, 1, 3, 6, 272, 278, 1, 3, 72, 276, 272, 1, 3, 72, 272, 275, 1, + 3, 58, 273, 272, 1, 3, 58, 272, 276, 1, 3, 273, 71, 278, 1, 3, 278, 272, 273, 1, +3, 5, 267, 266, 1, 3, 5, 266, 279, 1, 3, 267, 69, 270, 1, 3, 270, 266, 267, 1, + 3, 58, 276, 266, 1, 3, 58, 266, 270, 1, 3, 72, 279, 266, 1, 3, 72, 266, 276, 1, +3, 0, 226, 225, 1, 3, 0, 225, 271, 1, 3, 226, 62, 280, 1, 3, 280, 225, 226, 1, + 3, 61, 281, 225, 1, 3, 61, 225, 280, 1, 3, 281, 71, 271, 1, 3, 271, 225, 281, 1, +3, 2, 245, 230, 1, 3, 2, 230, 231, 1, 3, 68, 282, 230, 1, 3, 68, 230, 245, 1, + 3, 282, 61, 280, 1, 3, 280, 230, 282, 1, 3, 62, 231, 230, 1, 3, 62, 230, 280, 1, +3, 7, 283, 254, 1, 3, 7, 254, 255, 1, 3, 283, 73, 284, 1, 3, 284, 254, 283, 1, + 3, 61, 282, 254, 1, 3, 61, 254, 284, 1, 3, 282, 68, 255, 1, 3, 255, 254, 282, 1, + 3, 285, 6, 278, 1, 3, 278, 277, 285, 1, 3, 278, 71, 281, 1, 3, 281, 277, 278, 1, + 3, 61, 284, 277, 1, 3, 61, 277, 281, 1, 3, 73, 285, 277, 1, 3, 73, 277, 284, 1, +3, 4, 268, 249, 1, 3, 4, 249, 250, 1, 3, 268, 70, 286, 1, 3, 286, 249, 268, 1, + 3, 66, 287, 249, 1, 3, 66, 249, 286, 1, 3, 287, 67, 250, 1, 3, 250, 249, 287, 1, +3, 5, 279, 263, 1, 3, 5, 263, 264, 1, 3, 279, 72, 288, 1, 3, 288, 263, 279, 1, + 3, 66, 286, 263, 1, 3, 66, 263, 288, 1, 3, 286, 70, 264, 1, 3, 264, 263, 286, 1, +3, 6, 285, 274, 1, 3, 6, 274, 275, 1, 3, 285, 73, 289, 1, 3, 289, 274, 285, 1, + 3, 66, 288, 274, 1, 3, 66, 274, 289, 1, 3, 288, 72, 275, 1, 3, 275, 274, 288, 1, +3, 7, 257, 256, 1, 3, 7, 256, 283, 1, 3, 257, 67, 287, 1, 3, 287, 256, 257, 1, + 3, 66, 289, 256, 1, 3, 66, 256, 287, 1, 3, 289, 73, 283, 1, 3, 283, 256, 289, 1, + + 0 +}; + +struct lwo LWO_s1_4 = +{ + 290, /* number of points */ + s1_4_PNTS, s1_4_normals, s1_4_POLS, 0L +}; + +#endif /* USE_GL */ + +/* End of s1_4.c */ diff --git a/hacks/glx/s1_5.c b/hacks/glx/s1_5.c new file mode 100644 index 00000000..66751851 --- /dev/null +++ b/hacks/glx/s1_5.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_5.c 4.2 97/04/20 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render "s1_5" in 3D. + * + * Generated by lw2ogl. Link this with your program but do + * not edit by hand. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat s1_5_PNTS[] = +{ + (GLfloat) 1.333479, (GLfloat) - 0.188456, (GLfloat) - 0.340079, + (GLfloat) 1.333479, (GLfloat) - 0.188456, (GLfloat) - 0.659921, + (GLfloat) 1.633195, (GLfloat) - 0.090616, (GLfloat) - 0.340079, + (GLfloat) 1.633195, (GLfloat) - 0.090616, (GLfloat) - 0.659921, + (GLfloat) 1.670754, (GLfloat) - 0.221475, (GLfloat) - 0.638667, + (GLfloat) 1.402870, (GLfloat) - 0.293254, (GLfloat) - 0.638667, + (GLfloat) 1.402870, (GLfloat) - 0.293254, (GLfloat) - 0.361333, + (GLfloat) 1.670754, (GLfloat) - 0.221475, (GLfloat) - 0.361333, + (GLfloat) 1.332183, (GLfloat) 0.266938, (GLfloat) - 0.619965, + (GLfloat) 1.190836, (GLfloat) 0.100363, (GLfloat) - 0.619965, + (GLfloat) 1.190836, (GLfloat) 0.100363, (GLfloat) - 0.380035, + (GLfloat) 1.332183, (GLfloat) 0.266938, (GLfloat) - 0.380035, + (GLfloat) 0.995497, (GLfloat) 0.593044, (GLfloat) - 0.659921, + (GLfloat) 0.995497, (GLfloat) 0.593044, (GLfloat) - 0.340079, + (GLfloat) 0.874620, (GLfloat) 0.619745, (GLfloat) - 0.361333, + (GLfloat) 0.874620, (GLfloat) 0.619745, (GLfloat) - 0.638667, + (GLfloat) 0.974692, (GLfloat) 0.281188, (GLfloat) - 0.340079, + (GLfloat) 0.874620, (GLfloat) 0.342412, (GLfloat) - 0.361333, + (GLfloat) 0.974692, (GLfloat) 0.281188, (GLfloat) - 0.659921, + (GLfloat) 0.874620, (GLfloat) 0.342412, (GLfloat) - 0.638667, + (GLfloat) 0.906869, (GLfloat) 0.713633, (GLfloat) - 0.500000, + (GLfloat) 1.161726, (GLfloat) 0.497346, (GLfloat) - 0.500000, + (GLfloat) 0.999280, (GLfloat) 0.649745, (GLfloat) - 0.500000, + (GLfloat) 0.905451, (GLfloat) 0.476683, (GLfloat) - 0.262505, + (GLfloat) 0.907098, (GLfloat) 0.650057, (GLfloat) - 0.326227, + (GLfloat) 0.856159, (GLfloat) 0.481079, (GLfloat) - 0.500000, + (GLfloat) 0.867922, (GLfloat) 0.658641, (GLfloat) - 0.500000, + (GLfloat) 0.905451, (GLfloat) 0.476683, (GLfloat) - 0.737495, + (GLfloat) 0.907098, (GLfloat) 0.650057, (GLfloat) - 0.673773, + (GLfloat) 1.114357, (GLfloat) 0.334395, (GLfloat) - 0.317564, + (GLfloat) 0.985095, (GLfloat) 0.437116, (GLfloat) - 0.281926, + (GLfloat) 0.904032, (GLfloat) 0.239732, (GLfloat) - 0.500000, + (GLfloat) 0.905018, (GLfloat) 0.303308, (GLfloat) - 0.326227, + (GLfloat) 0.867922, (GLfloat) 0.481079, (GLfloat) - 0.322437, + (GLfloat) 1.066987, (GLfloat) 0.171444, (GLfloat) - 0.500000, + (GLfloat) 0.970910, (GLfloat) 0.224487, (GLfloat) - 0.500000, + (GLfloat) 0.905018, (GLfloat) 0.303308, (GLfloat) - 0.673773, + (GLfloat) 0.867922, (GLfloat) 0.303516, (GLfloat) - 0.500000, + (GLfloat) 1.114357, (GLfloat) 0.334395, (GLfloat) - 0.682436, + (GLfloat) 0.985095, (GLfloat) 0.437116, (GLfloat) - 0.718074, + (GLfloat) 0.867922, (GLfloat) 0.481079, (GLfloat) - 0.677562, + (GLfloat) 1.149095, (GLfloat) 0.453892, (GLfloat) - 0.633787, + (GLfloat) 1.544380, (GLfloat) 0.092162, (GLfloat) - 0.500000, + (GLfloat) 1.357882, (GLfloat) 0.297224, (GLfloat) - 0.500000, + (GLfloat) 1.149095, (GLfloat) 0.453892, (GLfloat) - 0.366213, + (GLfloat) 1.079619, (GLfloat) 0.214898, (GLfloat) - 0.633787, + (GLfloat) 1.391060, (GLfloat) 0.010509, (GLfloat) - 0.682436, + (GLfloat) 1.261509, (GLfloat) 0.183650, (GLfloat) - 0.663589, + (GLfloat) 1.391060, (GLfloat) 0.010509, (GLfloat) - 0.317564, + (GLfloat) 1.261509, (GLfloat) 0.183650, (GLfloat) - 0.336411, + (GLfloat) 1.079619, (GLfloat) 0.214898, (GLfloat) - 0.366213, + (GLfloat) 1.237741, (GLfloat) - 0.071143, (GLfloat) - 0.500000, + (GLfloat) 1.165137, (GLfloat) 0.070077, (GLfloat) - 0.500000, + (GLfloat) 1.526344, (GLfloat) - 0.226473, (GLfloat) - 0.737495, + (GLfloat) 1.483337, (GLfloat) - 0.139536, (GLfloat) - 0.718074, + (GLfloat) 1.503495, (GLfloat) 0.070388, (GLfloat) - 0.633787, + (GLfloat) 1.278626, (GLfloat) - 0.049369, (GLfloat) - 0.633787, + (GLfloat) 1.278626, (GLfloat) - 0.049369, (GLfloat) - 0.366213, + (GLfloat) 1.297571, (GLfloat) - 0.288968, (GLfloat) - 0.500000, + (GLfloat) 1.278985, (GLfloat) - 0.206245, (GLfloat) - 0.500000, + (GLfloat) 1.503495, (GLfloat) 0.070388, (GLfloat) - 0.366213, + (GLfloat) 1.526344, (GLfloat) - 0.226473, (GLfloat) - 0.262505, + (GLfloat) 1.483337, (GLfloat) - 0.139536, (GLfloat) - 0.281926, + (GLfloat) 1.755118, (GLfloat) - 0.163978, (GLfloat) - 0.500000, + (GLfloat) 1.687689, (GLfloat) - 0.072827, (GLfloat) - 0.500000, + (GLfloat) 1.693578, (GLfloat) - 0.180157, (GLfloat) - 0.673773, + (GLfloat) 1.541590, (GLfloat) - 0.275196, (GLfloat) - 0.500000, + (GLfloat) 1.710058, (GLfloat) - 0.217878, (GLfloat) - 0.500000, + (GLfloat) 1.693578, (GLfloat) - 0.180157, (GLfloat) - 0.326227, + (GLfloat) 1.358796, (GLfloat) - 0.271614, (GLfloat) - 0.673773, + (GLfloat) 1.538546, (GLfloat) - 0.263835, (GLfloat) - 0.677562, + (GLfloat) 1.358796, (GLfloat) - 0.271614, (GLfloat) - 0.326227, + (GLfloat) 1.367033, (GLfloat) - 0.309791, (GLfloat) - 0.500000, + (GLfloat) 1.538546, (GLfloat) - 0.263835, (GLfloat) - 0.322437, + (GLfloat) 0.944384, (GLfloat) 0.679375, (GLfloat) - 0.593392, + (GLfloat) 1.071585, (GLfloat) 0.569561, (GLfloat) - 0.579959, + (GLfloat) 0.998334, (GLfloat) 0.635570, (GLfloat) - 0.587230, + (GLfloat) 0.944384, (GLfloat) 0.679375, (GLfloat) - 0.406608, + (GLfloat) 0.944762, (GLfloat) 0.694795, (GLfloat) - 0.500000, + (GLfloat) 0.883764, (GLfloat) 0.687079, (GLfloat) - 0.587500, + (GLfloat) 0.907078, (GLfloat) 0.697653, (GLfloat) - 0.594723, + (GLfloat) 0.941357, (GLfloat) 0.556014, (GLfloat) - 0.717914, + (GLfloat) 0.943249, (GLfloat) 0.633115, (GLfloat) - 0.671218, + (GLfloat) 0.941357, (GLfloat) 0.556014, (GLfloat) - 0.282086, + (GLfloat) 0.943249, (GLfloat) 0.633115, (GLfloat) - 0.328782, + (GLfloat) 0.883764, (GLfloat) 0.687079, (GLfloat) - 0.412500, + (GLfloat) 0.907078, (GLfloat) 0.697653, (GLfloat) - 0.405277, + (GLfloat) 1.071585, (GLfloat) 0.569561, (GLfloat) - 0.420041, + (GLfloat) 0.998334, (GLfloat) 0.635570, (GLfloat) - 0.412770, + (GLfloat) 0.861889, (GLfloat) 0.571579, (GLfloat) - 0.409500, + (GLfloat) 0.870135, (GLfloat) 0.645704, (GLfloat) - 0.417500, + (GLfloat) 0.882548, (GLfloat) 0.702579, (GLfloat) - 0.500000, + (GLfloat) 0.883764, (GLfloat) 0.568579, (GLfloat) - 0.294000, + (GLfloat) 0.884979, (GLfloat) 0.641954, (GLfloat) - 0.339125, + (GLfloat) 0.883764, (GLfloat) 0.568579, (GLfloat) - 0.706000, + (GLfloat) 0.884979, (GLfloat) 0.641954, (GLfloat) - 0.660875, + (GLfloat) 0.861889, (GLfloat) 0.571579, (GLfloat) - 0.590500, + (GLfloat) 0.870135, (GLfloat) 0.645704, (GLfloat) - 0.582500, + (GLfloat) 1.056455, (GLfloat) 0.468757, (GLfloat) - 0.313428, + (GLfloat) 0.990769, (GLfloat) 0.522168, (GLfloat) - 0.296464, + (GLfloat) 0.936818, (GLfloat) 0.370973, (GLfloat) - 0.282086, + (GLfloat) 0.939088, (GLfloat) 0.463494, (GLfloat) - 0.266520, + (GLfloat) 0.906322, (GLfloat) 0.571188, (GLfloat) - 0.278521, + (GLfloat) 0.933792, (GLfloat) 0.247612, (GLfloat) - 0.406608, + (GLfloat) 0.934927, (GLfloat) 0.293873, (GLfloat) - 0.328782, + (GLfloat) 0.883764, (GLfloat) 0.393579, (GLfloat) - 0.294000, + (GLfloat) 0.905187, (GLfloat) 0.382177, (GLfloat) - 0.278521, + (GLfloat) 1.033759, (GLfloat) 0.317550, (GLfloat) - 0.313428, + (GLfloat) 0.979421, (GLfloat) 0.352064, (GLfloat) - 0.296464, + (GLfloat) 0.861889, (GLfloat) 0.390579, (GLfloat) - 0.409500, + (GLfloat) 0.870135, (GLfloat) 0.398579, (GLfloat) - 0.335375, + (GLfloat) 0.882548, (GLfloat) 0.481079, (GLfloat) - 0.278500, + (GLfloat) 0.883764, (GLfloat) 0.275079, (GLfloat) - 0.412500, + (GLfloat) 0.884979, (GLfloat) 0.320204, (GLfloat) - 0.339125, + (GLfloat) 0.870135, (GLfloat) 0.563579, (GLfloat) - 0.335375, + (GLfloat) 1.018628, (GLfloat) 0.216746, (GLfloat) - 0.420041, + (GLfloat) 0.971855, (GLfloat) 0.238662, (GLfloat) - 0.412770, + (GLfloat) 0.933792, (GLfloat) 0.247612, (GLfloat) - 0.593392, + (GLfloat) 0.933414, (GLfloat) 0.232192, (GLfloat) - 0.500000, + (GLfloat) 0.904430, (GLfloat) 0.255712, (GLfloat) - 0.405277, + (GLfloat) 0.936818, (GLfloat) 0.370973, (GLfloat) - 0.717914, + (GLfloat) 0.934927, (GLfloat) 0.293873, (GLfloat) - 0.671218, + (GLfloat) 0.883764, (GLfloat) 0.275079, (GLfloat) - 0.587500, + (GLfloat) 0.904430, (GLfloat) 0.255712, (GLfloat) - 0.594723, + (GLfloat) 1.018628, (GLfloat) 0.216746, (GLfloat) - 0.579959, + (GLfloat) 0.971855, (GLfloat) 0.238662, (GLfloat) - 0.587230, + (GLfloat) 0.861889, (GLfloat) 0.390579, (GLfloat) - 0.590500, + (GLfloat) 0.870135, (GLfloat) 0.316454, (GLfloat) - 0.582500, + (GLfloat) 0.882548, (GLfloat) 0.259579, (GLfloat) - 0.500000, + (GLfloat) 0.883764, (GLfloat) 0.393579, (GLfloat) - 0.706000, + (GLfloat) 0.884979, (GLfloat) 0.320204, (GLfloat) - 0.660875, + (GLfloat) 0.870135, (GLfloat) 0.316454, (GLfloat) - 0.417500, + (GLfloat) 1.033759, (GLfloat) 0.317550, (GLfloat) - 0.686572, + (GLfloat) 0.979421, (GLfloat) 0.352064, (GLfloat) - 0.703536, + (GLfloat) 0.939088, (GLfloat) 0.463494, (GLfloat) - 0.733480, + (GLfloat) 0.905187, (GLfloat) 0.382177, (GLfloat) - 0.721479, + (GLfloat) 0.906322, (GLfloat) 0.571188, (GLfloat) - 0.721479, + (GLfloat) 1.056455, (GLfloat) 0.468757, (GLfloat) - 0.686572, + (GLfloat) 0.990769, (GLfloat) 0.522168, (GLfloat) - 0.703536, + (GLfloat) 0.870135, (GLfloat) 0.563579, (GLfloat) - 0.664625, + (GLfloat) 0.882548, (GLfloat) 0.481079, (GLfloat) - 0.721500, + (GLfloat) 0.870135, (GLfloat) 0.398579, (GLfloat) - 0.664625, + (GLfloat) 0.859111, (GLfloat) 0.481079, (GLfloat) - 0.402250, + (GLfloat) 0.859111, (GLfloat) 0.578829, (GLfloat) - 0.500000, + (GLfloat) 0.859111, (GLfloat) 0.383329, (GLfloat) - 0.500000, + (GLfloat) 0.859111, (GLfloat) 0.481079, (GLfloat) - 0.597750, + (GLfloat) 1.065911, (GLfloat) 0.531759, (GLfloat) - 0.646592, + (GLfloat) 1.253715, (GLfloat) 0.391468, (GLfloat) - 0.567669, + (GLfloat) 1.158568, (GLfloat) 0.486483, (GLfloat) - 0.572975, + (GLfloat) 1.073477, (GLfloat) 0.582162, (GLfloat) - 0.500000, + (GLfloat) 1.446226, (GLfloat) 0.186168, (GLfloat) - 0.567669, + (GLfloat) 1.351457, (GLfloat) 0.289652, (GLfloat) - 0.565436, + (GLfloat) 1.253715, (GLfloat) 0.391468, (GLfloat) - 0.432331, + (GLfloat) 1.258403, (GLfloat) 0.400600, (GLfloat) - 0.500000, + (GLfloat) 1.216209, (GLfloat) 0.318418, (GLfloat) - 0.657894, + (GLfloat) 1.239650, (GLfloat) 0.364075, (GLfloat) - 0.624059, + (GLfloat) 1.216209, (GLfloat) 0.318418, (GLfloat) - 0.342106, + (GLfloat) 1.239650, (GLfloat) 0.364075, (GLfloat) - 0.375941, + (GLfloat) 1.158568, (GLfloat) 0.486483, (GLfloat) - 0.427025, + (GLfloat) 1.446226, (GLfloat) 0.186168, (GLfloat) - 0.432331, + (GLfloat) 1.351457, (GLfloat) 0.289652, (GLfloat) - 0.434564, + (GLfloat) 1.065911, (GLfloat) 0.531759, (GLfloat) - 0.353408, + (GLfloat) 1.024302, (GLfloat) 0.254547, (GLfloat) - 0.646592, + (GLfloat) 1.159950, (GLfloat) 0.208844, (GLfloat) - 0.657894, + (GLfloat) 1.095409, (GLfloat) 0.269215, (GLfloat) - 0.670274, + (GLfloat) 1.045107, (GLfloat) 0.393153, (GLfloat) - 0.699898, + (GLfloat) 1.280017, (GLfloat) 0.059132, (GLfloat) - 0.657894, + (GLfloat) 1.222960, (GLfloat) 0.138221, (GLfloat) - 0.652683, + (GLfloat) 1.188080, (GLfloat) 0.263631, (GLfloat) - 0.669172, + (GLfloat) 1.122445, (GLfloat) 0.135794, (GLfloat) - 0.567669, + (GLfloat) 1.136509, (GLfloat) 0.163187, (GLfloat) - 0.624059, + (GLfloat) 1.133305, (GLfloat) 0.399575, (GLfloat) - 0.670274, + (GLfloat) 1.379742, (GLfloat) 0.135354, (GLfloat) - 0.657894, + (GLfloat) 1.300058, (GLfloat) 0.229080, (GLfloat) - 0.652683, + (GLfloat) 1.045107, (GLfloat) 0.393153, (GLfloat) - 0.300102, + (GLfloat) 1.159950, (GLfloat) 0.208844, (GLfloat) - 0.342106, + (GLfloat) 1.095409, (GLfloat) 0.269215, (GLfloat) - 0.329726, + (GLfloat) 1.024302, (GLfloat) 0.254547, (GLfloat) - 0.353408, + (GLfloat) 1.133305, (GLfloat) 0.399575, (GLfloat) - 0.329726, + (GLfloat) 1.379742, (GLfloat) 0.135354, (GLfloat) - 0.342106, + (GLfloat) 1.300058, (GLfloat) 0.229080, (GLfloat) - 0.347317, + (GLfloat) 1.188080, (GLfloat) 0.263631, (GLfloat) - 0.330828, + (GLfloat) 1.122445, (GLfloat) 0.135794, (GLfloat) - 0.432331, + (GLfloat) 1.136509, (GLfloat) 0.163187, (GLfloat) - 0.375941, + (GLfloat) 1.280017, (GLfloat) 0.059132, (GLfloat) - 0.342106, + (GLfloat) 1.222960, (GLfloat) 0.138221, (GLfloat) - 0.347317, + (GLfloat) 1.016736, (GLfloat) 0.204145, (GLfloat) - 0.500000, + (GLfloat) 1.070145, (GLfloat) 0.182308, (GLfloat) - 0.572975, + (GLfloat) 1.070145, (GLfloat) 0.182308, (GLfloat) - 0.427025, + (GLfloat) 1.213533, (GLfloat) 0.008318, (GLfloat) - 0.432331, + (GLfloat) 1.171562, (GLfloat) 0.077649, (GLfloat) - 0.434564, + (GLfloat) 1.117756, (GLfloat) 0.126662, (GLfloat) - 0.500000, + (GLfloat) 1.213533, (GLfloat) 0.008318, (GLfloat) - 0.567669, + (GLfloat) 1.171562, (GLfloat) 0.077649, (GLfloat) - 0.565436, + (GLfloat) 1.370721, (GLfloat) - 0.099359, (GLfloat) - 0.686572, + (GLfloat) 1.420971, (GLfloat) - 0.216460, (GLfloat) - 0.717914, + (GLfloat) 1.401596, (GLfloat) - 0.166219, (GLfloat) - 0.703536, + (GLfloat) 1.515124, (GLfloat) - 0.041541, (GLfloat) - 0.686572, + (GLfloat) 1.442923, (GLfloat) - 0.070450, (GLfloat) - 0.699898, + (GLfloat) 1.329732, (GLfloat) - 0.022152, (GLfloat) - 0.670274, + (GLfloat) 1.274453, (GLfloat) - 0.137904, (GLfloat) - 0.579959, + (GLfloat) 1.310553, (GLfloat) - 0.123450, (GLfloat) - 0.646592, + (GLfloat) 1.611392, (GLfloat) - 0.002996, (GLfloat) - 0.579959, + (GLfloat) 1.575292, (GLfloat) - 0.017451, (GLfloat) - 0.646592, + (GLfloat) 1.452388, (GLfloat) 0.043170, (GLfloat) - 0.670274, + (GLfloat) 1.599377, (GLfloat) - 0.164832, (GLfloat) - 0.717914, + (GLfloat) 1.565078, (GLfloat) - 0.112852, (GLfloat) - 0.703536, + (GLfloat) 1.329879, (GLfloat) 0.097243, (GLfloat) - 0.669172, + (GLfloat) 1.421294, (GLfloat) 0.167113, (GLfloat) - 0.624059, + (GLfloat) 1.238464, (GLfloat) 0.027373, (GLfloat) - 0.624059, + (GLfloat) 1.247962, (GLfloat) - 0.065700, (GLfloat) - 0.572975, + (GLfloat) 1.274453, (GLfloat) - 0.137904, (GLfloat) - 0.420041, + (GLfloat) 1.262419, (GLfloat) - 0.142723, (GLfloat) - 0.500000, + (GLfloat) 1.302034, (GLfloat) - 0.250880, (GLfloat) - 0.593392, + (GLfloat) 1.292609, (GLfloat) - 0.201797, (GLfloat) - 0.587230, + (GLfloat) 1.205222, (GLfloat) 0.001966, (GLfloat) - 0.500000, + (GLfloat) 1.238464, (GLfloat) 0.027373, (GLfloat) - 0.375941, + (GLfloat) 1.247962, (GLfloat) - 0.065700, (GLfloat) - 0.427025, + (GLfloat) 1.302034, (GLfloat) - 0.250880, (GLfloat) - 0.406608, + (GLfloat) 1.292609, (GLfloat) - 0.201797, (GLfloat) - 0.412770, + (GLfloat) 1.370721, (GLfloat) - 0.099359, (GLfloat) - 0.313428, + (GLfloat) 1.310553, (GLfloat) - 0.123450, (GLfloat) - 0.353408, + (GLfloat) 1.329732, (GLfloat) - 0.022152, (GLfloat) - 0.329726, + (GLfloat) 1.515124, (GLfloat) - 0.041541, (GLfloat) - 0.313428, + (GLfloat) 1.442923, (GLfloat) - 0.070450, (GLfloat) - 0.300102, + (GLfloat) 1.420971, (GLfloat) - 0.216460, (GLfloat) - 0.282086, + (GLfloat) 1.401596, (GLfloat) - 0.166219, (GLfloat) - 0.296464, + (GLfloat) 1.329879, (GLfloat) 0.097243, (GLfloat) - 0.330828, + (GLfloat) 1.421294, (GLfloat) 0.167113, (GLfloat) - 0.375941, + (GLfloat) 1.452388, (GLfloat) 0.043170, (GLfloat) - 0.329726, + (GLfloat) 1.599377, (GLfloat) - 0.164832, (GLfloat) - 0.282086, + (GLfloat) 1.565078, (GLfloat) - 0.112852, (GLfloat) - 0.296464, + (GLfloat) 1.611392, (GLfloat) - 0.002996, (GLfloat) - 0.420041, + (GLfloat) 1.575292, (GLfloat) - 0.017451, (GLfloat) - 0.353408, + (GLfloat) 1.534158, (GLfloat) 0.086718, (GLfloat) - 0.427025, + (GLfloat) 1.623426, (GLfloat) 0.001822, (GLfloat) - 0.500000, + (GLfloat) 1.718314, (GLfloat) - 0.130413, (GLfloat) - 0.406608, + (GLfloat) 1.674065, (GLfloat) - 0.077274, (GLfloat) - 0.412770, + (GLfloat) 1.454536, (GLfloat) 0.192520, (GLfloat) - 0.500000, + (GLfloat) 1.534158, (GLfloat) 0.086718, (GLfloat) - 0.572975, + (GLfloat) 1.718314, (GLfloat) - 0.130413, (GLfloat) - 0.593392, + (GLfloat) 1.674065, (GLfloat) - 0.077274, (GLfloat) - 0.587230, + (GLfloat) 1.733181, (GLfloat) - 0.126110, (GLfloat) - 0.500000, + (GLfloat) 1.733426, (GLfloat) - 0.195216, (GLfloat) - 0.412500, + (GLfloat) 1.739610, (GLfloat) - 0.167898, (GLfloat) - 0.405277, + (GLfloat) 1.673712, (GLfloat) - 0.143320, (GLfloat) - 0.328782, + (GLfloat) 1.673712, (GLfloat) - 0.143320, (GLfloat) - 0.671218, + (GLfloat) 1.733426, (GLfloat) - 0.195216, (GLfloat) - 0.587500, + (GLfloat) 1.739610, (GLfloat) - 0.167898, (GLfloat) - 0.594723, + (GLfloat) 1.627523, (GLfloat) - 0.246239, (GLfloat) - 0.590500, + (GLfloat) 1.696988, (GLfloat) - 0.219088, (GLfloat) - 0.582500, + (GLfloat) 1.748713, (GLfloat) - 0.192378, (GLfloat) - 0.500000, + (GLfloat) 1.618964, (GLfloat) - 0.225886, (GLfloat) - 0.706000, + (GLfloat) 1.689524, (GLfloat) - 0.205721, (GLfloat) - 0.660875, + (GLfloat) 1.618964, (GLfloat) - 0.225886, (GLfloat) - 0.294000, + (GLfloat) 1.689524, (GLfloat) - 0.205721, (GLfloat) - 0.339125, + (GLfloat) 1.627523, (GLfloat) - 0.246239, (GLfloat) - 0.409500, + (GLfloat) 1.696988, (GLfloat) - 0.219088, (GLfloat) - 0.417500, + (GLfloat) 1.510174, (GLfloat) - 0.190646, (GLfloat) - 0.733480, + (GLfloat) 1.617509, (GLfloat) - 0.201252, (GLfloat) - 0.721479, + (GLfloat) 1.346635, (GLfloat) - 0.237972, (GLfloat) - 0.671218, + (GLfloat) 1.449927, (GLfloat) - 0.271179, (GLfloat) - 0.706000, + (GLfloat) 1.435022, (GLfloat) - 0.251106, (GLfloat) - 0.721479, + (GLfloat) 1.452691, (GLfloat) - 0.293085, (GLfloat) - 0.590500, + (GLfloat) 1.458284, (GLfloat) - 0.283049, (GLfloat) - 0.664625, + (GLfloat) 1.534760, (GLfloat) - 0.249706, (GLfloat) - 0.721500, + (GLfloat) 1.335465, (GLfloat) - 0.301849, (GLfloat) - 0.587500, + (GLfloat) 1.378738, (GLfloat) - 0.288996, (GLfloat) - 0.660875, + (GLfloat) 1.617662, (GLfloat) - 0.240344, (GLfloat) - 0.664625, + (GLfloat) 1.287166, (GLfloat) - 0.255182, (GLfloat) - 0.500000, + (GLfloat) 1.312921, (GLfloat) - 0.284460, (GLfloat) - 0.594723, + (GLfloat) 1.346635, (GLfloat) - 0.237972, (GLfloat) - 0.328782, + (GLfloat) 1.335465, (GLfloat) - 0.301849, (GLfloat) - 0.412500, + (GLfloat) 1.312921, (GLfloat) - 0.284460, (GLfloat) - 0.405277, + (GLfloat) 1.452691, (GLfloat) - 0.293085, (GLfloat) - 0.409500, + (GLfloat) 1.378957, (GLfloat) - 0.304305, (GLfloat) - 0.417500, + (GLfloat) 1.320807, (GLfloat) - 0.307035, (GLfloat) - 0.500000, + (GLfloat) 1.449927, (GLfloat) - 0.271179, (GLfloat) - 0.294000, + (GLfloat) 1.378738, (GLfloat) - 0.288996, (GLfloat) - 0.339125, + (GLfloat) 1.378957, (GLfloat) - 0.304305, (GLfloat) - 0.582500, + (GLfloat) 1.510174, (GLfloat) - 0.190646, (GLfloat) - 0.266520, + (GLfloat) 1.435022, (GLfloat) - 0.251106, (GLfloat) - 0.278521, + (GLfloat) 1.617509, (GLfloat) - 0.201252, (GLfloat) - 0.278521, + (GLfloat) 1.617662, (GLfloat) - 0.240344, (GLfloat) - 0.335375, + (GLfloat) 1.534760, (GLfloat) - 0.249706, (GLfloat) - 0.278500, + (GLfloat) 1.458284, (GLfloat) - 0.283049, (GLfloat) - 0.335375, + (GLfloat) 1.540826, (GLfloat) - 0.272345, (GLfloat) - 0.597750, + (GLfloat) 1.635245, (GLfloat) - 0.247046, (GLfloat) - 0.500000, + (GLfloat) 1.446407, (GLfloat) - 0.297645, (GLfloat) - 0.500000, + (GLfloat) 1.540826, (GLfloat) - 0.272345, (GLfloat) - 0.402250, +}; + +static GLfloat s1_5_normals[] = +{ + (GLfloat) 0.600201, (GLfloat) 0.679955, (GLfloat) - 0.421211, + (GLfloat) 0.608958, (GLfloat) 0.677912, (GLfloat) - 0.411832, + (GLfloat) 0.631502, (GLfloat) 0.764222, (GLfloat) - 0.131036, + (GLfloat) 0.633915, (GLfloat) 0.762655, (GLfloat) - 0.128491, + (GLfloat) 0.439368, (GLfloat) 0.885949, (GLfloat) - 0.148491, + (GLfloat) 0.440253, (GLfloat) 0.885591, (GLfloat) - 0.148004, + (GLfloat) 0.401172, (GLfloat) 0.784782, (GLfloat) - 0.472417, + (GLfloat) 0.401344, (GLfloat) 0.784757, (GLfloat) - 0.472314, + (GLfloat) 0.608958, (GLfloat) 0.677912, (GLfloat) 0.411832, + (GLfloat) 0.600202, (GLfloat) 0.679955, (GLfloat) 0.421211, + (GLfloat) 0.401173, (GLfloat) 0.784782, (GLfloat) 0.472416, + (GLfloat) 0.401344, (GLfloat) 0.784757, (GLfloat) 0.472314, + (GLfloat) 0.440253, (GLfloat) 0.885591, (GLfloat) 0.148004, + (GLfloat) 0.439368, (GLfloat) 0.885949, (GLfloat) 0.148491, + (GLfloat) 0.631502, (GLfloat) 0.764222, (GLfloat) 0.131036, + (GLfloat) 0.633915, (GLfloat) 0.762655, (GLfloat) 0.128491, + (GLfloat) - 0.936578, (GLfloat) 0.283620, (GLfloat) 0.205866, + (GLfloat) - 0.947923, (GLfloat) 0.264055, (GLfloat) 0.178092, + (GLfloat) - 0.946548, (GLfloat) 0.315105, (GLfloat) 0.068965, + (GLfloat) - 0.949849, (GLfloat) 0.304029, (GLfloat) 0.073162, + (GLfloat) - 0.446501, (GLfloat) 0.882153, (GLfloat) 0.149808, + (GLfloat) - 0.408128, (GLfloat) 0.897939, (GLfloat) 0.164731, + (GLfloat) - 0.523643, (GLfloat) 0.729794, (GLfloat) 0.439543, + (GLfloat) - 0.481115, (GLfloat) 0.743166, (GLfloat) 0.465009, + (GLfloat) - 0.947923, (GLfloat) 0.264056, (GLfloat) - 0.178092, + (GLfloat) - 0.936578, (GLfloat) 0.283620, (GLfloat) - 0.205866, + (GLfloat) - 0.523644, (GLfloat) 0.729794, (GLfloat) - 0.439543, + (GLfloat) - 0.481115, (GLfloat) 0.743165, (GLfloat) - 0.465009, + (GLfloat) - 0.408128, (GLfloat) 0.897939, (GLfloat) - 0.164732, + (GLfloat) - 0.446501, (GLfloat) 0.882153, (GLfloat) - 0.149808, + (GLfloat) - 0.949849, (GLfloat) 0.304029, (GLfloat) - 0.073162, + (GLfloat) - 0.946548, (GLfloat) 0.315105, (GLfloat) - 0.068965, + (GLfloat) 0.509419, (GLfloat) 0.426080, (GLfloat) 0.747629, + (GLfloat) 0.498886, (GLfloat) 0.439986, (GLfloat) 0.746676, + (GLfloat) 0.381490, (GLfloat) 0.130964, (GLfloat) 0.915048, + (GLfloat) 0.367056, (GLfloat) 0.145561, (GLfloat) 0.918739, + (GLfloat) 0.169535, (GLfloat) 0.163155, (GLfloat) 0.971925, + (GLfloat) 0.178255, (GLfloat) 0.158993, (GLfloat) 0.971054, + (GLfloat) 0.289187, (GLfloat) 0.493355, (GLfloat) 0.820349, + (GLfloat) 0.295492, (GLfloat) 0.489598, (GLfloat) 0.820352, + (GLfloat) 0.072844, (GLfloat) - 0.526213, (GLfloat) 0.847227, + (GLfloat) 0.057982, (GLfloat) - 0.518213, (GLfloat) 0.853284, + (GLfloat) - 0.086528, (GLfloat) - 0.515478, (GLfloat) 0.852523, + (GLfloat) - 0.089419, (GLfloat) - 0.514364, (GLfloat) 0.852898, + (GLfloat) 0.052047, (GLfloat) - 0.167008, (GLfloat) 0.984581, + (GLfloat) 0.051822, (GLfloat) - 0.166918, (GLfloat) 0.984608, + (GLfloat) 0.242298, (GLfloat) - 0.179154, (GLfloat) 0.953517, + (GLfloat) 0.225634, (GLfloat) - 0.167006, (GLfloat) 0.959791, + (GLfloat) - 0.936578, (GLfloat) - 0.205866, (GLfloat) 0.283621, + (GLfloat) - 0.947923, (GLfloat) - 0.178092, (GLfloat) 0.264055, + (GLfloat) - 0.946548, (GLfloat) - 0.068965, (GLfloat) 0.315105, + (GLfloat) - 0.949849, (GLfloat) - 0.073162, (GLfloat) 0.304029, + (GLfloat) - 0.624880, (GLfloat) - 0.128758, (GLfloat) 0.770030, + (GLfloat) - 0.585268, (GLfloat) - 0.149307, (GLfloat) 0.796975, + (GLfloat) - 0.702251, (GLfloat) - 0.367360, (GLfloat) 0.609828, + (GLfloat) - 0.666949, (GLfloat) - 0.398310, (GLfloat) 0.629705, + (GLfloat) - 0.947923, (GLfloat) 0.178092, (GLfloat) 0.264055, + (GLfloat) - 0.936578, (GLfloat) 0.205866, (GLfloat) 0.283621, + (GLfloat) - 0.567140, (GLfloat) 0.430351, (GLfloat) 0.702247, + (GLfloat) - 0.540648, (GLfloat) 0.447171, (GLfloat) 0.712557, + (GLfloat) - 0.547735, (GLfloat) 0.144705, (GLfloat) 0.824043, + (GLfloat) - 0.571109, (GLfloat) 0.150867, (GLfloat) 0.806892, + (GLfloat) - 0.949849, (GLfloat) 0.073162, (GLfloat) 0.304029, + (GLfloat) - 0.946548, (GLfloat) 0.068965, (GLfloat) 0.315105, + (GLfloat) - 0.119299, (GLfloat) - 0.854945, (GLfloat) 0.504814, + (GLfloat) - 0.127336, (GLfloat) - 0.851794, (GLfloat) 0.508166, + (GLfloat) - 0.198715, (GLfloat) - 0.967024, (GLfloat) 0.159301, + (GLfloat) - 0.201251, (GLfloat) - 0.966323, (GLfloat) 0.160367, + (GLfloat) - 0.255603, (GLfloat) - 0.953134, (GLfloat) 0.161871, + (GLfloat) - 0.245412, (GLfloat) - 0.956309, (GLfloat) 0.158892, + (GLfloat) - 0.220327, (GLfloat) - 0.834921, (GLfloat) 0.504344, + (GLfloat) - 0.208789, (GLfloat) - 0.839323, (GLfloat) 0.501940, + (GLfloat) - 0.127336, (GLfloat) - 0.851794, (GLfloat) - 0.508166, + (GLfloat) - 0.119299, (GLfloat) - 0.854945, (GLfloat) - 0.504814, + (GLfloat) - 0.220327, (GLfloat) - 0.834921, (GLfloat) - 0.504344, + (GLfloat) - 0.208789, (GLfloat) - 0.839323, (GLfloat) - 0.501940, + (GLfloat) - 0.245412, (GLfloat) - 0.956309, (GLfloat) - 0.158892, + (GLfloat) - 0.255603, (GLfloat) - 0.953134, (GLfloat) - 0.161871, + (GLfloat) - 0.198715, (GLfloat) - 0.967024, (GLfloat) - 0.159301, + (GLfloat) - 0.201251, (GLfloat) - 0.966323, (GLfloat) - 0.160367, + (GLfloat) - 0.936578, (GLfloat) - 0.283621, (GLfloat) - 0.205866, + (GLfloat) - 0.947923, (GLfloat) - 0.264056, (GLfloat) - 0.178092, + (GLfloat) - 0.946548, (GLfloat) - 0.315105, (GLfloat) - 0.068965, + (GLfloat) - 0.949849, (GLfloat) - 0.304029, (GLfloat) - 0.073162, + (GLfloat) - 0.700995, (GLfloat) - 0.702740, (GLfloat) - 0.121503, + (GLfloat) - 0.672056, (GLfloat) - 0.727490, (GLfloat) - 0.138204, + (GLfloat) - 0.726368, (GLfloat) - 0.580019, (GLfloat) - 0.368737, + (GLfloat) - 0.700623, (GLfloat) - 0.608968, (GLfloat) - 0.371867, + (GLfloat) - 0.947923, (GLfloat) - 0.264056, (GLfloat) 0.178092, + (GLfloat) - 0.936578, (GLfloat) - 0.283621, (GLfloat) 0.205866, + (GLfloat) - 0.700623, (GLfloat) - 0.608968, (GLfloat) 0.371867, + (GLfloat) - 0.726368, (GLfloat) - 0.580019, (GLfloat) 0.368738, + (GLfloat) - 0.672055, (GLfloat) - 0.727490, (GLfloat) 0.138204, + (GLfloat) - 0.700994, (GLfloat) - 0.702740, (GLfloat) 0.121503, + (GLfloat) - 0.949849, (GLfloat) - 0.304029, (GLfloat) 0.073162, + (GLfloat) - 0.946548, (GLfloat) - 0.315105, (GLfloat) 0.068965, + (GLfloat) 0.072844, (GLfloat) - 0.526213, (GLfloat) - 0.847227, + (GLfloat) 0.057982, (GLfloat) - 0.518214, (GLfloat) - 0.853284, + (GLfloat) 0.225635, (GLfloat) - 0.167007, (GLfloat) - 0.959790, + (GLfloat) 0.242298, (GLfloat) - 0.179154, (GLfloat) - 0.953517, + (GLfloat) 0.052045, (GLfloat) - 0.167008, (GLfloat) - 0.984581, + (GLfloat) 0.051820, (GLfloat) - 0.166918, (GLfloat) - 0.984608, + (GLfloat) - 0.089420, (GLfloat) - 0.514364, (GLfloat) - 0.852897, + (GLfloat) - 0.086529, (GLfloat) - 0.515478, (GLfloat) - 0.852523, + (GLfloat) 0.498887, (GLfloat) 0.439986, (GLfloat) - 0.746675, + (GLfloat) 0.509419, (GLfloat) 0.426080, (GLfloat) - 0.747628, + (GLfloat) 0.289186, (GLfloat) 0.493355, (GLfloat) - 0.820349, + (GLfloat) 0.295491, (GLfloat) 0.489598, (GLfloat) - 0.820353, + (GLfloat) 0.178253, (GLfloat) 0.158994, (GLfloat) - 0.971054, + (GLfloat) 0.169534, (GLfloat) 0.163155, (GLfloat) - 0.971925, + (GLfloat) 0.381491, (GLfloat) 0.130963, (GLfloat) - 0.915048, + (GLfloat) 0.367056, (GLfloat) 0.145561, (GLfloat) - 0.918739, + (GLfloat) - 0.936578, (GLfloat) 0.205866, (GLfloat) - 0.283621, + (GLfloat) - 0.947923, (GLfloat) 0.178092, (GLfloat) - 0.264056, + (GLfloat) - 0.946548, (GLfloat) 0.068965, (GLfloat) - 0.315105, + (GLfloat) - 0.949849, (GLfloat) 0.073162, (GLfloat) - 0.304029, + (GLfloat) - 0.547736, (GLfloat) 0.144705, (GLfloat) - 0.824043, + (GLfloat) - 0.571109, (GLfloat) 0.150867, (GLfloat) - 0.806892, + (GLfloat) - 0.567141, (GLfloat) 0.430351, (GLfloat) - 0.702246, + (GLfloat) - 0.540648, (GLfloat) 0.447171, (GLfloat) - 0.712557, + (GLfloat) - 0.947923, (GLfloat) - 0.178092, (GLfloat) - 0.264056, + (GLfloat) - 0.936578, (GLfloat) - 0.205866, (GLfloat) - 0.283621, + (GLfloat) - 0.702251, (GLfloat) - 0.367360, (GLfloat) - 0.609828, + (GLfloat) - 0.666949, (GLfloat) - 0.398310, (GLfloat) - 0.629705, + (GLfloat) - 0.585269, (GLfloat) - 0.149307, (GLfloat) - 0.796974, + (GLfloat) - 0.624880, (GLfloat) - 0.128758, (GLfloat) - 0.770030, + (GLfloat) - 0.949849, (GLfloat) - 0.073162, (GLfloat) - 0.304029, + (GLfloat) - 0.946548, (GLfloat) - 0.068965, (GLfloat) - 0.315105, + (GLfloat) - 0.982944, (GLfloat) 0.135802, (GLfloat) 0.124011, + (GLfloat) - 0.982944, (GLfloat) 0.124011, (GLfloat) 0.135802, + (GLfloat) - 0.993006, (GLfloat) 0.043834, (GLfloat) 0.109621, + (GLfloat) - 0.992607, (GLfloat) 0.039656, (GLfloat) 0.114709, + (GLfloat) - 0.998998, (GLfloat) 0.030163, (GLfloat) 0.033079, + (GLfloat) - 0.998998, (GLfloat) 0.033079, (GLfloat) 0.030163, + (GLfloat) - 0.993006, (GLfloat) 0.109621, (GLfloat) 0.043834, + (GLfloat) - 0.992607, (GLfloat) 0.114709, (GLfloat) 0.039656, + (GLfloat) - 0.982944, (GLfloat) - 0.124011, (GLfloat) 0.135803, + (GLfloat) - 0.982944, (GLfloat) - 0.135802, (GLfloat) 0.124011, + (GLfloat) - 0.993006, (GLfloat) - 0.109621, (GLfloat) 0.043834, + (GLfloat) - 0.992607, (GLfloat) - 0.114709, (GLfloat) 0.039656, + (GLfloat) - 0.998998, (GLfloat) - 0.033079, (GLfloat) 0.030163, + (GLfloat) - 0.998998, (GLfloat) - 0.030163, (GLfloat) 0.033079, + (GLfloat) - 0.993006, (GLfloat) - 0.043834, (GLfloat) 0.109621, + (GLfloat) - 0.992607, (GLfloat) - 0.039656, (GLfloat) 0.114709, + (GLfloat) - 0.982944, (GLfloat) - 0.135802, (GLfloat) - 0.124011, + (GLfloat) - 0.982944, (GLfloat) - 0.124011, (GLfloat) - 0.135802, + (GLfloat) - 0.993006, (GLfloat) - 0.043834, (GLfloat) - 0.109621, + (GLfloat) - 0.992607, (GLfloat) - 0.039656, (GLfloat) - 0.114709, + (GLfloat) - 0.998998, (GLfloat) - 0.030163, (GLfloat) - 0.033079, + (GLfloat) - 0.998998, (GLfloat) - 0.033079, (GLfloat) - 0.030163, + (GLfloat) - 0.993006, (GLfloat) - 0.109621, (GLfloat) - 0.043834, + (GLfloat) - 0.992607, (GLfloat) - 0.114709, (GLfloat) - 0.039656, + (GLfloat) - 0.982944, (GLfloat) 0.124011, (GLfloat) - 0.135802, + (GLfloat) - 0.982944, (GLfloat) 0.135802, (GLfloat) - 0.124011, + (GLfloat) - 0.993006, (GLfloat) 0.109621, (GLfloat) - 0.043834, + (GLfloat) - 0.992607, (GLfloat) 0.114709, (GLfloat) - 0.039656, + (GLfloat) - 0.998998, (GLfloat) 0.033079, (GLfloat) - 0.030163, + (GLfloat) - 0.998998, (GLfloat) 0.030163, (GLfloat) - 0.033079, + (GLfloat) - 0.993006, (GLfloat) 0.043834, (GLfloat) - 0.109621, + (GLfloat) - 0.992607, (GLfloat) 0.039656, (GLfloat) - 0.114709, + (GLfloat) 0.642600, (GLfloat) 0.650149, (GLfloat) - 0.405429, + (GLfloat) 0.629315, (GLfloat) 0.651735, (GLfloat) - 0.423326, + (GLfloat) 0.650102, (GLfloat) 0.622930, (GLfloat) - 0.435116, + (GLfloat) 0.644794, (GLfloat) 0.639958, (GLfloat) - 0.417963, + (GLfloat) 0.686498, (GLfloat) 0.714292, (GLfloat) - 0.136042, + (GLfloat) 0.690339, (GLfloat) 0.711978, (GLfloat) - 0.128528, + (GLfloat) 0.670965, (GLfloat) 0.730702, (GLfloat) - 0.126017, + (GLfloat) 0.667564, (GLfloat) 0.732887, (GLfloat) - 0.131284, + (GLfloat) 0.646461, (GLfloat) 0.595725, (GLfloat) - 0.476656, + (GLfloat) 0.646365, (GLfloat) 0.610461, (GLfloat) - 0.457766, + (GLfloat) 0.713253, (GLfloat) 0.686364, (GLfloat) - 0.142034, + (GLfloat) 0.714947, (GLfloat) 0.683066, (GLfloat) - 0.149235, + (GLfloat) 0.700923, (GLfloat) 0.700421, (GLfloat) - 0.134601, + (GLfloat) 0.703355, (GLfloat) 0.696368, (GLfloat) - 0.142698, + (GLfloat) 0.650658, (GLfloat) 0.606520, (GLfloat) - 0.456922, + (GLfloat) 0.648063, (GLfloat) 0.624636, (GLfloat) - 0.435712, + (GLfloat) 0.646461, (GLfloat) 0.595725, (GLfloat) 0.476655, + (GLfloat) 0.646365, (GLfloat) 0.610461, (GLfloat) 0.457766, + (GLfloat) 0.648063, (GLfloat) 0.624636, (GLfloat) 0.435712, + (GLfloat) 0.650658, (GLfloat) 0.606520, (GLfloat) 0.456922, + (GLfloat) 0.700923, (GLfloat) 0.700421, (GLfloat) 0.134601, + (GLfloat) 0.703355, (GLfloat) 0.696368, (GLfloat) 0.142698, + (GLfloat) 0.714947, (GLfloat) 0.683066, (GLfloat) 0.149235, + (GLfloat) 0.713253, (GLfloat) 0.686364, (GLfloat) 0.142034, + (GLfloat) 0.642600, (GLfloat) 0.650149, (GLfloat) 0.405428, + (GLfloat) 0.629314, (GLfloat) 0.651735, (GLfloat) 0.423326, + (GLfloat) 0.667564, (GLfloat) 0.732887, (GLfloat) 0.131284, + (GLfloat) 0.670965, (GLfloat) 0.730702, (GLfloat) 0.126017, + (GLfloat) 0.686498, (GLfloat) 0.714292, (GLfloat) 0.136042, + (GLfloat) 0.690339, (GLfloat) 0.711978, (GLfloat) 0.128528, + (GLfloat) 0.650102, (GLfloat) 0.622930, (GLfloat) 0.435116, + (GLfloat) 0.644795, (GLfloat) 0.639958, (GLfloat) 0.417963, + (GLfloat) - 0.056496, (GLfloat) - 0.528883, (GLfloat) - 0.846813, + (GLfloat) - 0.064290, (GLfloat) - 0.519887, (GLfloat) - 0.851812, + (GLfloat) - 0.173805, (GLfloat) - 0.513816, (GLfloat) - 0.840110, + (GLfloat) - 0.175837, (GLfloat) - 0.508498, (GLfloat) - 0.842918, + (GLfloat) 0.089052, (GLfloat) - 0.185853, (GLfloat) - 0.978534, + (GLfloat) 0.093599, (GLfloat) - 0.208853, (GLfloat) - 0.973458, + (GLfloat) 0.164361, (GLfloat) - 0.176843, (GLfloat) - 0.970418, + (GLfloat) 0.176320, (GLfloat) - 0.196482, (GLfloat) - 0.964524, + (GLfloat) - 0.389065, (GLfloat) - 0.390805, (GLfloat) - 0.834206, + (GLfloat) - 0.391186, (GLfloat) - 0.409817, (GLfloat) - 0.824029, + (GLfloat) - 0.093477, (GLfloat) - 0.154476, (GLfloat) - 0.983565, + (GLfloat) - 0.093921, (GLfloat) - 0.156341, (GLfloat) - 0.983228, + (GLfloat) 0.000626, (GLfloat) - 0.183607, (GLfloat) - 0.983000, + (GLfloat) - 0.000487, (GLfloat) - 0.201385, (GLfloat) - 0.979512, + (GLfloat) - 0.285892, (GLfloat) - 0.471460, (GLfloat) - 0.834261, + (GLfloat) - 0.285514, (GLfloat) - 0.475831, (GLfloat) - 0.831905, + (GLfloat) 0.435732, (GLfloat) 0.380700, (GLfloat) - 0.815601, + (GLfloat) 0.428982, (GLfloat) 0.354155, (GLfloat) - 0.830993, + (GLfloat) 0.473609, (GLfloat) 0.392091, (GLfloat) - 0.788643, + (GLfloat) 0.469979, (GLfloat) 0.356952, (GLfloat) - 0.807283, + (GLfloat) 0.244505, (GLfloat) 0.073495, (GLfloat) - 0.966859, + (GLfloat) 0.248781, (GLfloat) 0.107298, (GLfloat) - 0.962598, + (GLfloat) 0.172068, (GLfloat) 0.089497, (GLfloat) - 0.981011, + (GLfloat) 0.177919, (GLfloat) 0.109952, (GLfloat) - 0.977883, + (GLfloat) 0.511512, (GLfloat) 0.425325, (GLfloat) - 0.746629, + (GLfloat) 0.520411, (GLfloat) 0.400470, (GLfloat) - 0.754185, + (GLfloat) 0.360534, (GLfloat) 0.109169, (GLfloat) - 0.926336, + (GLfloat) 0.349374, (GLfloat) 0.135180, (GLfloat) - 0.927181, + (GLfloat) 0.311593, (GLfloat) 0.086000, (GLfloat) - 0.946316, + (GLfloat) 0.308233, (GLfloat) 0.120081, (GLfloat) - 0.943702, + (GLfloat) 0.500412, (GLfloat) 0.409092, (GLfloat) - 0.763041, + (GLfloat) 0.503536, (GLfloat) 0.376115, (GLfloat) - 0.777811, + (GLfloat) - 0.064290, (GLfloat) - 0.519886, (GLfloat) 0.851813, + (GLfloat) - 0.056496, (GLfloat) - 0.528883, (GLfloat) 0.846813, + (GLfloat) 0.164361, (GLfloat) - 0.176843, (GLfloat) 0.970418, + (GLfloat) 0.176319, (GLfloat) - 0.196482, (GLfloat) 0.964524, + (GLfloat) 0.093599, (GLfloat) - 0.208853, (GLfloat) 0.973458, + (GLfloat) 0.089052, (GLfloat) - 0.185852, (GLfloat) 0.978534, + (GLfloat) - 0.173805, (GLfloat) - 0.513817, (GLfloat) 0.840110, + (GLfloat) - 0.175837, (GLfloat) - 0.508498, (GLfloat) 0.842918, + (GLfloat) 0.511512, (GLfloat) 0.425325, (GLfloat) 0.746629, + (GLfloat) 0.520411, (GLfloat) 0.400470, (GLfloat) 0.754186, + (GLfloat) 0.503536, (GLfloat) 0.376115, (GLfloat) 0.777810, + (GLfloat) 0.500412, (GLfloat) 0.409092, (GLfloat) 0.763041, + (GLfloat) 0.311592, (GLfloat) 0.086000, (GLfloat) 0.946316, + (GLfloat) 0.308233, (GLfloat) 0.120080, (GLfloat) 0.943702, + (GLfloat) 0.349373, (GLfloat) 0.135180, (GLfloat) 0.927181, + (GLfloat) 0.360533, (GLfloat) 0.109169, (GLfloat) 0.926336, + (GLfloat) 0.428982, (GLfloat) 0.354155, (GLfloat) 0.830993, + (GLfloat) 0.435731, (GLfloat) 0.380700, (GLfloat) 0.815602, + (GLfloat) 0.172068, (GLfloat) 0.089497, (GLfloat) 0.981011, + (GLfloat) 0.177918, (GLfloat) 0.109951, (GLfloat) 0.977883, + (GLfloat) 0.248781, (GLfloat) 0.107298, (GLfloat) 0.962598, + (GLfloat) 0.244505, (GLfloat) 0.073494, (GLfloat) 0.966859, + (GLfloat) 0.473609, (GLfloat) 0.392091, (GLfloat) 0.788643, + (GLfloat) 0.469979, (GLfloat) 0.356951, (GLfloat) 0.807283, + (GLfloat) - 0.389065, (GLfloat) - 0.390805, (GLfloat) 0.834206, + (GLfloat) - 0.391186, (GLfloat) - 0.409816, (GLfloat) 0.824029, + (GLfloat) - 0.285514, (GLfloat) - 0.475832, (GLfloat) 0.831905, + (GLfloat) - 0.285892, (GLfloat) - 0.471460, (GLfloat) 0.834261, + (GLfloat) 0.000626, (GLfloat) - 0.183607, (GLfloat) 0.983000, + (GLfloat) - 0.000486, (GLfloat) - 0.201385, (GLfloat) 0.979512, + (GLfloat) - 0.093921, (GLfloat) - 0.156340, (GLfloat) 0.983228, + (GLfloat) - 0.093477, (GLfloat) - 0.154476, (GLfloat) 0.983565, + (GLfloat) - 0.306817, (GLfloat) - 0.816247, (GLfloat) - 0.489494, + (GLfloat) - 0.306526, (GLfloat) - 0.816474, (GLfloat) - 0.489298, + (GLfloat) - 0.401007, (GLfloat) - 0.903402, (GLfloat) - 0.151850, + (GLfloat) - 0.400054, (GLfloat) - 0.903928, (GLfloat) - 0.151230, + (GLfloat) - 0.539523, (GLfloat) - 0.829080, (GLfloat) - 0.146769, + (GLfloat) - 0.536423, (GLfloat) - 0.831619, (GLfloat) - 0.143741, + (GLfloat) - 0.439125, (GLfloat) - 0.764873, (GLfloat) - 0.471315, + (GLfloat) - 0.443186, (GLfloat) - 0.759550, (GLfloat) - 0.476099, + (GLfloat) - 0.306817, (GLfloat) - 0.816247, (GLfloat) 0.489494, + (GLfloat) - 0.306526, (GLfloat) - 0.816474, (GLfloat) 0.489298, + (GLfloat) - 0.443186, (GLfloat) - 0.759550, (GLfloat) 0.476099, + (GLfloat) - 0.439125, (GLfloat) - 0.764873, (GLfloat) 0.471315, + (GLfloat) - 0.539523, (GLfloat) - 0.829080, (GLfloat) 0.146769, + (GLfloat) - 0.536423, (GLfloat) - 0.831619, (GLfloat) 0.143741, + (GLfloat) - 0.400054, (GLfloat) - 0.903928, (GLfloat) 0.151230, + (GLfloat) - 0.401007, (GLfloat) - 0.903402, (GLfloat) 0.151850, + (GLfloat) - 0.663042, (GLfloat) - 0.578347, (GLfloat) 0.475278, + (GLfloat) - 0.658558, (GLfloat) - 0.599157, (GLfloat) 0.455315, + (GLfloat) - 0.758279, (GLfloat) - 0.634927, (GLfloat) 0.147920, + (GLfloat) - 0.753882, (GLfloat) - 0.642163, (GLfloat) 0.138885, + (GLfloat) - 0.655091, (GLfloat) - 0.742671, (GLfloat) 0.138907, + (GLfloat) - 0.649182, (GLfloat) - 0.746545, (GLfloat) 0.145716, + (GLfloat) - 0.547340, (GLfloat) - 0.690985, (GLfloat) 0.472185, + (GLfloat) - 0.565022, (GLfloat) - 0.687356, (GLfloat) 0.456390, + (GLfloat) - 0.658558, (GLfloat) - 0.599157, (GLfloat) - 0.455315, + (GLfloat) - 0.663042, (GLfloat) - 0.578347, (GLfloat) - 0.475278, + (GLfloat) - 0.565022, (GLfloat) - 0.687356, (GLfloat) - 0.456390, + (GLfloat) - 0.547340, (GLfloat) - 0.690985, (GLfloat) - 0.472185, + (GLfloat) - 0.655091, (GLfloat) - 0.742671, (GLfloat) - 0.138907, + (GLfloat) - 0.649182, (GLfloat) - 0.746545, (GLfloat) - 0.145716, + (GLfloat) - 0.758279, (GLfloat) - 0.634927, (GLfloat) - 0.147920, + (GLfloat) - 0.753882, (GLfloat) - 0.642163, (GLfloat) - 0.138885, + (GLfloat) - 0.531808, (GLfloat) - 0.030854, (GLfloat) - 0.846303, + (GLfloat) - 0.547325, (GLfloat) - 0.021478, (GLfloat) - 0.836644, + (GLfloat) - 0.214400, (GLfloat) 0.129290, (GLfloat) - 0.968151, + (GLfloat) - 0.232550, (GLfloat) 0.136923, (GLfloat) - 0.962898, + (GLfloat) - 0.234685, (GLfloat) 0.079911, (GLfloat) - 0.968781, + (GLfloat) - 0.210181, (GLfloat) 0.075599, (GLfloat) - 0.974735, + (GLfloat) - 0.528653, (GLfloat) - 0.081793, (GLfloat) - 0.844888, + (GLfloat) - 0.538319, (GLfloat) - 0.109397, (GLfloat) - 0.835610, + (GLfloat) 0.375279, (GLfloat) 0.445115, (GLfloat) - 0.813043, + (GLfloat) 0.363044, (GLfloat) 0.448595, (GLfloat) - 0.816677, + (GLfloat) 0.362957, (GLfloat) 0.428038, (GLfloat) - 0.827675, + (GLfloat) 0.375627, (GLfloat) 0.426947, (GLfloat) - 0.822570, + (GLfloat) 0.060176, (GLfloat) 0.247143, (GLfloat) - 0.967109, + (GLfloat) 0.080139, (GLfloat) 0.245230, (GLfloat) - 0.966147, + (GLfloat) 0.077981, (GLfloat) 0.282100, (GLfloat) - 0.956211, + (GLfloat) 0.061364, (GLfloat) 0.287374, (GLfloat) - 0.955851, + (GLfloat) 0.394264, (GLfloat) 0.386154, (GLfloat) - 0.833931, + (GLfloat) 0.391969, (GLfloat) 0.379827, (GLfloat) - 0.837909, + (GLfloat) 0.108284, (GLfloat) 0.149184, (GLfloat) - 0.982863, + (GLfloat) 0.106809, (GLfloat) 0.145488, (GLfloat) - 0.983578, + (GLfloat) 0.087165, (GLfloat) 0.199761, (GLfloat) - 0.975960, + (GLfloat) 0.069423, (GLfloat) 0.198484, (GLfloat) - 0.977642, + (GLfloat) 0.378360, (GLfloat) 0.405238, (GLfloat) - 0.832242, + (GLfloat) 0.371158, (GLfloat) 0.404730, (GLfloat) - 0.835725, + (GLfloat) - 0.478648, (GLfloat) - 0.265386, (GLfloat) - 0.836939, + (GLfloat) - 0.486707, (GLfloat) - 0.296995, (GLfloat) - 0.821529, + (GLfloat) - 0.514523, (GLfloat) - 0.162550, (GLfloat) - 0.841929, + (GLfloat) - 0.525278, (GLfloat) - 0.195128, (GLfloat) - 0.828256, + (GLfloat) - 0.217558, (GLfloat) - 0.004195, (GLfloat) - 0.976038, + (GLfloat) - 0.206190, (GLfloat) 0.022881, (GLfloat) - 0.978244, + (GLfloat) - 0.182077, (GLfloat) - 0.080752, (GLfloat) - 0.979963, + (GLfloat) - 0.175153, (GLfloat) - 0.061621, (GLfloat) - 0.982611, + (GLfloat) - 0.843975, (GLfloat) - 0.195207, (GLfloat) - 0.499600, + (GLfloat) - 0.842535, (GLfloat) - 0.181717, (GLfloat) - 0.507064, + (GLfloat) - 0.827895, (GLfloat) - 0.272019, (GLfloat) - 0.490506, + (GLfloat) - 0.826118, (GLfloat) - 0.254451, (GLfloat) - 0.502777, + (GLfloat) - 0.933235, (GLfloat) - 0.321752, (GLfloat) - 0.159836, + (GLfloat) - 0.932223, (GLfloat) - 0.327025, (GLfloat) - 0.154968, + (GLfloat) - 0.954881, (GLfloat) - 0.249025, (GLfloat) - 0.161829, + (GLfloat) - 0.954307, (GLfloat) - 0.253099, (GLfloat) - 0.158871, + (GLfloat) - 0.754729, (GLfloat) - 0.466616, (GLfloat) - 0.461144, + (GLfloat) - 0.755670, (GLfloat) - 0.441894, (GLfloat) - 0.483419, + (GLfloat) - 0.851851, (GLfloat) - 0.501342, (GLfloat) - 0.151677, + (GLfloat) - 0.848780, (GLfloat) - 0.509248, (GLfloat) - 0.142264, + (GLfloat) - 0.902458, (GLfloat) - 0.401405, (GLfloat) - 0.156347, + (GLfloat) - 0.900638, (GLfloat) - 0.408254, (GLfloat) - 0.148931, + (GLfloat) - 0.801108, (GLfloat) - 0.337187, (GLfloat) - 0.494500, + (GLfloat) - 0.802422, (GLfloat) - 0.359565, (GLfloat) - 0.476269, + (GLfloat) - 0.754729, (GLfloat) - 0.466616, (GLfloat) 0.461144, + (GLfloat) - 0.755670, (GLfloat) - 0.441893, (GLfloat) 0.483419, + (GLfloat) - 0.802422, (GLfloat) - 0.359565, (GLfloat) 0.476269, + (GLfloat) - 0.801108, (GLfloat) - 0.337187, (GLfloat) 0.494500, + (GLfloat) - 0.902457, (GLfloat) - 0.401405, (GLfloat) 0.156348, + (GLfloat) - 0.900638, (GLfloat) - 0.408254, (GLfloat) 0.148931, + (GLfloat) - 0.848780, (GLfloat) - 0.509248, (GLfloat) 0.142264, + (GLfloat) - 0.851851, (GLfloat) - 0.501342, (GLfloat) 0.151677, + (GLfloat) - 0.842535, (GLfloat) - 0.181718, (GLfloat) 0.507064, + (GLfloat) - 0.843975, (GLfloat) - 0.195207, (GLfloat) 0.499600, + (GLfloat) - 0.954881, (GLfloat) - 0.249025, (GLfloat) 0.161829, + (GLfloat) - 0.954306, (GLfloat) - 0.253099, (GLfloat) 0.158871, + (GLfloat) - 0.932223, (GLfloat) - 0.327025, (GLfloat) 0.154968, + (GLfloat) - 0.933235, (GLfloat) - 0.321752, (GLfloat) 0.159836, + (GLfloat) - 0.827895, (GLfloat) - 0.272019, (GLfloat) 0.490506, + (GLfloat) - 0.826118, (GLfloat) - 0.254451, (GLfloat) 0.502777, + (GLfloat) - 0.547325, (GLfloat) - 0.021478, (GLfloat) 0.836644, + (GLfloat) - 0.531808, (GLfloat) - 0.030854, (GLfloat) 0.846303, + (GLfloat) - 0.538320, (GLfloat) - 0.109397, (GLfloat) 0.835610, + (GLfloat) - 0.528653, (GLfloat) - 0.081793, (GLfloat) 0.844888, + (GLfloat) - 0.210181, (GLfloat) 0.075599, (GLfloat) 0.974735, + (GLfloat) - 0.234685, (GLfloat) 0.079911, (GLfloat) 0.968781, + (GLfloat) - 0.214400, (GLfloat) 0.129290, (GLfloat) 0.968151, + (GLfloat) - 0.232550, (GLfloat) 0.136923, (GLfloat) 0.962898, + (GLfloat) - 0.486707, (GLfloat) - 0.296995, (GLfloat) 0.821529, + (GLfloat) - 0.478647, (GLfloat) - 0.265386, (GLfloat) 0.836939, + (GLfloat) - 0.182076, (GLfloat) - 0.080752, (GLfloat) 0.979963, + (GLfloat) - 0.175152, (GLfloat) - 0.061621, (GLfloat) 0.982611, + (GLfloat) - 0.206190, (GLfloat) 0.022882, (GLfloat) 0.978244, + (GLfloat) - 0.217558, (GLfloat) - 0.004194, (GLfloat) 0.976038, + (GLfloat) - 0.514523, (GLfloat) - 0.162550, (GLfloat) 0.841928, + (GLfloat) - 0.525277, (GLfloat) - 0.195127, (GLfloat) 0.828257, + (GLfloat) 0.394264, (GLfloat) 0.386154, (GLfloat) 0.833931, + (GLfloat) 0.391969, (GLfloat) 0.379827, (GLfloat) 0.837909, + (GLfloat) 0.378360, (GLfloat) 0.405238, (GLfloat) 0.832241, + (GLfloat) 0.371157, (GLfloat) 0.404730, (GLfloat) 0.835725, + (GLfloat) 0.069422, (GLfloat) 0.198484, (GLfloat) 0.977642, + (GLfloat) 0.087165, (GLfloat) 0.199761, (GLfloat) 0.975960, + (GLfloat) 0.106809, (GLfloat) 0.145488, (GLfloat) 0.983578, + (GLfloat) 0.108284, (GLfloat) 0.149183, (GLfloat) 0.982863, + (GLfloat) 0.375279, (GLfloat) 0.445115, (GLfloat) 0.813043, + (GLfloat) 0.363044, (GLfloat) 0.448594, (GLfloat) 0.816678, + (GLfloat) 0.061364, (GLfloat) 0.287374, (GLfloat) 0.955851, + (GLfloat) 0.077981, (GLfloat) 0.282099, (GLfloat) 0.956211, + (GLfloat) 0.060176, (GLfloat) 0.247143, (GLfloat) 0.967109, + (GLfloat) 0.080138, (GLfloat) 0.245229, (GLfloat) 0.966147, + (GLfloat) 0.375627, (GLfloat) 0.426947, (GLfloat) 0.822570, + (GLfloat) 0.362957, (GLfloat) 0.428038, (GLfloat) 0.827675, + (GLfloat) 0.646717, (GLfloat) 0.598054, (GLfloat) 0.473381, + (GLfloat) 0.647128, (GLfloat) 0.592930, (GLfloat) 0.479227, + (GLfloat) 0.644233, (GLfloat) 0.592287, (GLfloat) 0.483900, + (GLfloat) 0.644394, (GLfloat) 0.596473, (GLfloat) 0.478515, + (GLfloat) 0.743754, (GLfloat) 0.650774, (GLfloat) 0.152720, + (GLfloat) 0.743300, (GLfloat) 0.651663, (GLfloat) 0.151130, + (GLfloat) 0.748383, (GLfloat) 0.646124, (GLfloat) 0.149823, + (GLfloat) 0.749100, (GLfloat) 0.644879, (GLfloat) 0.151594, + (GLfloat) 0.643063, (GLfloat) 0.599196, (GLfloat) 0.476900, + (GLfloat) 0.642570, (GLfloat) 0.593487, (GLfloat) 0.484641, + (GLfloat) 0.726590, (GLfloat) 0.670731, (GLfloat) 0.148951, + (GLfloat) 0.727257, (GLfloat) 0.669291, (GLfloat) 0.152139, + (GLfloat) 0.736367, (GLfloat) 0.659214, (GLfloat) 0.152315, + (GLfloat) 0.736367, (GLfloat) 0.659216, (GLfloat) 0.152312, + (GLfloat) 0.642386, (GLfloat) 0.594552, (GLfloat) 0.483578, + (GLfloat) 0.642311, (GLfloat) 0.593780, (GLfloat) 0.484626, + (GLfloat) 0.642570, (GLfloat) 0.593487, (GLfloat) - 0.484641, + (GLfloat) 0.643063, (GLfloat) 0.599196, (GLfloat) - 0.476900, + (GLfloat) 0.642386, (GLfloat) 0.594552, (GLfloat) - 0.483577, + (GLfloat) 0.642311, (GLfloat) 0.593780, (GLfloat) - 0.484626, + (GLfloat) 0.736367, (GLfloat) 0.659216, (GLfloat) - 0.152312, + (GLfloat) 0.736367, (GLfloat) 0.659214, (GLfloat) - 0.152315, + (GLfloat) 0.726590, (GLfloat) 0.670731, (GLfloat) - 0.148951, + (GLfloat) 0.727257, (GLfloat) 0.669291, (GLfloat) - 0.152139, + (GLfloat) 0.646717, (GLfloat) 0.598054, (GLfloat) - 0.473381, + (GLfloat) 0.647128, (GLfloat) 0.592931, (GLfloat) - 0.479227, + (GLfloat) 0.749100, (GLfloat) 0.644879, (GLfloat) - 0.151594, + (GLfloat) 0.748383, (GLfloat) 0.646124, (GLfloat) - 0.149823, + (GLfloat) 0.743754, (GLfloat) 0.650774, (GLfloat) - 0.152720, + (GLfloat) 0.743300, (GLfloat) 0.651663, (GLfloat) - 0.151130, + (GLfloat) 0.644394, (GLfloat) 0.596473, (GLfloat) - 0.478515, + (GLfloat) 0.644234, (GLfloat) 0.592287, (GLfloat) - 0.483900, + (GLfloat) 0.648818, (GLfloat) 0.595244, (GLfloat) 0.474046, + (GLfloat) 0.647885, (GLfloat) 0.598960, (GLfloat) 0.470630, + (GLfloat) 0.751896, (GLfloat) 0.641953, (GLfloat) 0.150159, + (GLfloat) 0.751280, (GLfloat) 0.642895, (GLfloat) 0.149213, + (GLfloat) 0.855755, (GLfloat) 0.491872, (GLfloat) 0.160454, + (GLfloat) 0.854316, (GLfloat) 0.494902, (GLfloat) 0.158798, + (GLfloat) 0.746074, (GLfloat) 0.437172, (GLfloat) 0.502249, + (GLfloat) 0.745147, (GLfloat) 0.441097, (GLfloat) 0.500189, + (GLfloat) 0.647885, (GLfloat) 0.598960, (GLfloat) - 0.470630, + (GLfloat) 0.648818, (GLfloat) 0.595244, (GLfloat) - 0.474046, + (GLfloat) 0.746074, (GLfloat) 0.437172, (GLfloat) - 0.502249, + (GLfloat) 0.745147, (GLfloat) 0.441097, (GLfloat) - 0.500189, + (GLfloat) 0.854316, (GLfloat) 0.494902, (GLfloat) - 0.158798, + (GLfloat) 0.855755, (GLfloat) 0.491872, (GLfloat) - 0.160454, + (GLfloat) 0.751896, (GLfloat) 0.641953, (GLfloat) - 0.150159, + (GLfloat) 0.751280, (GLfloat) 0.642895, (GLfloat) - 0.149213, + (GLfloat) 0.516361, (GLfloat) - 0.831259, (GLfloat) - 0.205866, + (GLfloat) 0.500398, (GLfloat) - 0.847281, (GLfloat) - 0.178091, + (GLfloat) 0.549353, (GLfloat) - 0.832739, (GLfloat) - 0.068965, + (GLfloat) 0.539508, (GLfloat) - 0.838796, (GLfloat) - 0.073163, + (GLfloat) 0.955872, (GLfloat) - 0.254974, (GLfloat) - 0.145934, + (GLfloat) 0.962750, (GLfloat) - 0.217125, (GLfloat) - 0.161151, + (GLfloat) 0.832302, (GLfloat) - 0.349186, (GLfloat) - 0.430515, + (GLfloat) 0.834893, (GLfloat) - 0.309370, (GLfloat) - 0.455242, + (GLfloat) 0.500398, (GLfloat) - 0.847281, (GLfloat) 0.178091, + (GLfloat) 0.516361, (GLfloat) - 0.831259, (GLfloat) 0.205867, + (GLfloat) 0.832302, (GLfloat) - 0.349186, (GLfloat) 0.430515, + (GLfloat) 0.834893, (GLfloat) - 0.309369, (GLfloat) 0.455242, + (GLfloat) 0.962750, (GLfloat) - 0.217125, (GLfloat) 0.161151, + (GLfloat) 0.955872, (GLfloat) - 0.254973, (GLfloat) 0.145934, + (GLfloat) 0.539508, (GLfloat) - 0.838796, (GLfloat) 0.073163, + (GLfloat) 0.549353, (GLfloat) - 0.832739, (GLfloat) 0.068965, + (GLfloat) 0.365166, (GLfloat) 0.464177, (GLfloat) - 0.806966, + (GLfloat) 0.373210, (GLfloat) 0.459657, (GLfloat) - 0.805872, + (GLfloat) 0.064151, (GLfloat) 0.318725, (GLfloat) - 0.945674, + (GLfloat) 0.075117, (GLfloat) 0.311589, (GLfloat) - 0.947243, + (GLfloat) 0.127864, (GLfloat) 0.159455, (GLfloat) - 0.978890, + (GLfloat) 0.122956, (GLfloat) 0.165169, (GLfloat) - 0.978571, + (GLfloat) 0.446081, (GLfloat) 0.299065, (GLfloat) - 0.843547, + (GLfloat) 0.442539, (GLfloat) 0.302925, (GLfloat) - 0.844035, + (GLfloat) - 0.541197, (GLfloat) 0.047754, (GLfloat) - 0.839539, + (GLfloat) - 0.545743, (GLfloat) 0.029212, (GLfloat) - 0.837443, + (GLfloat) - 0.504199, (GLfloat) - 0.116458, (GLfloat) - 0.855699, + (GLfloat) - 0.503751, (GLfloat) - 0.117103, (GLfloat) - 0.855875, + (GLfloat) - 0.180218, (GLfloat) 0.028848, (GLfloat) - 0.983203, + (GLfloat) - 0.179757, (GLfloat) 0.028254, (GLfloat) - 0.983305, + (GLfloat) - 0.230218, (GLfloat) 0.184662, (GLfloat) - 0.955458, + (GLfloat) - 0.218138, (GLfloat) 0.174858, (GLfloat) - 0.960125, + (GLfloat) 0.043553, (GLfloat) - 0.957947, (GLfloat) - 0.283621, + (GLfloat) 0.073317, (GLfloat) - 0.961717, (GLfloat) - 0.264055, + (GLfloat) 0.178370, (GLfloat) - 0.932145, (GLfloat) - 0.315104, + (GLfloat) 0.175170, (GLfloat) - 0.936420, (GLfloat) - 0.304029, + (GLfloat) 0.021724, (GLfloat) - 0.600335, (GLfloat) - 0.799453, + (GLfloat) - 0.006371, (GLfloat) - 0.568607, (GLfloat) - 0.822585, + (GLfloat) - 0.212402, (GLfloat) - 0.727671, (GLfloat) - 0.652212, + (GLfloat) - 0.248701, (GLfloat) - 0.700487, (GLfloat) - 0.668929, + (GLfloat) 0.430757, (GLfloat) - 0.866899, (GLfloat) - 0.250869, + (GLfloat) 0.427975, (GLfloat) - 0.857309, (GLfloat) - 0.286110, + (GLfloat) 0.561354, (GLfloat) - 0.442015, (GLfloat) - 0.699646, + (GLfloat) 0.571558, (GLfloat) - 0.412112, (GLfloat) - 0.709567, + (GLfloat) 0.286734, (GLfloat) - 0.470609, (GLfloat) - 0.834453, + (GLfloat) 0.281923, (GLfloat) - 0.498471, (GLfloat) - 0.819784, + (GLfloat) 0.316508, (GLfloat) - 0.898548, (GLfloat) - 0.304029, + (GLfloat) 0.311600, (GLfloat) - 0.896446, (GLfloat) - 0.315104, + (GLfloat) - 0.857077, (GLfloat) - 0.113037, (GLfloat) - 0.502635, + (GLfloat) - 0.855920, (GLfloat) - 0.100677, (GLfloat) - 0.507214, + (GLfloat) - 0.973550, (GLfloat) - 0.162756, (GLfloat) - 0.160346, + (GLfloat) - 0.972585, (GLfloat) - 0.166359, (GLfloat) - 0.162491, + (GLfloat) - 0.942363, (GLfloat) - 0.290210, (GLfloat) - 0.166522, + (GLfloat) - 0.940343, (GLfloat) - 0.298398, (GLfloat) - 0.163441, + (GLfloat) - 0.819387, (GLfloat) - 0.257298, (GLfloat) - 0.512252, + (GLfloat) - 0.820563, (GLfloat) - 0.245585, (GLfloat) - 0.516105, + (GLfloat) - 0.857077, (GLfloat) - 0.113037, (GLfloat) 0.502635, + (GLfloat) - 0.855920, (GLfloat) - 0.100677, (GLfloat) 0.507214, + (GLfloat) - 0.820564, (GLfloat) - 0.245585, (GLfloat) 0.516104, + (GLfloat) - 0.819387, (GLfloat) - 0.257297, (GLfloat) 0.512252, + (GLfloat) - 0.942363, (GLfloat) - 0.290210, (GLfloat) 0.166522, + (GLfloat) - 0.940343, (GLfloat) - 0.298398, (GLfloat) 0.163441, + (GLfloat) - 0.973550, (GLfloat) - 0.162756, (GLfloat) 0.160346, + (GLfloat) - 0.972585, (GLfloat) - 0.166359, (GLfloat) 0.162491, + (GLfloat) - 0.031552, (GLfloat) - 0.978072, (GLfloat) 0.205866, + (GLfloat) - 0.009717, (GLfloat) - 0.983966, (GLfloat) 0.178091, + (GLfloat) - 0.059383, (GLfloat) - 0.995850, (GLfloat) 0.068965, + (GLfloat) - 0.047830, (GLfloat) - 0.996172, (GLfloat) 0.073163, + (GLfloat) - 0.608137, (GLfloat) - 0.782136, (GLfloat) 0.135767, + (GLfloat) - 0.575039, (GLfloat) - 0.805344, (GLfloat) 0.144053, + (GLfloat) - 0.440882, (GLfloat) - 0.803158, (GLfloat) 0.400699, + (GLfloat) - 0.474682, (GLfloat) - 0.782654, (GLfloat) 0.402654, + (GLfloat) - 0.009717, (GLfloat) - 0.983966, (GLfloat) - 0.178092, + (GLfloat) - 0.031552, (GLfloat) - 0.978072, (GLfloat) - 0.205866, + (GLfloat) - 0.474681, (GLfloat) - 0.782654, (GLfloat) - 0.402654, + (GLfloat) - 0.440881, (GLfloat) - 0.803159, (GLfloat) - 0.400699, + (GLfloat) - 0.608137, (GLfloat) - 0.782136, (GLfloat) - 0.135767, + (GLfloat) - 0.575039, (GLfloat) - 0.805344, (GLfloat) - 0.144053, + (GLfloat) - 0.047830, (GLfloat) - 0.996172, (GLfloat) - 0.073163, + (GLfloat) - 0.059383, (GLfloat) - 0.995850, (GLfloat) - 0.068965, + (GLfloat) - 0.545743, (GLfloat) 0.029212, (GLfloat) 0.837443, + (GLfloat) - 0.541197, (GLfloat) 0.047754, (GLfloat) 0.839539, + (GLfloat) - 0.218137, (GLfloat) 0.174858, (GLfloat) 0.960125, + (GLfloat) - 0.230218, (GLfloat) 0.184662, (GLfloat) 0.955458, + (GLfloat) - 0.180219, (GLfloat) 0.028850, (GLfloat) 0.983203, + (GLfloat) - 0.179757, (GLfloat) 0.028256, (GLfloat) 0.983305, + (GLfloat) - 0.503751, (GLfloat) - 0.117102, (GLfloat) 0.855875, + (GLfloat) - 0.504199, (GLfloat) - 0.116456, (GLfloat) 0.855699, + (GLfloat) 0.373209, (GLfloat) 0.459657, (GLfloat) 0.805872, + (GLfloat) 0.365166, (GLfloat) 0.464177, (GLfloat) 0.806966, + (GLfloat) 0.446081, (GLfloat) 0.299065, (GLfloat) 0.843547, + (GLfloat) 0.442539, (GLfloat) 0.302926, (GLfloat) 0.844035, + (GLfloat) 0.122955, (GLfloat) 0.165170, (GLfloat) 0.978571, + (GLfloat) 0.127864, (GLfloat) 0.159456, (GLfloat) 0.978889, + (GLfloat) 0.064151, (GLfloat) 0.318724, (GLfloat) 0.945674, + (GLfloat) 0.075117, (GLfloat) 0.311589, (GLfloat) 0.947243, + (GLfloat) 0.430757, (GLfloat) - 0.866899, (GLfloat) 0.250868, + (GLfloat) 0.427975, (GLfloat) - 0.857309, (GLfloat) 0.286110, + (GLfloat) 0.311600, (GLfloat) - 0.896446, (GLfloat) 0.315104, + (GLfloat) 0.316508, (GLfloat) - 0.898548, (GLfloat) 0.304029, + (GLfloat) 0.281923, (GLfloat) - 0.498471, (GLfloat) 0.819784, + (GLfloat) 0.286734, (GLfloat) - 0.470608, (GLfloat) 0.834453, + (GLfloat) 0.561354, (GLfloat) - 0.442014, (GLfloat) 0.699647, + (GLfloat) 0.571558, (GLfloat) - 0.412112, (GLfloat) 0.709567, + (GLfloat) 0.073318, (GLfloat) - 0.961717, (GLfloat) 0.264055, + (GLfloat) 0.043553, (GLfloat) - 0.957947, (GLfloat) 0.283620, + (GLfloat) - 0.212402, (GLfloat) - 0.727670, (GLfloat) 0.652213, + (GLfloat) - 0.248701, (GLfloat) - 0.700487, (GLfloat) 0.668929, + (GLfloat) - 0.006371, (GLfloat) - 0.568606, (GLfloat) 0.822585, + (GLfloat) 0.021725, (GLfloat) - 0.600335, (GLfloat) 0.799453, + (GLfloat) 0.175170, (GLfloat) - 0.936420, (GLfloat) 0.304028, + (GLfloat) 0.178370, (GLfloat) - 0.932145, (GLfloat) 0.315104, + (GLfloat) 0.385580, (GLfloat) - 0.914303, (GLfloat) - 0.124011, + (GLfloat) 0.374190, (GLfloat) - 0.917355, (GLfloat) - 0.135802, + (GLfloat) 0.299349, (GLfloat) - 0.947826, (GLfloat) - 0.109621, + (GLfloat) 0.295210, (GLfloat) - 0.948521, (GLfloat) - 0.114709, + (GLfloat) 0.287695, (GLfloat) - 0.957151, (GLfloat) - 0.033079, + (GLfloat) 0.290512, (GLfloat) - 0.956396, (GLfloat) - 0.030163, + (GLfloat) 0.362895, (GLfloat) - 0.930799, (GLfloat) - 0.043834, + (GLfloat) 0.367706, (GLfloat) - 0.929096, (GLfloat) - 0.039656, + (GLfloat) 0.134619, (GLfloat) - 0.981547, (GLfloat) - 0.135802, + (GLfloat) 0.123230, (GLfloat) - 0.984599, (GLfloat) - 0.124011, + (GLfloat) 0.151123, (GLfloat) - 0.987543, (GLfloat) - 0.043834, + (GLfloat) 0.146105, (GLfloat) - 0.988474, (GLfloat) - 0.039656, + (GLfloat) 0.226607, (GLfloat) - 0.973519, (GLfloat) - 0.030163, + (GLfloat) 0.229424, (GLfloat) - 0.972764, (GLfloat) - 0.033079, + (GLfloat) 0.214669, (GLfloat) - 0.970516, (GLfloat) - 0.109621, + (GLfloat) 0.218601, (GLfloat) - 0.969049, (GLfloat) - 0.114709, + (GLfloat) 0.123230, (GLfloat) - 0.984599, (GLfloat) 0.124011, + (GLfloat) 0.134619, (GLfloat) - 0.981547, (GLfloat) 0.135802, + (GLfloat) 0.214669, (GLfloat) - 0.970516, (GLfloat) 0.109621, + (GLfloat) 0.218601, (GLfloat) - 0.969049, (GLfloat) 0.114709, + (GLfloat) 0.229424, (GLfloat) - 0.972764, (GLfloat) 0.033079, + (GLfloat) 0.226607, (GLfloat) - 0.973519, (GLfloat) 0.030163, + (GLfloat) 0.151123, (GLfloat) - 0.987543, (GLfloat) 0.043834, + (GLfloat) 0.146105, (GLfloat) - 0.988474, (GLfloat) 0.039656, + (GLfloat) 0.374190, (GLfloat) - 0.917355, (GLfloat) 0.135803, + (GLfloat) 0.385580, (GLfloat) - 0.914303, (GLfloat) 0.124011, + (GLfloat) 0.362895, (GLfloat) - 0.930799, (GLfloat) 0.043834, + (GLfloat) 0.367706, (GLfloat) - 0.929096, (GLfloat) 0.039656, + (GLfloat) 0.290512, (GLfloat) - 0.956396, (GLfloat) 0.030163, + (GLfloat) 0.287695, (GLfloat) - 0.957151, (GLfloat) 0.033079, + (GLfloat) 0.299349, (GLfloat) - 0.947826, (GLfloat) 0.109621, + (GLfloat) 0.295210, (GLfloat) - 0.948521, (GLfloat) 0.114709, +}; + +static unsigned short int s1_5_POLS[] = +{ + 3, 12, 76, 74, 1, 3, 12, 74, 82, 1, 3, 76, 22, 78, 1, 3, 78, 74, 76, 1, + 3, 20, 80, 74, 1, 3, 20, 74, 78, 1, 3, 80, 28, 82, 1, 3, 82, 74, 80, 1, + 3, 13, 84, 77, 1, 3, 13, 77, 88, 1, 3, 84, 24, 86, 1, 3, 86, 77, 84, 1, + 3, 20, 78, 77, 1, 3, 20, 77, 86, 1, 3, 78, 22, 88, 1, 3, 88, 77, 78, 1, + 3, 14, 90, 85, 1, 3, 14, 85, 93, 1, 3, 26, 91, 85, 1, 3, 26, 85, 90, 1, + 3, 20, 86, 85, 1, 3, 20, 85, 91, 1, 3, 86, 24, 93, 1, 3, 93, 85, 86, 1, + 3, 15, 95, 79, 1, 3, 15, 79, 97, 1, 3, 95, 28, 80, 1, 3, 80, 79, 95, 1, + 3, 20, 91, 79, 1, 3, 20, 79, 80, 1, 3, 26, 97, 79, 1, 3, 26, 79, 91, 1, + 3, 13, 99, 83, 1, 3, 13, 83, 84, 1, 3, 99, 30, 101, 1, 3, 101, 83, 99, 1, + 3, 23, 102, 83, 1, 3, 23, 83, 101, 1, 3, 102, 24, 84, 1, 3, 84, 83, 102, 1, + 3, 108, 16, 104, 1, 3, 104, 100, 108, 1, 3, 32, 106, 100, 1, 3, 32, 100, 104, 1, + 3, 106, 23, 101, 1, 3, 101, 100, 106, 1, 3, 30, 108, 100, 1, 3, 30, 100, 101, 1, + 3, 17, 110, 105, 1, 3, 17, 105, 113, 1, 3, 33, 111, 105, 1, 3, 33, 105, 110, 1, + 3, 23, 106, 105, 1, 3, 23, 105, 111, 1, 3, 106, 32, 113, 1, 3, 113, 105, 106, 1, + 3, 14, 93, 92, 1, 3, 14, 92, 114, 1, 3, 93, 24, 102, 1, 3, 102, 92, 93, 1, +3, 102, 23, 111, 1, 3, 111, 92, 102, 1, 3, 33, 114, 92, 1, 3, 33, 92, 111, 1, + 3, 16, 116, 103, 1, 3, 16, 103, 104, 1, 3, 116, 35, 118, 1, 3, 118, 103, 116, 1, + 3, 31, 119, 103, 1, 3, 31, 103, 118, 1, 3, 119, 32, 104, 1, 3, 104, 103, 119, 1, + 3, 18, 121, 117, 1, 3, 18, 117, 125, 1, 3, 121, 36, 123, 1, 3, 123, 117, 121, 1, + 3, 31, 118, 117, 1, 3, 31, 117, 123, 1, 3, 118, 35, 125, 1, 3, 125, 117, 118, 1, + 3, 19, 127, 122, 1, 3, 19, 122, 130, 1, 3, 37, 128, 122, 1, 3, 37, 122, 127, 1, + 3, 31, 123, 122, 1, 3, 31, 122, 128, 1, 3, 36, 130, 122, 1, 3, 36, 122, 123, 1, + 3, 17, 113, 112, 1, 3, 17, 112, 131, 1, 3, 32, 119, 112, 1, 3, 32, 112, 113, 1, + 3, 31, 128, 112, 1, 3, 31, 112, 119, 1, 3, 37, 131, 112, 1, 3, 37, 112, 128, 1, + 3, 121, 18, 133, 1, 3, 133, 120, 121, 1, 3, 39, 134, 120, 1, 3, 39, 120, 133, 1, + 3, 134, 27, 135, 1, 3, 135, 120, 134, 1, 3, 36, 121, 120, 1, 3, 36, 120, 135, 1, + 3, 12, 82, 81, 1, 3, 12, 81, 138, 1, 3, 82, 28, 136, 1, 3, 136, 81, 82, 1, +3, 27, 134, 81, 1, 3, 27, 81, 136, 1, 3, 134, 39, 138, 1, 3, 138, 81, 134, 1, + 3, 15, 139, 94, 1, 3, 15, 94, 95, 1, 3, 40, 140, 94, 1, 3, 40, 94, 139, 1, +3, 140, 27, 136, 1, 3, 136, 94, 140, 1, 3, 136, 28, 95, 1, 3, 95, 94, 136, 1, + 3, 19, 130, 129, 1, 3, 19, 129, 141, 1, 3, 130, 36, 135, 1, 3, 135, 129, 130, 1, + 3, 27, 140, 129, 1, 3, 27, 129, 135, 1, 3, 40, 141, 129, 1, 3, 40, 129, 140, 1, + 3, 14, 114, 89, 1, 3, 14, 89, 90, 1, 3, 114, 33, 142, 1, 3, 142, 89, 114, 1, + 3, 25, 143, 89, 1, 3, 25, 89, 142, 1, 3, 143, 26, 90, 1, 3, 90, 89, 143, 1, + 3, 17, 131, 109, 1, 3, 17, 109, 110, 1, 3, 131, 37, 144, 1, 3, 144, 109, 131, 1, + 3, 25, 142, 109, 1, 3, 25, 109, 144, 1, 3, 142, 33, 110, 1, 3, 110, 109, 142, 1, + 3, 19, 141, 126, 1, 3, 19, 126, 127, 1, 3, 141, 40, 145, 1, 3, 145, 126, 141, 1, + 3, 25, 144, 126, 1, 3, 25, 126, 145, 1, 3, 144, 37, 127, 1, 3, 127, 126, 144, 1, + 3, 15, 97, 96, 1, 3, 15, 96, 139, 1, 3, 97, 26, 143, 1, 3, 143, 96, 97, 1, +3, 25, 145, 96, 1, 3, 25, 96, 143, 1, 3, 145, 40, 139, 1, 3, 139, 96, 145, 1, +3, 76, 12, 146, 1, 3, 146, 75, 76, 1, 3, 146, 41, 148, 1, 3, 148, 75, 146, 1, + 3, 148, 21, 149, 1, 3, 149, 75, 148, 1, 3, 22, 76, 75, 1, 3, 22, 75, 149, 1, + 3, 155, 8, 151, 1, 3, 151, 147, 155, 1, 3, 43, 153, 147, 1, 3, 43, 147, 151, 1, + 3, 153, 21, 148, 1, 3, 148, 147, 153, 1, 3, 41, 155, 147, 1, 3, 41, 147, 148, 1, + 3, 160, 11, 157, 1, 3, 157, 152, 160, 1, 3, 44, 158, 152, 1, 3, 44, 152, 157, 1, + 3, 158, 21, 153, 1, 3, 153, 152, 158, 1, 3, 43, 160, 152, 1, 3, 43, 152, 153, 1, + 3, 161, 13, 88, 1, 3, 88, 87, 161, 1, 3, 22, 149, 87, 1, 3, 22, 87, 88, 1, + 3, 149, 21, 158, 1, 3, 158, 87, 149, 1, 3, 158, 44, 161, 1, 3, 161, 87, 158, 1, + 3, 18, 162, 132, 1, 3, 18, 132, 133, 1, 3, 162, 45, 164, 1, 3, 164, 132, 162, 1, + 3, 38, 165, 132, 1, 3, 38, 132, 164, 1, 3, 165, 39, 133, 1, 3, 133, 132, 165, 1, + 3, 170, 9, 167, 1, 3, 167, 163, 170, 1, 3, 47, 168, 163, 1, 3, 47, 163, 167, 1, + 3, 168, 38, 164, 1, 3, 164, 163, 168, 1, 3, 45, 170, 163, 1, 3, 45, 163, 164, 1, +3, 8, 155, 154, 1, 3, 8, 154, 173, 1, 3, 155, 41, 171, 1, 3, 171, 154, 155, 1, + 3, 38, 168, 154, 1, 3, 38, 154, 171, 1, 3, 168, 47, 173, 1, 3, 173, 154, 168, 1, + 3, 146, 12, 138, 1, 3, 138, 137, 146, 1, 3, 39, 165, 137, 1, 3, 39, 137, 138, 1, + 3, 165, 38, 171, 1, 3, 171, 137, 165, 1, 3, 41, 146, 137, 1, 3, 41, 137, 171, 1, + 3, 16, 108, 107, 1, 3, 16, 107, 177, 1, 3, 108, 30, 174, 1, 3, 174, 107, 108, 1, + 3, 29, 176, 107, 1, 3, 29, 107, 174, 1, 3, 176, 50, 177, 1, 3, 177, 107, 176, 1, + 3, 99, 13, 161, 1, 3, 161, 98, 99, 1, 3, 44, 178, 98, 1, 3, 44, 98, 161, 1, + 3, 178, 29, 174, 1, 3, 174, 98, 178, 1, 3, 30, 99, 98, 1, 3, 30, 98, 174, 1, + 3, 11, 180, 156, 1, 3, 11, 156, 157, 1, 3, 180, 49, 181, 1, 3, 181, 156, 180, 1, + 3, 29, 178, 156, 1, 3, 29, 156, 181, 1, 3, 178, 44, 157, 1, 3, 157, 156, 178, 1, + 3, 185, 10, 183, 1, 3, 183, 175, 185, 1, 3, 50, 176, 175, 1, 3, 50, 175, 183, 1, + 3, 176, 29, 181, 1, 3, 181, 175, 176, 1, 3, 49, 185, 175, 1, 3, 49, 175, 181, 1, + 3, 162, 18, 125, 1, 3, 125, 124, 162, 1, 3, 35, 186, 124, 1, 3, 35, 124, 125, 1, + 3, 186, 34, 187, 1, 3, 187, 124, 186, 1, 3, 45, 162, 124, 1, 3, 45, 124, 187, 1, + 3, 116, 16, 177, 1, 3, 177, 115, 116, 1, 3, 50, 188, 115, 1, 3, 50, 115, 177, 1, + 3, 188, 34, 186, 1, 3, 186, 115, 188, 1, 3, 35, 116, 115, 1, 3, 35, 115, 186, 1, + 3, 10, 190, 182, 1, 3, 10, 182, 183, 1, 3, 190, 52, 191, 1, 3, 191, 182, 190, 1, + 3, 191, 34, 188, 1, 3, 188, 182, 191, 1, 3, 50, 183, 182, 1, 3, 50, 182, 188, 1, +3, 9, 170, 169, 1, 3, 9, 169, 193, 1, 3, 45, 187, 169, 1, 3, 45, 169, 170, 1, + 3, 187, 34, 191, 1, 3, 191, 169, 187, 1, 3, 191, 52, 193, 1, 3, 193, 169, 191, 1, +3, 1, 196, 194, 1, 3, 1, 194, 201, 1, 3, 196, 54, 198, 1, 3, 198, 194, 196, 1, + 3, 46, 199, 194, 1, 3, 46, 194, 198, 1, 3, 56, 201, 194, 1, 3, 56, 194, 199, 1, + 3, 206, 3, 203, 1, 3, 203, 197, 206, 1, 3, 55, 204, 197, 1, 3, 55, 197, 203, 1, + 3, 204, 46, 198, 1, 3, 198, 197, 204, 1, 3, 54, 206, 197, 1, 3, 54, 197, 198, 1, + 3, 208, 8, 173, 1, 3, 173, 172, 208, 1, 3, 47, 207, 172, 1, 3, 47, 172, 173, 1, + 3, 46, 204, 172, 1, 3, 46, 172, 207, 1, 3, 204, 55, 208, 1, 3, 208, 172, 204, 1, +3, 9, 209, 166, 1, 3, 9, 166, 167, 1, 3, 209, 56, 199, 1, 3, 199, 166, 209, 1, + 3, 46, 207, 166, 1, 3, 46, 166, 199, 1, 3, 207, 47, 167, 1, 3, 167, 166, 207, 1, +3, 1, 201, 200, 1, 3, 1, 200, 214, 1, 3, 201, 56, 210, 1, 3, 210, 200, 201, 1, + 3, 51, 212, 200, 1, 3, 51, 200, 210, 1, 3, 212, 59, 214, 1, 3, 214, 200, 212, 1, + 3, 209, 9, 193, 1, 3, 193, 192, 209, 1, 3, 52, 215, 192, 1, 3, 52, 192, 193, 1, + 3, 215, 51, 210, 1, 3, 210, 192, 215, 1, 3, 192, 210, 56, 1, 3, 56, 209, 192, 1, + 3, 190, 10, 216, 1, 3, 216, 189, 190, 1, 3, 189, 216, 57, 1, 3, 57, 217, 189, 1, + 3, 217, 51, 215, 1, 3, 215, 189, 217, 1, 3, 52, 190, 189, 1, 3, 52, 189, 215, 1, +3, 0, 219, 211, 1, 3, 0, 211, 221, 1, 3, 219, 59, 212, 1, 3, 212, 211, 219, 1, + 3, 51, 217, 211, 1, 3, 51, 211, 212, 1, 3, 217, 57, 221, 1, 3, 221, 211, 217, 1, +3, 0, 221, 220, 1, 3, 0, 220, 226, 1, 3, 57, 222, 220, 1, 3, 57, 220, 221, 1, + 3, 48, 224, 220, 1, 3, 48, 220, 222, 1, 3, 224, 62, 226, 1, 3, 226, 220, 224, 1, + 3, 10, 185, 184, 1, 3, 10, 184, 216, 1, 3, 185, 49, 227, 1, 3, 227, 184, 185, 1, + 3, 48, 222, 184, 1, 3, 48, 184, 227, 1, 3, 222, 57, 216, 1, 3, 216, 184, 222, 1, + 3, 180, 11, 228, 1, 3, 228, 179, 180, 1, 3, 228, 60, 229, 1, 3, 229, 179, 228, 1, + 3, 48, 227, 179, 1, 3, 48, 179, 229, 1, 3, 49, 180, 179, 1, 3, 49, 179, 227, 1, + 3, 233, 2, 231, 1, 3, 231, 223, 233, 1, 3, 62, 224, 223, 1, 3, 62, 223, 231, 1, + 3, 224, 48, 229, 1, 3, 229, 223, 224, 1, 3, 60, 233, 223, 1, 3, 60, 223, 229, 1, + 3, 237, 2, 233, 1, 3, 233, 232, 237, 1, 3, 60, 234, 232, 1, 3, 60, 232, 233, 1, + 3, 234, 42, 235, 1, 3, 235, 232, 234, 1, 3, 64, 237, 232, 1, 3, 64, 232, 235, 1, + 3, 11, 160, 159, 1, 3, 11, 159, 228, 1, 3, 160, 43, 238, 1, 3, 238, 159, 160, 1, + 3, 42, 234, 159, 1, 3, 42, 159, 238, 1, 3, 234, 60, 228, 1, 3, 228, 159, 234, 1, +3, 8, 208, 150, 1, 3, 8, 150, 151, 1, 3, 208, 55, 239, 1, 3, 239, 150, 208, 1, + 3, 42, 238, 150, 1, 3, 42, 150, 239, 1, 3, 238, 43, 151, 1, 3, 151, 150, 238, 1, + 3, 203, 3, 241, 1, 3, 241, 202, 203, 1, 3, 64, 235, 202, 1, 3, 64, 202, 241, 1, + 3, 235, 42, 239, 1, 3, 239, 202, 235, 1, 3, 55, 203, 202, 1, 3, 55, 202, 239, 1, +3, 2, 237, 236, 1, 3, 2, 236, 245, 1, 3, 237, 64, 242, 1, 3, 242, 236, 237, 1, + 3, 63, 244, 236, 1, 3, 63, 236, 242, 1, 3, 244, 68, 245, 1, 3, 245, 236, 244, 1, +3, 3, 246, 240, 1, 3, 3, 240, 241, 1, 3, 246, 65, 248, 1, 3, 248, 240, 246, 1, + 3, 63, 242, 240, 1, 3, 63, 240, 248, 1, 3, 242, 64, 241, 1, 3, 241, 240, 242, 1, +3, 4, 250, 247, 1, 3, 4, 247, 253, 1, 3, 67, 251, 247, 1, 3, 67, 247, 250, 1, + 3, 63, 248, 247, 1, 3, 63, 247, 251, 1, 3, 248, 65, 253, 1, 3, 253, 247, 248, 1, +3, 7, 255, 243, 1, 3, 7, 243, 257, 1, 3, 255, 68, 244, 1, 3, 244, 243, 255, 1, + 3, 63, 251, 243, 1, 3, 63, 243, 244, 1, 3, 67, 257, 243, 1, 3, 67, 243, 251, 1, +3, 3, 206, 205, 1, 3, 3, 205, 246, 1, 3, 206, 54, 258, 1, 3, 258, 205, 206, 1, + 3, 53, 259, 205, 1, 3, 53, 205, 258, 1, 3, 259, 65, 246, 1, 3, 246, 205, 259, 1, +3, 1, 260, 195, 1, 3, 1, 195, 196, 1, 3, 69, 262, 195, 1, 3, 69, 195, 260, 1, + 3, 262, 53, 258, 1, 3, 258, 195, 262, 1, 3, 54, 196, 195, 1, 3, 54, 195, 258, 1, +3, 5, 264, 261, 1, 3, 5, 261, 267, 1, 3, 70, 265, 261, 1, 3, 70, 261, 264, 1, + 3, 53, 262, 261, 1, 3, 53, 261, 265, 1, 3, 262, 69, 267, 1, 3, 267, 261, 262, 1, + 3, 268, 4, 253, 1, 3, 253, 252, 268, 1, 3, 253, 65, 259, 1, 3, 259, 252, 253, 1, + 3, 53, 265, 252, 1, 3, 53, 252, 259, 1, 3, 70, 268, 252, 1, 3, 70, 252, 265, 1, + 3, 260, 1, 214, 1, 3, 214, 213, 260, 1, 3, 214, 59, 269, 1, 3, 269, 213, 214, 1, + 3, 269, 58, 270, 1, 3, 270, 213, 269, 1, 3, 69, 260, 213, 1, 3, 69, 213, 270, 1, + 3, 219, 0, 271, 1, 3, 271, 218, 219, 1, 3, 71, 273, 218, 1, 3, 71, 218, 271, 1, + 3, 273, 58, 269, 1, 3, 269, 218, 273, 1, 3, 269, 59, 219, 1, 3, 219, 218, 269, 1, +3, 6, 275, 272, 1, 3, 6, 272, 278, 1, 3, 72, 276, 272, 1, 3, 72, 272, 275, 1, + 3, 276, 58, 273, 1, 3, 273, 272, 276, 1, 3, 71, 278, 272, 1, 3, 71, 272, 273, 1, +3, 5, 267, 266, 1, 3, 5, 266, 279, 1, 3, 69, 270, 266, 1, 3, 69, 266, 267, 1, + 3, 270, 58, 276, 1, 3, 276, 266, 270, 1, 3, 72, 279, 266, 1, 3, 72, 266, 276, 1, +3, 0, 226, 225, 1, 3, 0, 225, 271, 1, 3, 62, 280, 225, 1, 3, 62, 225, 226, 1, + 3, 280, 61, 281, 1, 3, 281, 225, 280, 1, 3, 71, 271, 225, 1, 3, 71, 225, 281, 1, +3, 2, 245, 230, 1, 3, 2, 230, 231, 1, 3, 245, 68, 282, 1, 3, 282, 230, 245, 1, + 3, 61, 280, 230, 1, 3, 61, 230, 282, 1, 3, 280, 62, 231, 1, 3, 231, 230, 280, 1, + 3, 255, 7, 283, 1, 3, 283, 254, 255, 1, 3, 73, 284, 254, 1, 3, 73, 254, 283, 1, + 3, 61, 282, 254, 1, 3, 61, 254, 284, 1, 3, 282, 68, 255, 1, 3, 255, 254, 282, 1, +3, 6, 278, 277, 1, 3, 6, 277, 285, 1, 3, 278, 71, 281, 1, 3, 281, 277, 278, 1, + 3, 61, 284, 277, 1, 3, 61, 277, 281, 1, 3, 73, 285, 277, 1, 3, 73, 277, 284, 1, +3, 4, 268, 249, 1, 3, 4, 249, 250, 1, 3, 268, 70, 286, 1, 3, 286, 249, 268, 1, + 3, 66, 287, 249, 1, 3, 66, 249, 286, 1, 3, 287, 67, 250, 1, 3, 250, 249, 287, 1, +3, 5, 279, 263, 1, 3, 5, 263, 264, 1, 3, 279, 72, 288, 1, 3, 288, 263, 279, 1, + 3, 66, 286, 263, 1, 3, 66, 263, 288, 1, 3, 286, 70, 264, 1, 3, 264, 263, 286, 1, +3, 6, 285, 274, 1, 3, 6, 274, 275, 1, 3, 285, 73, 289, 1, 3, 289, 274, 285, 1, + 3, 66, 288, 274, 1, 3, 66, 274, 289, 1, 3, 288, 72, 275, 1, 3, 275, 274, 288, 1, +3, 7, 257, 256, 1, 3, 7, 256, 283, 1, 3, 257, 67, 287, 1, 3, 287, 256, 257, 1, + 3, 66, 289, 256, 1, 3, 66, 256, 287, 1, 3, 289, 73, 283, 1, 3, 283, 256, 289, 1, + + 0 +}; + +struct lwo LWO_s1_5 = +{ + 290, /* number of points */ + s1_5_PNTS, s1_5_normals, s1_5_POLS, 0L +}; + +#endif /* USE_GL */ + +/* End of s1_5.c */ diff --git a/hacks/glx/s1_6.c b/hacks/glx/s1_6.c new file mode 100644 index 00000000..7a31fe09 --- /dev/null +++ b/hacks/glx/s1_6.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_6.c 4.2 97/04/20 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render "s1_6" in 3D. + * + * Generated by lw2ogl. Link this with your program but do + * not edit by hand. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat s1_6_PNTS[] = +{ + (GLfloat) 1.339151, (GLfloat) - 0.510672, (GLfloat) - 0.339151, + (GLfloat) 1.339151, (GLfloat) - 0.510672, (GLfloat) - 0.660849, + (GLfloat) 1.660849, (GLfloat) - 0.510672, (GLfloat) - 0.339151, + (GLfloat) 1.660849, (GLfloat) - 0.510672, (GLfloat) - 0.660849, + (GLfloat) 1.638667, (GLfloat) - 0.642463, (GLfloat) - 0.638667, + (GLfloat) 1.361333, (GLfloat) - 0.642463, (GLfloat) - 0.638667, + (GLfloat) 1.361333, (GLfloat) - 0.642463, (GLfloat) - 0.361333, + (GLfloat) 1.638667, (GLfloat) - 0.642463, (GLfloat) - 0.361333, + (GLfloat) 1.589301, (GLfloat) - 0.085107, (GLfloat) - 0.624049, + (GLfloat) 1.356947, (GLfloat) - 0.122198, (GLfloat) - 0.624049, + (GLfloat) 1.356947, (GLfloat) - 0.122198, (GLfloat) - 0.375951, + (GLfloat) 1.589301, (GLfloat) - 0.085107, (GLfloat) - 0.375951, + (GLfloat) 1.460394, (GLfloat) 0.412133, (GLfloat) - 0.660849, + (GLfloat) 1.460394, (GLfloat) 0.412133, (GLfloat) - 0.339151, + (GLfloat) 1.370035, (GLfloat) 0.524394, (GLfloat) - 0.361333, + (GLfloat) 1.370035, (GLfloat) 0.524394, (GLfloat) - 0.638667, + (GLfloat) 1.226863, (GLfloat) 0.204423, (GLfloat) - 0.339151, + (GLfloat) 1.177383, (GLfloat) 0.324897, (GLfloat) - 0.361333, + (GLfloat) 1.226863, (GLfloat) 0.204423, (GLfloat) - 0.660849, + (GLfloat) 1.177383, (GLfloat) 0.324897, (GLfloat) - 0.638667, + (GLfloat) 1.460683, (GLfloat) 0.568581, (GLfloat) - 0.500000, + (GLfloat) 1.564666, (GLfloat) 0.208184, (GLfloat) - 0.500000, + (GLfloat) 1.502855, (GLfloat) 0.449898, (GLfloat) - 0.500000, + (GLfloat) 1.294932, (GLfloat) 0.399266, (GLfloat) - 0.262379, + (GLfloat) 1.416649, (GLfloat) 0.522728, (GLfloat) - 0.326134, + (GLfloat) 1.260429, (GLfloat) 0.437469, (GLfloat) - 0.500000, + (GLfloat) 1.392236, (GLfloat) 0.557026, (GLfloat) - 0.500000, + (GLfloat) 1.294932, (GLfloat) 0.399266, (GLfloat) - 0.737621, + (GLfloat) 1.416649, (GLfloat) 0.522728, (GLfloat) - 0.673866, + (GLfloat) 1.412872, (GLfloat) 0.126752, (GLfloat) - 0.313640, + (GLfloat) 1.343629, (GLfloat) 0.308278, (GLfloat) - 0.280660, + (GLfloat) 1.129180, (GLfloat) 0.229952, (GLfloat) - 0.500000, + (GLfloat) 1.174088, (GLfloat) 0.274960, (GLfloat) - 0.326134, + (GLfloat) 1.268890, (GLfloat) 0.429299, (GLfloat) - 0.322437, + (GLfloat) 1.261078, (GLfloat) 0.045321, (GLfloat) - 0.500000, + (GLfloat) 1.184403, (GLfloat) 0.166658, (GLfloat) - 0.500000, + (GLfloat) 1.174088, (GLfloat) 0.274960, (GLfloat) - 0.673866, + (GLfloat) 1.145545, (GLfloat) 0.301571, (GLfloat) - 0.500000, + (GLfloat) 1.412872, (GLfloat) 0.126752, (GLfloat) - 0.686360, + (GLfloat) 1.343629, (GLfloat) 0.308278, (GLfloat) - 0.719340, + (GLfloat) 1.268890, (GLfloat) 0.429299, (GLfloat) - 0.677562, + (GLfloat) 1.524188, (GLfloat) 0.186469, (GLfloat) - 0.636664, + (GLfloat) 1.682599, (GLfloat) - 0.328303, (GLfloat) - 0.500000, + (GLfloat) 1.631547, (GLfloat) - 0.078363, (GLfloat) - 0.500000, + (GLfloat) 1.524188, (GLfloat) 0.186469, (GLfloat) - 0.363336, + (GLfloat) 1.301556, (GLfloat) 0.067036, (GLfloat) - 0.636664, + (GLfloat) 1.497312, (GLfloat) - 0.330832, (GLfloat) - 0.686360, + (GLfloat) 1.473124, (GLfloat) - 0.103652, (GLfloat) - 0.669158, + (GLfloat) 1.497312, (GLfloat) - 0.330832, (GLfloat) - 0.313640, + (GLfloat) 1.473124, (GLfloat) - 0.103652, (GLfloat) - 0.330842, + (GLfloat) 1.301556, (GLfloat) 0.067036, (GLfloat) - 0.363336, + (GLfloat) 1.312026, (GLfloat) - 0.333361, (GLfloat) - 0.500000, + (GLfloat) 1.314701, (GLfloat) - 0.128942, (GLfloat) - 0.500000, + (GLfloat) 1.500000, (GLfloat) - 0.609501, (GLfloat) - 0.737621, + (GLfloat) 1.500000, (GLfloat) - 0.510672, (GLfloat) - 0.719340, + (GLfloat) 1.633189, (GLfloat) - 0.328978, (GLfloat) - 0.636664, + (GLfloat) 1.361436, (GLfloat) - 0.332687, (GLfloat) - 0.636664, + (GLfloat) 1.361436, (GLfloat) - 0.332687, (GLfloat) - 0.363336, + (GLfloat) 1.262379, (GLfloat) - 0.609501, (GLfloat) - 0.500000, + (GLfloat) 1.280660, (GLfloat) - 0.510672, (GLfloat) - 0.500000, + (GLfloat) 1.633189, (GLfloat) - 0.328978, (GLfloat) - 0.363336, + (GLfloat) 1.500000, (GLfloat) - 0.609501, (GLfloat) - 0.262379, + (GLfloat) 1.500000, (GLfloat) - 0.510672, (GLfloat) - 0.280660, + (GLfloat) 1.737621, (GLfloat) - 0.609501, (GLfloat) - 0.500000, + (GLfloat) 1.719340, (GLfloat) - 0.510672, (GLfloat) - 0.500000, + (GLfloat) 1.673866, (GLfloat) - 0.608893, (GLfloat) - 0.673866, + (GLfloat) 1.500000, (GLfloat) - 0.660924, (GLfloat) - 0.500000, + (GLfloat) 1.677562, (GLfloat) - 0.649161, (GLfloat) - 0.500000, + (GLfloat) 1.673866, (GLfloat) - 0.608893, (GLfloat) - 0.326134, + (GLfloat) 1.326134, (GLfloat) - 0.608893, (GLfloat) - 0.673866, + (GLfloat) 1.500000, (GLfloat) - 0.649161, (GLfloat) - 0.677562, + (GLfloat) 1.326134, (GLfloat) - 0.608893, (GLfloat) - 0.326134, + (GLfloat) 1.322438, (GLfloat) - 0.649161, (GLfloat) - 0.500000, + (GLfloat) 1.500000, (GLfloat) - 0.649161, (GLfloat) - 0.322437, + (GLfloat) 1.470529, (GLfloat) 0.515074, (GLfloat) - 0.593594, + (GLfloat) 1.521298, (GLfloat) 0.332708, (GLfloat) - 0.580972, + (GLfloat) 1.492239, (GLfloat) 0.440457, (GLfloat) - 0.587736, + (GLfloat) 1.470529, (GLfloat) 0.515074, (GLfloat) - 0.406406, + (GLfloat) 1.481548, (GLfloat) 0.525864, (GLfloat) - 0.500000, + (GLfloat) 1.423386, (GLfloat) 0.566478, (GLfloat) - 0.587500, + (GLfloat) 1.449724, (GLfloat) 0.556950, (GLfloat) - 0.594774, + (GLfloat) 1.382377, (GLfloat) 0.428753, (GLfloat) - 0.718387, + (GLfloat) 1.437472, (GLfloat) 0.482703, (GLfloat) - 0.671590, + (GLfloat) 1.382377, (GLfloat) 0.428753, (GLfloat) - 0.281613, + (GLfloat) 1.437472, (GLfloat) 0.482703, (GLfloat) - 0.328410, + (GLfloat) 1.423386, (GLfloat) 0.566478, (GLfloat) - 0.412500, + (GLfloat) 1.449724, (GLfloat) 0.556950, (GLfloat) - 0.405226, + (GLfloat) 1.521298, (GLfloat) 0.332708, (GLfloat) - 0.419028, + (GLfloat) 1.492239, (GLfloat) 0.440457, (GLfloat) - 0.412264, + (GLfloat) 1.327417, (GLfloat) 0.498590, (GLfloat) - 0.409500, + (GLfloat) 1.384841, (GLfloat) 0.546182, (GLfloat) - 0.417500, + (GLfloat) 1.433279, (GLfloat) 0.578472, (GLfloat) - 0.500000, + (GLfloat) 1.341069, (GLfloat) 0.481236, (GLfloat) - 0.294000, + (GLfloat) 1.392914, (GLfloat) 0.533174, (GLfloat) - 0.339125, + (GLfloat) 1.341069, (GLfloat) 0.481236, (GLfloat) - 0.706000, + (GLfloat) 1.392914, (GLfloat) 0.533174, (GLfloat) - 0.660875, + (GLfloat) 1.327417, (GLfloat) 0.498590, (GLfloat) - 0.590500, + (GLfloat) 1.384841, (GLfloat) 0.546182, (GLfloat) - 0.582500, + (GLfloat) 1.438984, (GLfloat) 0.272283, (GLfloat) - 0.311066, + (GLfloat) 1.407319, (GLfloat) 0.364926, (GLfloat) - 0.295283, + (GLfloat) 1.250150, (GLfloat) 0.299272, (GLfloat) - 0.281613, + (GLfloat) 1.316263, (GLfloat) 0.364012, (GLfloat) - 0.266014, + (GLfloat) 1.361260, (GLfloat) 0.466583, (GLfloat) - 0.278403, + (GLfloat) 1.161998, (GLfloat) 0.212951, (GLfloat) - 0.406406, + (GLfloat) 1.195055, (GLfloat) 0.245321, (GLfloat) - 0.328410, + (GLfloat) 1.219504, (GLfloat) 0.355352, (GLfloat) - 0.294000, + (GLfloat) 1.229040, (GLfloat) 0.331527, (GLfloat) - 0.278403, + (GLfloat) 1.315513, (GLfloat) 0.181646, (GLfloat) - 0.311066, + (GLfloat) 1.279939, (GLfloat) 0.251630, (GLfloat) - 0.295283, + (GLfloat) 1.201684, (GLfloat) 0.368389, (GLfloat) - 0.409500, + (GLfloat) 1.213173, (GLfloat) 0.368416, (GLfloat) - 0.335375, + (GLfloat) 1.279412, (GLfloat) 0.419138, (GLfloat) - 0.278500, + (GLfloat) 1.137187, (GLfloat) 0.270110, (GLfloat) - 0.412500, + (GLfloat) 1.169407, (GLfloat) 0.301726, (GLfloat) - 0.339125, + (GLfloat) 1.327792, (GLfloat) 0.487107, (GLfloat) - 0.335375, + (GLfloat) 1.233200, (GLfloat) 0.121222, (GLfloat) - 0.419028, + (GLfloat) 1.195018, (GLfloat) 0.176099, (GLfloat) - 0.412264, + (GLfloat) 1.161998, (GLfloat) 0.212951, (GLfloat) - 0.593594, + (GLfloat) 1.150979, (GLfloat) 0.202161, (GLfloat) - 0.500000, + (GLfloat) 1.140576, (GLfloat) 0.241160, (GLfloat) - 0.405226, + (GLfloat) 1.250150, (GLfloat) 0.299272, (GLfloat) - 0.718387, + (GLfloat) 1.195055, (GLfloat) 0.245321, (GLfloat) - 0.671590, + (GLfloat) 1.137187, (GLfloat) 0.270110, (GLfloat) - 0.587500, + (GLfloat) 1.140576, (GLfloat) 0.241160, (GLfloat) - 0.594774, + (GLfloat) 1.233200, (GLfloat) 0.121222, (GLfloat) - 0.580972, + (GLfloat) 1.195018, (GLfloat) 0.176099, (GLfloat) - 0.587736, + (GLfloat) 1.201684, (GLfloat) 0.368389, (GLfloat) - 0.590500, + (GLfloat) 1.156124, (GLfloat) 0.309340, (GLfloat) - 0.582500, + (GLfloat) 1.125545, (GLfloat) 0.259804, (GLfloat) - 0.500000, + (GLfloat) 1.219504, (GLfloat) 0.355352, (GLfloat) - 0.706000, + (GLfloat) 1.169407, (GLfloat) 0.301726, (GLfloat) - 0.660875, + (GLfloat) 1.156124, (GLfloat) 0.309340, (GLfloat) - 0.417500, + (GLfloat) 1.315513, (GLfloat) 0.181646, (GLfloat) - 0.688934, + (GLfloat) 1.279939, (GLfloat) 0.251630, (GLfloat) - 0.704717, + (GLfloat) 1.316263, (GLfloat) 0.364012, (GLfloat) - 0.733986, + (GLfloat) 1.229040, (GLfloat) 0.331527, (GLfloat) - 0.721597, + (GLfloat) 1.361260, (GLfloat) 0.466583, (GLfloat) - 0.721597, + (GLfloat) 1.438984, (GLfloat) 0.272283, (GLfloat) - 0.688934, + (GLfloat) 1.407319, (GLfloat) 0.364926, (GLfloat) - 0.704717, + (GLfloat) 1.327792, (GLfloat) 0.487107, (GLfloat) - 0.664625, + (GLfloat) 1.279412, (GLfloat) 0.419138, (GLfloat) - 0.721500, + (GLfloat) 1.213173, (GLfloat) 0.368416, (GLfloat) - 0.664625, + (GLfloat) 1.262552, (GLfloat) 0.435419, (GLfloat) - 0.402250, + (GLfloat) 1.330455, (GLfloat) 0.505735, (GLfloat) - 0.500000, + (GLfloat) 1.194650, (GLfloat) 0.365104, (GLfloat) - 0.500000, + (GLfloat) 1.262552, (GLfloat) 0.435419, (GLfloat) - 0.597750, + (GLfloat) 1.490430, (GLfloat) 0.310049, (GLfloat) - 0.648448, + (GLfloat) 1.588828, (GLfloat) 0.061527, (GLfloat) - 0.569694, + (GLfloat) 1.554547, (GLfloat) 0.202755, (GLfloat) - 0.574544, + (GLfloat) 1.531587, (GLfloat) 0.340261, (GLfloat) - 0.500000, + (GLfloat) 1.647861, (GLfloat) - 0.211045, (GLfloat) - 0.569694, + (GLfloat) 1.620986, (GLfloat) - 0.080049, (GLfloat) - 0.567663, + (GLfloat) 1.588828, (GLfloat) 0.061527, (GLfloat) - 0.430306, + (GLfloat) 1.599013, (GLfloat) 0.064899, (GLfloat) - 0.500000, + (GLfloat) 1.507354, (GLfloat) 0.034552, (GLfloat) - 0.662619, + (GLfloat) 1.558275, (GLfloat) 0.051411, (GLfloat) - 0.627772, + (GLfloat) 1.507354, (GLfloat) 0.034552, (GLfloat) - 0.337381, + (GLfloat) 1.558275, (GLfloat) 0.051411, (GLfloat) - 0.372228, + (GLfloat) 1.554547, (GLfloat) 0.202755, (GLfloat) - 0.425456, + (GLfloat) 1.647861, (GLfloat) - 0.211045, (GLfloat) - 0.430306, + (GLfloat) 1.620986, (GLfloat) - 0.080049, (GLfloat) - 0.432337, + (GLfloat) 1.490430, (GLfloat) 0.310049, (GLfloat) - 0.351552, + (GLfloat) 1.264067, (GLfloat) 0.143881, (GLfloat) - 0.648448, + (GLfloat) 1.385142, (GLfloat) - 0.005911, (GLfloat) - 0.662619, + (GLfloat) 1.352154, (GLfloat) 0.094180, (GLfloat) - 0.673936, + (GLfloat) 1.377249, (GLfloat) 0.226965, (GLfloat) - 0.702430, + (GLfloat) 1.421273, (GLfloat) - 0.224532, (GLfloat) - 0.662619, + (GLfloat) 1.409755, (GLfloat) - 0.113768, (GLfloat) - 0.657881, + (GLfloat) 1.446248, (GLfloat) 0.014320, (GLfloat) - 0.674234, + (GLfloat) 1.303667, (GLfloat) - 0.032887, (GLfloat) - 0.569694, + (GLfloat) 1.334220, (GLfloat) - 0.022771, (GLfloat) - 0.627772, + (GLfloat) 1.473590, (GLfloat) 0.159325, (GLfloat) - 0.673936, + (GLfloat) 1.557226, (GLfloat) - 0.216440, (GLfloat) - 0.662619, + (GLfloat) 1.536493, (GLfloat) - 0.093537, (GLfloat) - 0.657881, + (GLfloat) 1.377249, (GLfloat) 0.226965, (GLfloat) - 0.297570, + (GLfloat) 1.385142, (GLfloat) - 0.005911, (GLfloat) - 0.337381, + (GLfloat) 1.352154, (GLfloat) 0.094180, (GLfloat) - 0.326064, + (GLfloat) 1.264067, (GLfloat) 0.143881, (GLfloat) - 0.351552, + (GLfloat) 1.473590, (GLfloat) 0.159325, (GLfloat) - 0.326064, + (GLfloat) 1.557226, (GLfloat) - 0.216440, (GLfloat) - 0.337381, + (GLfloat) 1.536493, (GLfloat) - 0.093537, (GLfloat) - 0.342119, + (GLfloat) 1.446248, (GLfloat) 0.014320, (GLfloat) - 0.325766, + (GLfloat) 1.303667, (GLfloat) - 0.032887, (GLfloat) - 0.430306, + (GLfloat) 1.334220, (GLfloat) - 0.022771, (GLfloat) - 0.372228, + (GLfloat) 1.421273, (GLfloat) - 0.224532, (GLfloat) - 0.337381, + (GLfloat) 1.409755, (GLfloat) - 0.113768, (GLfloat) - 0.342119, + (GLfloat) 1.222911, (GLfloat) 0.113669, (GLfloat) - 0.500000, + (GLfloat) 1.271198, (GLfloat) 0.050750, (GLfloat) - 0.574544, + (GLfloat) 1.271198, (GLfloat) 0.050750, (GLfloat) - 0.425456, + (GLfloat) 1.330638, (GLfloat) - 0.229927, (GLfloat) - 0.430306, + (GLfloat) 1.325262, (GLfloat) - 0.127256, (GLfloat) - 0.432337, + (GLfloat) 1.293483, (GLfloat) - 0.036258, (GLfloat) - 0.500000, + (GLfloat) 1.330638, (GLfloat) - 0.229927, (GLfloat) - 0.569694, + (GLfloat) 1.325262, (GLfloat) - 0.127256, (GLfloat) - 0.567663, + (GLfloat) 1.419028, (GLfloat) - 0.429344, (GLfloat) - 0.688934, + (GLfloat) 1.406406, (GLfloat) - 0.569469, (GLfloat) - 0.718387, + (GLfloat) 1.412264, (GLfloat) - 0.510672, (GLfloat) - 0.704717, + (GLfloat) 1.580972, (GLfloat) - 0.429344, (GLfloat) - 0.688934, + (GLfloat) 1.500000, (GLfloat) - 0.429344, (GLfloat) - 0.702430, + (GLfloat) 1.423198, (GLfloat) - 0.331844, (GLfloat) - 0.673936, + (GLfloat) 1.311066, (GLfloat) - 0.429344, (GLfloat) - 0.580972, + (GLfloat) 1.351552, (GLfloat) - 0.429344, (GLfloat) - 0.648448, + (GLfloat) 1.688934, (GLfloat) - 0.429344, (GLfloat) - 0.580972, + (GLfloat) 1.648448, (GLfloat) - 0.429344, (GLfloat) - 0.648448, + (GLfloat) 1.571427, (GLfloat) - 0.329821, (GLfloat) - 0.673936, + (GLfloat) 1.593594, (GLfloat) - 0.569469, (GLfloat) - 0.718387, + (GLfloat) 1.587736, (GLfloat) - 0.510672, (GLfloat) - 0.704717, + (GLfloat) 1.489249, (GLfloat) - 0.220486, (GLfloat) - 0.674234, + (GLfloat) 1.613873, (GLfloat) - 0.213068, (GLfloat) - 0.627772, + (GLfloat) 1.364627, (GLfloat) - 0.227904, (GLfloat) - 0.627772, + (GLfloat) 1.324378, (GLfloat) - 0.333193, (GLfloat) - 0.574544, + (GLfloat) 1.311066, (GLfloat) - 0.429344, (GLfloat) - 0.419028, + (GLfloat) 1.297570, (GLfloat) - 0.429344, (GLfloat) - 0.500000, + (GLfloat) 1.281613, (GLfloat) - 0.569469, (GLfloat) - 0.593594, + (GLfloat) 1.295283, (GLfloat) - 0.510672, (GLfloat) - 0.587736, + (GLfloat) 1.319309, (GLfloat) - 0.230602, (GLfloat) - 0.500000, + (GLfloat) 1.364627, (GLfloat) - 0.227904, (GLfloat) - 0.372228, + (GLfloat) 1.324378, (GLfloat) - 0.333193, (GLfloat) - 0.425456, + (GLfloat) 1.281613, (GLfloat) - 0.569469, (GLfloat) - 0.406406, + (GLfloat) 1.295283, (GLfloat) - 0.510672, (GLfloat) - 0.412264, + (GLfloat) 1.419028, (GLfloat) - 0.429344, (GLfloat) - 0.311066, + (GLfloat) 1.351552, (GLfloat) - 0.429344, (GLfloat) - 0.351552, + (GLfloat) 1.423198, (GLfloat) - 0.331844, (GLfloat) - 0.326064, + (GLfloat) 1.580972, (GLfloat) - 0.429344, (GLfloat) - 0.311066, + (GLfloat) 1.500000, (GLfloat) - 0.429344, (GLfloat) - 0.297570, + (GLfloat) 1.406406, (GLfloat) - 0.569469, (GLfloat) - 0.281613, + (GLfloat) 1.412264, (GLfloat) - 0.510672, (GLfloat) - 0.295283, + (GLfloat) 1.489249, (GLfloat) - 0.220486, (GLfloat) - 0.325766, + (GLfloat) 1.613873, (GLfloat) - 0.213068, (GLfloat) - 0.372228, + (GLfloat) 1.571427, (GLfloat) - 0.329821, (GLfloat) - 0.326064, + (GLfloat) 1.593594, (GLfloat) - 0.569469, (GLfloat) - 0.281613, + (GLfloat) 1.587736, (GLfloat) - 0.510672, (GLfloat) - 0.295283, + (GLfloat) 1.688934, (GLfloat) - 0.429344, (GLfloat) - 0.419028, + (GLfloat) 1.648448, (GLfloat) - 0.429344, (GLfloat) - 0.351552, + (GLfloat) 1.670246, (GLfloat) - 0.328472, (GLfloat) - 0.425456, + (GLfloat) 1.702430, (GLfloat) - 0.429344, (GLfloat) - 0.500000, + (GLfloat) 1.718387, (GLfloat) - 0.569469, (GLfloat) - 0.406406, + (GLfloat) 1.704717, (GLfloat) - 0.510672, (GLfloat) - 0.412264, + (GLfloat) 1.659190, (GLfloat) - 0.210370, (GLfloat) - 0.500000, + (GLfloat) 1.670246, (GLfloat) - 0.328472, (GLfloat) - 0.574544, + (GLfloat) 1.718387, (GLfloat) - 0.569469, (GLfloat) - 0.593594, + (GLfloat) 1.704717, (GLfloat) - 0.510672, (GLfloat) - 0.587736, + (GLfloat) 1.733986, (GLfloat) - 0.569469, (GLfloat) - 0.500000, + (GLfloat) 1.706000, (GLfloat) - 0.633319, (GLfloat) - 0.412500, + (GLfloat) 1.721597, (GLfloat) - 0.609197, (GLfloat) - 0.405226, + (GLfloat) 1.671590, (GLfloat) - 0.569469, (GLfloat) - 0.328410, + (GLfloat) 1.671590, (GLfloat) - 0.569469, (GLfloat) - 0.671590, + (GLfloat) 1.706000, (GLfloat) - 0.633319, (GLfloat) - 0.587500, + (GLfloat) 1.721597, (GLfloat) - 0.609197, (GLfloat) - 0.594774, + (GLfloat) 1.590500, (GLfloat) - 0.655194, (GLfloat) - 0.590500, + (GLfloat) 1.664625, (GLfloat) - 0.646948, (GLfloat) - 0.582500, + (GLfloat) 1.721500, (GLfloat) - 0.634535, (GLfloat) - 0.500000, + (GLfloat) 1.587500, (GLfloat) - 0.633319, (GLfloat) - 0.706000, + (GLfloat) 1.660875, (GLfloat) - 0.632104, (GLfloat) - 0.660875, + (GLfloat) 1.587500, (GLfloat) - 0.633319, (GLfloat) - 0.294000, + (GLfloat) 1.660875, (GLfloat) - 0.632104, (GLfloat) - 0.339125, + (GLfloat) 1.590500, (GLfloat) - 0.655194, (GLfloat) - 0.409500, + (GLfloat) 1.664625, (GLfloat) - 0.646948, (GLfloat) - 0.417500, + (GLfloat) 1.500000, (GLfloat) - 0.569469, (GLfloat) - 0.733986, + (GLfloat) 1.594774, (GLfloat) - 0.609197, (GLfloat) - 0.721597, + (GLfloat) 1.328410, (GLfloat) - 0.569469, (GLfloat) - 0.671590, + (GLfloat) 1.412500, (GLfloat) - 0.633319, (GLfloat) - 0.706000, + (GLfloat) 1.405226, (GLfloat) - 0.609197, (GLfloat) - 0.721597, + (GLfloat) 1.409500, (GLfloat) - 0.655194, (GLfloat) - 0.590500, + (GLfloat) 1.417500, (GLfloat) - 0.646948, (GLfloat) - 0.664625, + (GLfloat) 1.500000, (GLfloat) - 0.634535, (GLfloat) - 0.721500, + (GLfloat) 1.294000, (GLfloat) - 0.633319, (GLfloat) - 0.587500, + (GLfloat) 1.339125, (GLfloat) - 0.632104, (GLfloat) - 0.660875, + (GLfloat) 1.582500, (GLfloat) - 0.646948, (GLfloat) - 0.664625, + (GLfloat) 1.266014, (GLfloat) - 0.569469, (GLfloat) - 0.500000, + (GLfloat) 1.278403, (GLfloat) - 0.609197, (GLfloat) - 0.594774, + (GLfloat) 1.328410, (GLfloat) - 0.569469, (GLfloat) - 0.328410, + (GLfloat) 1.294000, (GLfloat) - 0.633319, (GLfloat) - 0.412500, + (GLfloat) 1.278403, (GLfloat) - 0.609197, (GLfloat) - 0.405226, + (GLfloat) 1.409500, (GLfloat) - 0.655194, (GLfloat) - 0.409500, + (GLfloat) 1.335375, (GLfloat) - 0.646948, (GLfloat) - 0.417500, + (GLfloat) 1.278500, (GLfloat) - 0.634535, (GLfloat) - 0.500000, + (GLfloat) 1.412500, (GLfloat) - 0.633319, (GLfloat) - 0.294000, + (GLfloat) 1.339125, (GLfloat) - 0.632104, (GLfloat) - 0.339125, + (GLfloat) 1.335375, (GLfloat) - 0.646948, (GLfloat) - 0.582500, + (GLfloat) 1.500000, (GLfloat) - 0.569469, (GLfloat) - 0.266014, + (GLfloat) 1.405226, (GLfloat) - 0.609197, (GLfloat) - 0.278403, + (GLfloat) 1.594774, (GLfloat) - 0.609197, (GLfloat) - 0.278403, + (GLfloat) 1.582500, (GLfloat) - 0.646948, (GLfloat) - 0.335375, + (GLfloat) 1.500000, (GLfloat) - 0.634535, (GLfloat) - 0.278500, + (GLfloat) 1.417500, (GLfloat) - 0.646948, (GLfloat) - 0.335375, + (GLfloat) 1.500000, (GLfloat) - 0.657972, (GLfloat) - 0.597750, + (GLfloat) 1.597750, (GLfloat) - 0.657972, (GLfloat) - 0.500000, + (GLfloat) 1.402250, (GLfloat) - 0.657972, (GLfloat) - 0.500000, + (GLfloat) 1.500000, (GLfloat) - 0.657972, (GLfloat) - 0.402250, +}; + +static GLfloat s1_6_normals[] = +{ + (GLfloat) 0.863661, (GLfloat) 0.210849, (GLfloat) - 0.457857, + (GLfloat) 0.863729, (GLfloat) 0.215548, (GLfloat) - 0.455534, + (GLfloat) 0.952947, (GLfloat) 0.267284, (GLfloat) - 0.143006, + (GLfloat) 0.953156, (GLfloat) 0.266032, (GLfloat) - 0.143950, + (GLfloat) 0.887569, (GLfloat) 0.433517, (GLfloat) - 0.155833, + (GLfloat) 0.886526, (GLfloat) 0.436070, (GLfloat) - 0.154645, + (GLfloat) 0.784332, (GLfloat) 0.380163, (GLfloat) - 0.490203, + (GLfloat) 0.785458, (GLfloat) 0.376379, (GLfloat) - 0.491319, + (GLfloat) 0.863661, (GLfloat) 0.210849, (GLfloat) 0.457857, + (GLfloat) 0.863729, (GLfloat) 0.215548, (GLfloat) 0.455534, + (GLfloat) 0.785458, (GLfloat) 0.376379, (GLfloat) 0.491319, + (GLfloat) 0.784333, (GLfloat) 0.380162, (GLfloat) 0.490203, + (GLfloat) 0.887569, (GLfloat) 0.433517, (GLfloat) 0.155833, + (GLfloat) 0.886526, (GLfloat) 0.436070, (GLfloat) 0.154645, + (GLfloat) 0.953156, (GLfloat) 0.266032, (GLfloat) 0.143950, + (GLfloat) 0.952947, (GLfloat) 0.267284, (GLfloat) 0.143006, + (GLfloat) - 0.476698, (GLfloat) 0.854621, (GLfloat) 0.205866, + (GLfloat) - 0.498450, (GLfloat) 0.848428, (GLfloat) 0.178092, + (GLfloat) - 0.462000, (GLfloat) 0.884194, (GLfloat) 0.068965, + (GLfloat) - 0.472068, (GLfloat) 0.878521, (GLfloat) 0.073162, + (GLfloat) 0.299348, (GLfloat) 0.942240, (GLfloat) 0.150245, + (GLfloat) 0.334834, (GLfloat) 0.927714, (GLfloat) 0.165022, + (GLfloat) 0.146237, (GLfloat) 0.884155, (GLfloat) 0.443716, + (GLfloat) 0.183286, (GLfloat) 0.864289, (GLfloat) 0.468413, + (GLfloat) - 0.498450, (GLfloat) 0.848429, (GLfloat) - 0.178092, + (GLfloat) - 0.476698, (GLfloat) 0.854621, (GLfloat) - 0.205865, + (GLfloat) 0.146237, (GLfloat) 0.884155, (GLfloat) - 0.443716, + (GLfloat) 0.183286, (GLfloat) 0.864289, (GLfloat) - 0.468413, + (GLfloat) 0.334834, (GLfloat) 0.927714, (GLfloat) - 0.165022, + (GLfloat) 0.299348, (GLfloat) 0.942240, (GLfloat) - 0.150245, + (GLfloat) - 0.472068, (GLfloat) 0.878521, (GLfloat) - 0.073162, + (GLfloat) - 0.462000, (GLfloat) 0.884194, (GLfloat) - 0.068965, + (GLfloat) 0.601151, (GLfloat) 0.064321, (GLfloat) 0.796542, + (GLfloat) 0.602133, (GLfloat) 0.074603, (GLfloat) 0.794903, + (GLfloat) 0.305416, (GLfloat) - 0.098916, (GLfloat) 0.947067, + (GLfloat) 0.305705, (GLfloat) - 0.083664, (GLfloat) 0.948443, + (GLfloat) 0.204663, (GLfloat) 0.031235, (GLfloat) 0.978334, + (GLfloat) 0.206924, (GLfloat) 0.024347, (GLfloat) 0.978054, + (GLfloat) 0.503723, (GLfloat) 0.214462, (GLfloat) 0.836821, + (GLfloat) 0.504738, (GLfloat) 0.210719, (GLfloat) 0.837160, + (GLfloat) - 0.295242, (GLfloat) - 0.450841, (GLfloat) 0.842363, + (GLfloat) - 0.299933, (GLfloat) - 0.431633, (GLfloat) 0.850725, + (GLfloat) - 0.391261, (GLfloat) - 0.341115, (GLfloat) 0.854725, + (GLfloat) - 0.390827, (GLfloat) - 0.342109, (GLfloat) 0.854527, + (GLfloat) - 0.083295, (GLfloat) - 0.151964, (GLfloat) 0.984870, + (GLfloat) - 0.083124, (GLfloat) - 0.152402, (GLfloat) 0.984817, + (GLfloat) 0.015860, (GLfloat) - 0.266588, (GLfloat) 0.963680, + (GLfloat) 0.013989, (GLfloat) - 0.247700, (GLfloat) 0.968736, + (GLfloat) - 0.816724, (GLfloat) 0.502516, (GLfloat) 0.283619, + (GLfloat) - 0.805591, (GLfloat) 0.530375, (GLfloat) 0.264055, + (GLfloat) - 0.732550, (GLfloat) 0.603459, (GLfloat) 0.314971, + (GLfloat) - 0.730076, (GLfloat) 0.611620, (GLfloat) 0.304811, + (GLfloat) - 0.516849, (GLfloat) 0.314381, (GLfloat) 0.796261, + (GLfloat) - 0.502724, (GLfloat) 0.272837, (GLfloat) 0.820261, + (GLfloat) - 0.744687, (GLfloat) 0.181500, (GLfloat) 0.642261, + (GLfloat) - 0.739362, (GLfloat) 0.135764, (GLfloat) 0.659478, + (GLfloat) - 0.549371, (GLfloat) 0.797029, (GLfloat) 0.250869, + (GLfloat) - 0.542332, (GLfloat) 0.789948, (GLfloat) 0.286109, + (GLfloat) - 0.086395, (GLfloat) 0.693389, (GLfloat) 0.715365, + (GLfloat) - 0.059539, (GLfloat) 0.687907, (GLfloat) 0.723353, + (GLfloat) - 0.265868, (GLfloat) 0.473566, (GLfloat) 0.839672, + (GLfloat) - 0.289224, (GLfloat) 0.481874, (GLfloat) 0.827131, + (GLfloat) - 0.628658, (GLfloat) 0.711043, (GLfloat) 0.314972, + (GLfloat) - 0.636726, (GLfloat) 0.708286, (GLfloat) 0.304813, + (GLfloat) - 0.602622, (GLfloat) - 0.619862, (GLfloat) 0.502612, + (GLfloat) - 0.608832, (GLfloat) - 0.607495, (GLfloat) 0.510170, + (GLfloat) - 0.718752, (GLfloat) - 0.676658, (GLfloat) 0.159776, + (GLfloat) - 0.721882, (GLfloat) - 0.672658, (GLfloat) 0.162535, + (GLfloat) - 0.782122, (GLfloat) - 0.600854, (GLfloat) 0.165107, + (GLfloat) - 0.776469, (GLfloat) - 0.609074, (GLfloat) 0.161631, + (GLfloat) - 0.682182, (GLfloat) - 0.521915, (GLfloat) 0.512086, + (GLfloat) - 0.675579, (GLfloat) - 0.534280, (GLfloat) 0.508073, + (GLfloat) - 0.608832, (GLfloat) - 0.607495, (GLfloat) - 0.510170, + (GLfloat) - 0.602622, (GLfloat) - 0.619862, (GLfloat) - 0.502612, + (GLfloat) - 0.682182, (GLfloat) - 0.521915, (GLfloat) - 0.512086, + (GLfloat) - 0.675579, (GLfloat) - 0.534280, (GLfloat) - 0.508073, + (GLfloat) - 0.776469, (GLfloat) - 0.609074, (GLfloat) - 0.161631, + (GLfloat) - 0.782122, (GLfloat) - 0.600854, (GLfloat) - 0.165107, + (GLfloat) - 0.718752, (GLfloat) - 0.676658, (GLfloat) - 0.159776, + (GLfloat) - 0.721882, (GLfloat) - 0.672658, (GLfloat) - 0.162535, + (GLfloat) - 0.870738, (GLfloat) 0.446582, (GLfloat) - 0.205866, + (GLfloat) - 0.865307, (GLfloat) 0.468537, (GLfloat) - 0.178091, + (GLfloat) - 0.899779, (GLfloat) 0.430861, (GLfloat) - 0.068965, + (GLfloat) - 0.894461, (GLfloat) 0.441120, (GLfloat) - 0.073162, + (GLfloat) - 0.988176, (GLfloat) - 0.083362, (GLfloat) - 0.128682, + (GLfloat) - 0.982213, (GLfloat) - 0.119589, (GLfloat) - 0.144763, + (GLfloat) - 0.919779, (GLfloat) 0.029098, (GLfloat) - 0.391357, + (GLfloat) - 0.919364, (GLfloat) - 0.008818, (GLfloat) - 0.393310, + (GLfloat) - 0.865307, (GLfloat) 0.468537, (GLfloat) 0.178091, + (GLfloat) - 0.870738, (GLfloat) 0.446582, (GLfloat) 0.205866, + (GLfloat) - 0.919364, (GLfloat) - 0.008818, (GLfloat) 0.393310, + (GLfloat) - 0.919779, (GLfloat) 0.029098, (GLfloat) 0.391357, + (GLfloat) - 0.982213, (GLfloat) - 0.119589, (GLfloat) 0.144763, + (GLfloat) - 0.988176, (GLfloat) - 0.083362, (GLfloat) 0.128682, + (GLfloat) - 0.894461, (GLfloat) 0.441120, (GLfloat) 0.073162, + (GLfloat) - 0.899779, (GLfloat) 0.430861, (GLfloat) 0.068965, + (GLfloat) - 0.295242, (GLfloat) - 0.450841, (GLfloat) - 0.842362, + (GLfloat) - 0.299933, (GLfloat) - 0.431632, (GLfloat) - 0.850725, + (GLfloat) 0.013989, (GLfloat) - 0.247700, (GLfloat) - 0.968736, + (GLfloat) 0.015860, (GLfloat) - 0.266588, (GLfloat) - 0.963680, + (GLfloat) - 0.083295, (GLfloat) - 0.151964, (GLfloat) - 0.984870, + (GLfloat) - 0.083124, (GLfloat) - 0.152402, (GLfloat) - 0.984817, + (GLfloat) - 0.390828, (GLfloat) - 0.342108, (GLfloat) - 0.854527, + (GLfloat) - 0.391261, (GLfloat) - 0.341115, (GLfloat) - 0.854725, + (GLfloat) 0.602133, (GLfloat) 0.074603, (GLfloat) - 0.794903, + (GLfloat) 0.601151, (GLfloat) 0.064322, (GLfloat) - 0.796542, + (GLfloat) 0.503722, (GLfloat) 0.214463, (GLfloat) - 0.836821, + (GLfloat) 0.504737, (GLfloat) 0.210719, (GLfloat) - 0.837161, + (GLfloat) 0.206924, (GLfloat) 0.024347, (GLfloat) - 0.978054, + (GLfloat) 0.204663, (GLfloat) 0.031235, (GLfloat) - 0.978334, + (GLfloat) 0.305416, (GLfloat) - 0.098916, (GLfloat) - 0.947067, + (GLfloat) 0.305705, (GLfloat) - 0.083664, (GLfloat) - 0.948443, + (GLfloat) - 0.549371, (GLfloat) 0.797029, (GLfloat) - 0.250870, + (GLfloat) - 0.542332, (GLfloat) 0.789948, (GLfloat) - 0.286110, + (GLfloat) - 0.628658, (GLfloat) 0.711043, (GLfloat) - 0.314972, + (GLfloat) - 0.636726, (GLfloat) 0.708286, (GLfloat) - 0.304813, + (GLfloat) - 0.289225, (GLfloat) 0.481875, (GLfloat) - 0.827131, + (GLfloat) - 0.265869, (GLfloat) 0.473567, (GLfloat) - 0.839672, + (GLfloat) - 0.086396, (GLfloat) 0.693390, (GLfloat) - 0.715365, + (GLfloat) - 0.059540, (GLfloat) 0.687907, (GLfloat) - 0.723352, + (GLfloat) - 0.805592, (GLfloat) 0.530374, (GLfloat) - 0.264056, + (GLfloat) - 0.816724, (GLfloat) 0.502516, (GLfloat) - 0.283619, + (GLfloat) - 0.744687, (GLfloat) 0.181500, (GLfloat) - 0.642260, + (GLfloat) - 0.739363, (GLfloat) 0.135764, (GLfloat) - 0.659478, + (GLfloat) - 0.502724, (GLfloat) 0.272838, (GLfloat) - 0.820261, + (GLfloat) - 0.516850, (GLfloat) 0.314382, (GLfloat) - 0.796260, + (GLfloat) - 0.732550, (GLfloat) 0.603460, (GLfloat) - 0.314971, + (GLfloat) - 0.730076, (GLfloat) 0.611620, (GLfloat) - 0.304812, + (GLfloat) - 0.612735, (GLfloat) 0.780498, (GLfloat) 0.124010, + (GLfloat) - 0.620926, (GLfloat) 0.772016, (GLfloat) 0.135801, + (GLfloat) - 0.683860, (GLfloat) 0.721331, (GLfloat) 0.109621, + (GLfloat) - 0.686475, (GLfloat) 0.718049, (GLfloat) 0.114708, + (GLfloat) - 0.697666, (GLfloat) 0.715659, (GLfloat) 0.033080, + (GLfloat) - 0.695640, (GLfloat) 0.717757, (GLfloat) 0.030164, + (GLfloat) - 0.638159, (GLfloat) 0.768656, (GLfloat) 0.043833, + (GLfloat) - 0.634338, (GLfloat) 0.772038, (GLfloat) 0.039657, + (GLfloat) - 0.793216, (GLfloat) 0.593605, (GLfloat) 0.135802, + (GLfloat) - 0.801406, (GLfloat) 0.585123, (GLfloat) 0.124011, + (GLfloat) - 0.790459, (GLfloat) 0.610945, (GLfloat) 0.043833, + (GLfloat) - 0.793705, (GLfloat) 0.607008, (GLfloat) 0.039656, + (GLfloat) - 0.741597, (GLfloat) 0.670167, (GLfloat) 0.030164, + (GLfloat) - 0.739572, (GLfloat) 0.672265, (GLfloat) 0.033079, + (GLfloat) - 0.744759, (GLfloat) 0.658269, (GLfloat) 0.109621, + (GLfloat) - 0.741569, (GLfloat) 0.660997, (GLfloat) 0.114710, + (GLfloat) - 0.801406, (GLfloat) 0.585123, (GLfloat) - 0.124011, + (GLfloat) - 0.793216, (GLfloat) 0.593605, (GLfloat) - 0.135802, + (GLfloat) - 0.744759, (GLfloat) 0.658269, (GLfloat) - 0.109621, + (GLfloat) - 0.741569, (GLfloat) 0.660997, (GLfloat) - 0.114710, + (GLfloat) - 0.739572, (GLfloat) 0.672265, (GLfloat) - 0.033079, + (GLfloat) - 0.741597, (GLfloat) 0.670167, (GLfloat) - 0.030164, + (GLfloat) - 0.790459, (GLfloat) 0.610945, (GLfloat) - 0.043833, + (GLfloat) - 0.793705, (GLfloat) 0.607008, (GLfloat) - 0.039656, + (GLfloat) - 0.620926, (GLfloat) 0.772016, (GLfloat) - 0.135801, + (GLfloat) - 0.612735, (GLfloat) 0.780498, (GLfloat) - 0.124010, + (GLfloat) - 0.638159, (GLfloat) 0.768656, (GLfloat) - 0.043833, + (GLfloat) - 0.634338, (GLfloat) 0.772038, (GLfloat) - 0.039657, + (GLfloat) - 0.695640, (GLfloat) 0.717757, (GLfloat) - 0.030164, + (GLfloat) - 0.697666, (GLfloat) 0.715659, (GLfloat) - 0.033080, + (GLfloat) - 0.683860, (GLfloat) 0.721331, (GLfloat) - 0.109621, + (GLfloat) - 0.686475, (GLfloat) 0.718049, (GLfloat) - 0.114708, + (GLfloat) 0.864441, (GLfloat) 0.198220, (GLfloat) - 0.462008, + (GLfloat) 0.865832, (GLfloat) 0.204848, (GLfloat) - 0.456478, + (GLfloat) 0.861398, (GLfloat) 0.190399, (GLfloat) - 0.470894, + (GLfloat) 0.864411, (GLfloat) 0.198309, (GLfloat) - 0.462024, + (GLfloat) 0.959873, (GLfloat) 0.240404, (GLfloat) - 0.144397, + (GLfloat) 0.959903, (GLfloat) 0.238290, (GLfloat) - 0.147664, + (GLfloat) 0.957414, (GLfloat) 0.250909, (GLfloat) - 0.142837, + (GLfloat) 0.957562, (GLfloat) 0.249145, (GLfloat) - 0.144919, + (GLfloat) 0.850599, (GLfloat) 0.179835, (GLfloat) - 0.494106, + (GLfloat) 0.855506, (GLfloat) 0.187394, (GLfloat) - 0.482693, + (GLfloat) 0.963921, (GLfloat) 0.218904, (GLfloat) - 0.151448, + (GLfloat) 0.963730, (GLfloat) 0.216664, (GLfloat) - 0.155826, + (GLfloat) 0.961835, (GLfloat) 0.230558, (GLfloat) - 0.147363, + (GLfloat) 0.961732, (GLfloat) 0.228244, (GLfloat) - 0.151580, + (GLfloat) 0.856249, (GLfloat) 0.184340, (GLfloat) - 0.482552, + (GLfloat) 0.860720, (GLfloat) 0.192749, (GLfloat) - 0.471178, + (GLfloat) 0.850599, (GLfloat) 0.179835, (GLfloat) 0.494106, + (GLfloat) 0.855506, (GLfloat) 0.187394, (GLfloat) 0.482693, + (GLfloat) 0.860720, (GLfloat) 0.192749, (GLfloat) 0.471179, + (GLfloat) 0.856249, (GLfloat) 0.184340, (GLfloat) 0.482552, + (GLfloat) 0.961835, (GLfloat) 0.230558, (GLfloat) 0.147363, + (GLfloat) 0.961732, (GLfloat) 0.228244, (GLfloat) 0.151580, + (GLfloat) 0.963730, (GLfloat) 0.216664, (GLfloat) 0.155826, + (GLfloat) 0.963921, (GLfloat) 0.218904, (GLfloat) 0.151448, + (GLfloat) 0.865832, (GLfloat) 0.204848, (GLfloat) 0.456478, + (GLfloat) 0.864441, (GLfloat) 0.198220, (GLfloat) 0.462008, + (GLfloat) 0.957414, (GLfloat) 0.250909, (GLfloat) 0.142837, + (GLfloat) 0.957562, (GLfloat) 0.249144, (GLfloat) 0.144919, + (GLfloat) 0.959903, (GLfloat) 0.238290, (GLfloat) 0.147664, + (GLfloat) 0.959873, (GLfloat) 0.240404, (GLfloat) 0.144397, + (GLfloat) 0.861398, (GLfloat) 0.190399, (GLfloat) 0.470894, + (GLfloat) 0.864411, (GLfloat) 0.198309, (GLfloat) 0.462024, + (GLfloat) - 0.368470, (GLfloat) - 0.398468, (GLfloat) - 0.839912, + (GLfloat) - 0.366469, (GLfloat) - 0.378022, (GLfloat) - 0.850177, + (GLfloat) - 0.433076, (GLfloat) - 0.339336, (GLfloat) - 0.835043, + (GLfloat) - 0.426924, (GLfloat) - 0.323639, (GLfloat) - 0.844390, + (GLfloat) - 0.078376, (GLfloat) - 0.184951, (GLfloat) - 0.979617, + (GLfloat) - 0.089636, (GLfloat) - 0.204692, (GLfloat) - 0.974714, + (GLfloat) - 0.031836, (GLfloat) - 0.216104, (GLfloat) - 0.975851, + (GLfloat) - 0.037496, (GLfloat) - 0.237942, (GLfloat) - 0.970555, + (GLfloat) - 0.516334, (GLfloat) - 0.149595, (GLfloat) - 0.843220, + (GLfloat) - 0.522141, (GLfloat) - 0.155987, (GLfloat) - 0.838473, + (GLfloat) - 0.160863, (GLfloat) - 0.078983, (GLfloat) - 0.983811, + (GLfloat) - 0.162216, (GLfloat) - 0.080222, (GLfloat) - 0.983489, + (GLfloat) - 0.124313, (GLfloat) - 0.142798, (GLfloat) - 0.981914, + (GLfloat) - 0.134702, (GLfloat) - 0.155051, (GLfloat) - 0.978680, + (GLfloat) - 0.485511, (GLfloat) - 0.259251, (GLfloat) - 0.834906, + (GLfloat) - 0.481803, (GLfloat) - 0.253626, (GLfloat) - 0.838773, + (GLfloat) 0.539229, (GLfloat) 0.099743, (GLfloat) - 0.836232, + (GLfloat) 0.527244, (GLfloat) 0.088685, (GLfloat) - 0.845073, + (GLfloat) 0.560111, (GLfloat) 0.087128, (GLfloat) - 0.823823, + (GLfloat) 0.546849, (GLfloat) 0.072324, (GLfloat) - 0.834101, + (GLfloat) 0.201167, (GLfloat) - 0.045810, (GLfloat) - 0.978485, + (GLfloat) 0.215853, (GLfloat) - 0.030110, (GLfloat) - 0.975962, + (GLfloat) 0.175573, (GLfloat) - 0.002365, (GLfloat) - 0.984464, + (GLfloat) 0.184916, (GLfloat) 0.005715, (GLfloat) - 0.982738, + (GLfloat) 0.593439, (GLfloat) 0.077285, (GLfloat) - 0.801160, + (GLfloat) 0.587937, (GLfloat) 0.063575, (GLfloat) - 0.806405, + (GLfloat) 0.272897, (GLfloat) - 0.086428, (GLfloat) - 0.958153, + (GLfloat) 0.279890, (GLfloat) - 0.067483, (GLfloat) - 0.957657, + (GLfloat) 0.236530, (GLfloat) - 0.071307, (GLfloat) - 0.969004, + (GLfloat) 0.249518, (GLfloat) - 0.051953, (GLfloat) - 0.966975, + (GLfloat) 0.579087, (GLfloat) 0.080825, (GLfloat) - 0.811250, + (GLfloat) 0.568834, (GLfloat) 0.065408, (GLfloat) - 0.819847, + (GLfloat) - 0.366469, (GLfloat) - 0.378021, (GLfloat) 0.850177, + (GLfloat) - 0.368470, (GLfloat) - 0.398468, (GLfloat) 0.839912, + (GLfloat) - 0.031836, (GLfloat) - 0.216104, (GLfloat) 0.975851, + (GLfloat) - 0.037496, (GLfloat) - 0.237942, (GLfloat) 0.970555, + (GLfloat) - 0.089636, (GLfloat) - 0.204692, (GLfloat) 0.974714, + (GLfloat) - 0.078376, (GLfloat) - 0.184951, (GLfloat) 0.979617, + (GLfloat) - 0.433076, (GLfloat) - 0.339336, (GLfloat) 0.835043, + (GLfloat) - 0.426924, (GLfloat) - 0.323639, (GLfloat) 0.844389, + (GLfloat) 0.593439, (GLfloat) 0.077284, (GLfloat) 0.801160, + (GLfloat) 0.587937, (GLfloat) 0.063575, (GLfloat) 0.806405, + (GLfloat) 0.568834, (GLfloat) 0.065408, (GLfloat) 0.819847, + (GLfloat) 0.579087, (GLfloat) 0.080825, (GLfloat) 0.811249, + (GLfloat) 0.236530, (GLfloat) - 0.071307, (GLfloat) 0.969004, + (GLfloat) 0.249518, (GLfloat) - 0.051953, (GLfloat) 0.966975, + (GLfloat) 0.279890, (GLfloat) - 0.067483, (GLfloat) 0.957657, + (GLfloat) 0.272897, (GLfloat) - 0.086428, (GLfloat) 0.958153, + (GLfloat) 0.527244, (GLfloat) 0.088685, (GLfloat) 0.845073, + (GLfloat) 0.539229, (GLfloat) 0.099743, (GLfloat) 0.836232, + (GLfloat) 0.175573, (GLfloat) - 0.002365, (GLfloat) 0.984464, + (GLfloat) 0.184916, (GLfloat) 0.005715, (GLfloat) 0.982738, + (GLfloat) 0.215853, (GLfloat) - 0.030110, (GLfloat) 0.975962, + (GLfloat) 0.201167, (GLfloat) - 0.045810, (GLfloat) 0.978485, + (GLfloat) 0.560111, (GLfloat) 0.087128, (GLfloat) 0.823823, + (GLfloat) 0.546849, (GLfloat) 0.072324, (GLfloat) 0.834101, + (GLfloat) - 0.516334, (GLfloat) - 0.149595, (GLfloat) 0.843220, + (GLfloat) - 0.522141, (GLfloat) - 0.155986, (GLfloat) 0.838473, + (GLfloat) - 0.481803, (GLfloat) - 0.253626, (GLfloat) 0.838773, + (GLfloat) - 0.485511, (GLfloat) - 0.259250, (GLfloat) 0.834906, + (GLfloat) - 0.124313, (GLfloat) - 0.142798, (GLfloat) 0.981914, + (GLfloat) - 0.134702, (GLfloat) - 0.155051, (GLfloat) 0.978680, + (GLfloat) - 0.162216, (GLfloat) - 0.080222, (GLfloat) 0.983489, + (GLfloat) - 0.160863, (GLfloat) - 0.078982, (GLfloat) 0.983811, + (GLfloat) - 0.686861, (GLfloat) - 0.525025, (GLfloat) - 0.502564, + (GLfloat) - 0.684324, (GLfloat) - 0.536936, (GLfloat) - 0.493357, + (GLfloat) - 0.799089, (GLfloat) - 0.580700, (GLfloat) - 0.155709, + (GLfloat) - 0.801122, (GLfloat) - 0.576989, (GLfloat) - 0.159016, + (GLfloat) - 0.862913, (GLfloat) - 0.481876, (GLfloat) - 0.152238, + (GLfloat) - 0.863678, (GLfloat) - 0.479780, (GLfloat) - 0.154502, + (GLfloat) - 0.750556, (GLfloat) - 0.441554, (GLfloat) - 0.491625, + (GLfloat) - 0.750719, (GLfloat) - 0.448983, (GLfloat) - 0.484598, + (GLfloat) - 0.686861, (GLfloat) - 0.525025, (GLfloat) 0.502564, + (GLfloat) - 0.684324, (GLfloat) - 0.536936, (GLfloat) 0.493357, + (GLfloat) - 0.750719, (GLfloat) - 0.448983, (GLfloat) 0.484598, + (GLfloat) - 0.750556, (GLfloat) - 0.441554, (GLfloat) 0.491625, + (GLfloat) - 0.862913, (GLfloat) - 0.481876, (GLfloat) 0.152238, + (GLfloat) - 0.863678, (GLfloat) - 0.479780, (GLfloat) 0.154503, + (GLfloat) - 0.801122, (GLfloat) - 0.576990, (GLfloat) 0.159016, + (GLfloat) - 0.799089, (GLfloat) - 0.580700, (GLfloat) 0.155709, + (GLfloat) - 0.845506, (GLfloat) - 0.204102, (GLfloat) 0.493419, + (GLfloat) - 0.849139, (GLfloat) - 0.212205, (GLfloat) 0.483666, + (GLfloat) - 0.962881, (GLfloat) - 0.220433, (GLfloat) 0.155789, + (GLfloat) - 0.962834, (GLfloat) - 0.223594, (GLfloat) 0.151516, + (GLfloat) - 0.918492, (GLfloat) - 0.365350, (GLfloat) 0.151297, + (GLfloat) - 0.918584, (GLfloat) - 0.364876, (GLfloat) 0.151885, + (GLfloat) - 0.806201, (GLfloat) - 0.341087, (GLfloat) 0.483425, + (GLfloat) - 0.806184, (GLfloat) - 0.341015, (GLfloat) 0.483504, + (GLfloat) - 0.849139, (GLfloat) - 0.212204, (GLfloat) - 0.483666, + (GLfloat) - 0.845506, (GLfloat) - 0.204102, (GLfloat) - 0.493419, + (GLfloat) - 0.806201, (GLfloat) - 0.341087, (GLfloat) - 0.483425, + (GLfloat) - 0.806184, (GLfloat) - 0.341015, (GLfloat) - 0.483504, + (GLfloat) - 0.918584, (GLfloat) - 0.364876, (GLfloat) - 0.151885, + (GLfloat) - 0.918492, (GLfloat) - 0.365350, (GLfloat) - 0.151297, + (GLfloat) - 0.962881, (GLfloat) - 0.220433, (GLfloat) - 0.155789, + (GLfloat) - 0.962834, (GLfloat) - 0.223594, (GLfloat) - 0.151516, + (GLfloat) - 0.503594, (GLfloat) 0.204765, (GLfloat) - 0.839324, + (GLfloat) - 0.503594, (GLfloat) 0.204765, (GLfloat) - 0.839324, + (GLfloat) - 0.161047, (GLfloat) 0.200914, (GLfloat) - 0.966280, + (GLfloat) - 0.161047, (GLfloat) 0.200914, (GLfloat) - 0.966280, + (GLfloat) - 0.165393, (GLfloat) 0.154386, (GLfloat) - 0.974069, + (GLfloat) - 0.162365, (GLfloat) 0.156806, (GLfloat) - 0.974192, + (GLfloat) - 0.508257, (GLfloat) 0.155255, (GLfloat) - 0.847095, + (GLfloat) - 0.512203, (GLfloat) 0.151943, (GLfloat) - 0.845318, + (GLfloat) 0.503594, (GLfloat) 0.204765, (GLfloat) - 0.839324, + (GLfloat) 0.503594, (GLfloat) 0.204765, (GLfloat) - 0.839324, + (GLfloat) 0.506875, (GLfloat) 0.175794, (GLfloat) - 0.843904, + (GLfloat) 0.506455, (GLfloat) 0.176110, (GLfloat) - 0.844091, + (GLfloat) 0.160943, (GLfloat) 0.163176, (GLfloat) - 0.973381, + (GLfloat) 0.162221, (GLfloat) 0.162243, (GLfloat) - 0.973325, + (GLfloat) 0.161047, (GLfloat) 0.200914, (GLfloat) - 0.966280, + (GLfloat) 0.161047, (GLfloat) 0.200914, (GLfloat) - 0.966280, + (GLfloat) 0.521791, (GLfloat) 0.120579, (GLfloat) - 0.844509, + (GLfloat) 0.514604, (GLfloat) 0.123502, (GLfloat) - 0.848487, + (GLfloat) 0.164688, (GLfloat) 0.065494, (GLfloat) - 0.984169, + (GLfloat) 0.164274, (GLfloat) 0.065656, (GLfloat) - 0.984227, + (GLfloat) 0.162599, (GLfloat) 0.118143, (GLfloat) - 0.979594, + (GLfloat) 0.160323, (GLfloat) 0.119382, (GLfloat) - 0.979819, + (GLfloat) 0.509344, (GLfloat) 0.149891, (GLfloat) - 0.847409, + (GLfloat) 0.511715, (GLfloat) 0.148557, (GLfloat) - 0.846214, + (GLfloat) - 0.523595, (GLfloat) - 0.008036, (GLfloat) - 0.851929, + (GLfloat) - 0.537099, (GLfloat) - 0.019782, (GLfloat) - 0.843287, + (GLfloat) - 0.515557, (GLfloat) 0.088028, (GLfloat) - 0.852322, + (GLfloat) - 0.525730, (GLfloat) 0.079884, (GLfloat) - 0.846892, + (GLfloat) - 0.173169, (GLfloat) 0.095066, (GLfloat) - 0.980293, + (GLfloat) - 0.165823, (GLfloat) 0.100484, (GLfloat) - 0.981023, + (GLfloat) - 0.177991, (GLfloat) 0.018184, (GLfloat) - 0.983864, + (GLfloat) - 0.169802, (GLfloat) 0.024484, (GLfloat) - 0.985174, + (GLfloat) - 0.839324, (GLfloat) 0.204765, (GLfloat) - 0.503594, + (GLfloat) - 0.839323, (GLfloat) 0.204765, (GLfloat) - 0.503595, + (GLfloat) - 0.849441, (GLfloat) 0.151406, (GLfloat) - 0.505496, + (GLfloat) - 0.847954, (GLfloat) 0.148744, (GLfloat) - 0.508773, + (GLfloat) - 0.975887, (GLfloat) 0.146977, (GLfloat) - 0.161379, + (GLfloat) - 0.975827, (GLfloat) 0.145984, (GLfloat) - 0.162638, + (GLfloat) - 0.966280, (GLfloat) 0.200913, (GLfloat) - 0.161047, + (GLfloat) - 0.966280, (GLfloat) 0.200913, (GLfloat) - 0.161047, + (GLfloat) - 0.869115, (GLfloat) - 0.045798, (GLfloat) - 0.492485, + (GLfloat) - 0.862005, (GLfloat) - 0.035136, (GLfloat) - 0.505681, + (GLfloat) - 0.985988, (GLfloat) - 0.044696, (GLfloat) - 0.160715, + (GLfloat) - 0.986683, (GLfloat) - 0.048596, (GLfloat) - 0.155223, + (GLfloat) - 0.984333, (GLfloat) 0.067324, (GLfloat) - 0.162959, + (GLfloat) - 0.984743, (GLfloat) 0.069793, (GLfloat) - 0.159404, + (GLfloat) - 0.856976, (GLfloat) 0.069431, (GLfloat) - 0.510658, + (GLfloat) - 0.861737, (GLfloat) 0.075800, (GLfloat) - 0.501660, + (GLfloat) - 0.869115, (GLfloat) - 0.045798, (GLfloat) 0.492485, + (GLfloat) - 0.862005, (GLfloat) - 0.035136, (GLfloat) 0.505681, + (GLfloat) - 0.856976, (GLfloat) 0.069431, (GLfloat) 0.510659, + (GLfloat) - 0.861738, (GLfloat) 0.075800, (GLfloat) 0.501660, + (GLfloat) - 0.984743, (GLfloat) 0.069793, (GLfloat) 0.159404, + (GLfloat) - 0.984333, (GLfloat) 0.067324, (GLfloat) 0.162959, + (GLfloat) - 0.986683, (GLfloat) - 0.048596, (GLfloat) 0.155223, + (GLfloat) - 0.985988, (GLfloat) - 0.044696, (GLfloat) 0.160715, + (GLfloat) - 0.839324, (GLfloat) 0.204766, (GLfloat) 0.503594, + (GLfloat) - 0.839323, (GLfloat) 0.204765, (GLfloat) 0.503595, + (GLfloat) - 0.966280, (GLfloat) 0.200913, (GLfloat) 0.161047, + (GLfloat) - 0.966280, (GLfloat) 0.200913, (GLfloat) 0.161047, + (GLfloat) - 0.975887, (GLfloat) 0.146977, (GLfloat) 0.161379, + (GLfloat) - 0.975827, (GLfloat) 0.145984, (GLfloat) 0.162638, + (GLfloat) - 0.847954, (GLfloat) 0.148744, (GLfloat) 0.508773, + (GLfloat) - 0.849441, (GLfloat) 0.151406, (GLfloat) 0.505496, + (GLfloat) - 0.503594, (GLfloat) 0.204766, (GLfloat) 0.839324, + (GLfloat) - 0.503595, (GLfloat) 0.204765, (GLfloat) 0.839323, + (GLfloat) - 0.512203, (GLfloat) 0.151943, (GLfloat) 0.845318, + (GLfloat) - 0.508258, (GLfloat) 0.155255, (GLfloat) 0.847095, + (GLfloat) - 0.165393, (GLfloat) 0.154386, (GLfloat) 0.974069, + (GLfloat) - 0.162365, (GLfloat) 0.156806, (GLfloat) 0.974192, + (GLfloat) - 0.161047, (GLfloat) 0.200914, (GLfloat) 0.966280, + (GLfloat) - 0.161047, (GLfloat) 0.200914, (GLfloat) 0.966280, + (GLfloat) - 0.537099, (GLfloat) - 0.019782, (GLfloat) 0.843287, + (GLfloat) - 0.523595, (GLfloat) - 0.008036, (GLfloat) 0.851930, + (GLfloat) - 0.177991, (GLfloat) 0.018183, (GLfloat) 0.983864, + (GLfloat) - 0.169802, (GLfloat) 0.024484, (GLfloat) 0.985174, + (GLfloat) - 0.165823, (GLfloat) 0.100484, (GLfloat) 0.981023, + (GLfloat) - 0.173169, (GLfloat) 0.095066, (GLfloat) 0.980293, + (GLfloat) - 0.515557, (GLfloat) 0.088028, (GLfloat) 0.852322, + (GLfloat) - 0.525730, (GLfloat) 0.079884, (GLfloat) 0.846892, + (GLfloat) 0.514604, (GLfloat) 0.123503, (GLfloat) 0.848487, + (GLfloat) 0.521791, (GLfloat) 0.120579, (GLfloat) 0.844509, + (GLfloat) 0.509344, (GLfloat) 0.149891, (GLfloat) 0.847409, + (GLfloat) 0.511715, (GLfloat) 0.148557, (GLfloat) 0.846214, + (GLfloat) 0.160323, (GLfloat) 0.119382, (GLfloat) 0.979819, + (GLfloat) 0.162599, (GLfloat) 0.118143, (GLfloat) 0.979594, + (GLfloat) 0.164688, (GLfloat) 0.065494, (GLfloat) 0.984169, + (GLfloat) 0.164275, (GLfloat) 0.065655, (GLfloat) 0.984227, + (GLfloat) 0.503594, (GLfloat) 0.204766, (GLfloat) 0.839324, + (GLfloat) 0.503595, (GLfloat) 0.204765, (GLfloat) 0.839323, + (GLfloat) 0.161047, (GLfloat) 0.200914, (GLfloat) 0.966280, + (GLfloat) 0.161047, (GLfloat) 0.200914, (GLfloat) 0.966280, + (GLfloat) 0.160943, (GLfloat) 0.163176, (GLfloat) 0.973381, + (GLfloat) 0.162221, (GLfloat) 0.162243, (GLfloat) 0.973325, + (GLfloat) 0.506455, (GLfloat) 0.176110, (GLfloat) 0.844090, + (GLfloat) 0.506875, (GLfloat) 0.175794, (GLfloat) 0.843904, + (GLfloat) 0.839324, (GLfloat) 0.204766, (GLfloat) 0.503594, + (GLfloat) 0.839323, (GLfloat) 0.204765, (GLfloat) 0.503595, + (GLfloat) 0.842767, (GLfloat) 0.188271, (GLfloat) 0.504280, + (GLfloat) 0.842301, (GLfloat) 0.187401, (GLfloat) 0.505381, + (GLfloat) 0.968491, (GLfloat) 0.190085, (GLfloat) 0.160914, + (GLfloat) 0.968481, (GLfloat) 0.189712, (GLfloat) 0.161414, + (GLfloat) 0.966280, (GLfloat) 0.200913, (GLfloat) 0.161047, + (GLfloat) 0.966280, (GLfloat) 0.200913, (GLfloat) 0.161047, + (GLfloat) 0.850151, (GLfloat) 0.182077, (GLfloat) 0.494055, + (GLfloat) 0.846712, (GLfloat) 0.177186, (GLfloat) 0.501681, + (GLfloat) 0.966795, (GLfloat) 0.202453, (GLfloat) 0.155950, + (GLfloat) 0.966634, (GLfloat) 0.200782, (GLfloat) 0.159079, + (GLfloat) 0.968271, (GLfloat) 0.191230, (GLfloat) 0.160881, + (GLfloat) 0.968343, (GLfloat) 0.192206, (GLfloat) 0.159274, + (GLfloat) 0.844217, (GLfloat) 0.179436, (GLfloat) 0.505074, + (GLfloat) 0.845886, (GLfloat) 0.181962, (GLfloat) 0.501364, + (GLfloat) 0.846712, (GLfloat) 0.177186, (GLfloat) - 0.501682, + (GLfloat) 0.850151, (GLfloat) 0.182077, (GLfloat) - 0.494055, + (GLfloat) 0.844217, (GLfloat) 0.179436, (GLfloat) - 0.505074, + (GLfloat) 0.845886, (GLfloat) 0.181962, (GLfloat) - 0.501365, + (GLfloat) 0.968343, (GLfloat) 0.192206, (GLfloat) - 0.159274, + (GLfloat) 0.968271, (GLfloat) 0.191230, (GLfloat) - 0.160881, + (GLfloat) 0.966795, (GLfloat) 0.202453, (GLfloat) - 0.155950, + (GLfloat) 0.966634, (GLfloat) 0.200782, (GLfloat) - 0.159079, + (GLfloat) 0.839324, (GLfloat) 0.204765, (GLfloat) - 0.503594, + (GLfloat) 0.839323, (GLfloat) 0.204765, (GLfloat) - 0.503595, + (GLfloat) 0.966280, (GLfloat) 0.200913, (GLfloat) - 0.161047, + (GLfloat) 0.966280, (GLfloat) 0.200913, (GLfloat) - 0.161047, + (GLfloat) 0.968491, (GLfloat) 0.190085, (GLfloat) - 0.160914, + (GLfloat) 0.968481, (GLfloat) 0.189713, (GLfloat) - 0.161414, + (GLfloat) 0.842301, (GLfloat) 0.187401, (GLfloat) - 0.505381, + (GLfloat) 0.842767, (GLfloat) 0.188271, (GLfloat) - 0.504280, + (GLfloat) 0.831768, (GLfloat) 0.243104, (GLfloat) 0.499061, + (GLfloat) 0.831768, (GLfloat) 0.243103, (GLfloat) 0.499062, + (GLfloat) 0.957902, (GLfloat) 0.238609, (GLfloat) 0.159651, + (GLfloat) 0.957902, (GLfloat) 0.238611, (GLfloat) 0.159650, + (GLfloat) 0.982539, (GLfloat) 0.084307, (GLfloat) 0.165861, + (GLfloat) 0.982460, (GLfloat) 0.089222, (GLfloat) 0.163743, + (GLfloat) 0.853634, (GLfloat) 0.079021, (GLfloat) 0.514845, + (GLfloat) 0.854444, (GLfloat) 0.084251, (GLfloat) 0.512667, + (GLfloat) 0.831768, (GLfloat) 0.243103, (GLfloat) - 0.499062, + (GLfloat) 0.831768, (GLfloat) 0.243104, (GLfloat) - 0.499061, + (GLfloat) 0.853634, (GLfloat) 0.079020, (GLfloat) - 0.514845, + (GLfloat) 0.854444, (GLfloat) 0.084251, (GLfloat) - 0.512667, + (GLfloat) 0.982460, (GLfloat) 0.089222, (GLfloat) - 0.163743, + (GLfloat) 0.982539, (GLfloat) 0.084307, (GLfloat) - 0.165861, + (GLfloat) 0.957902, (GLfloat) 0.238609, (GLfloat) - 0.159651, + (GLfloat) 0.957902, (GLfloat) 0.238611, (GLfloat) - 0.159650, + (GLfloat) 0.283620, (GLfloat) - 0.936578, (GLfloat) - 0.205866, + (GLfloat) 0.264056, (GLfloat) - 0.947923, (GLfloat) - 0.178092, + (GLfloat) 0.315105, (GLfloat) - 0.946548, (GLfloat) - 0.068965, + (GLfloat) 0.304029, (GLfloat) - 0.949849, (GLfloat) - 0.073163, + (GLfloat) 0.811943, (GLfloat) - 0.566920, (GLfloat) - 0.139104, + (GLfloat) 0.830641, (GLfloat) - 0.534923, (GLfloat) - 0.154571, + (GLfloat) 0.677706, (GLfloat) - 0.609532, (GLfloat) - 0.411322, + (GLfloat) 0.690948, (GLfloat) - 0.577758, (GLfloat) - 0.434496, + (GLfloat) 0.264055, (GLfloat) - 0.947923, (GLfloat) 0.178092, + (GLfloat) 0.283620, (GLfloat) - 0.936578, (GLfloat) 0.205866, + (GLfloat) 0.677707, (GLfloat) - 0.609531, (GLfloat) 0.411322, + (GLfloat) 0.690948, (GLfloat) - 0.577758, (GLfloat) 0.434496, + (GLfloat) 0.830641, (GLfloat) - 0.534923, (GLfloat) 0.154571, + (GLfloat) 0.811943, (GLfloat) - 0.566920, (GLfloat) 0.139104, + (GLfloat) 0.304029, (GLfloat) - 0.949849, (GLfloat) 0.073163, + (GLfloat) 0.315105, (GLfloat) - 0.946548, (GLfloat) 0.068965, + (GLfloat) 0.499061, (GLfloat) 0.243103, (GLfloat) - 0.831768, + (GLfloat) 0.499061, (GLfloat) 0.243104, (GLfloat) - 0.831768, + (GLfloat) 0.159650, (GLfloat) 0.238610, (GLfloat) - 0.957902, + (GLfloat) 0.159651, (GLfloat) 0.238610, (GLfloat) - 0.957902, + (GLfloat) 0.165862, (GLfloat) 0.084307, (GLfloat) - 0.982539, + (GLfloat) 0.163744, (GLfloat) 0.089222, (GLfloat) - 0.982460, + (GLfloat) 0.514845, (GLfloat) 0.079019, (GLfloat) - 0.853634, + (GLfloat) 0.512666, (GLfloat) 0.084251, (GLfloat) - 0.854444, + (GLfloat) - 0.499061, (GLfloat) 0.243104, (GLfloat) - 0.831768, + (GLfloat) - 0.499061, (GLfloat) 0.243103, (GLfloat) - 0.831768, + (GLfloat) - 0.514845, (GLfloat) 0.079019, (GLfloat) - 0.853634, + (GLfloat) - 0.512666, (GLfloat) 0.084251, (GLfloat) - 0.854444, + (GLfloat) - 0.163744, (GLfloat) 0.089222, (GLfloat) - 0.982460, + (GLfloat) - 0.165862, (GLfloat) 0.084307, (GLfloat) - 0.982539, + (GLfloat) - 0.159650, (GLfloat) 0.238610, (GLfloat) - 0.957902, + (GLfloat) - 0.159651, (GLfloat) 0.238610, (GLfloat) - 0.957902, + (GLfloat) - 0.205866, (GLfloat) - 0.936578, (GLfloat) - 0.283621, + (GLfloat) - 0.178092, (GLfloat) - 0.947923, (GLfloat) - 0.264056, + (GLfloat) - 0.068965, (GLfloat) - 0.946548, (GLfloat) - 0.315105, + (GLfloat) - 0.073162, (GLfloat) - 0.949849, (GLfloat) - 0.304029, + (GLfloat) - 0.139105, (GLfloat) - 0.566920, (GLfloat) - 0.811943, + (GLfloat) - 0.154572, (GLfloat) - 0.534923, (GLfloat) - 0.830641, + (GLfloat) - 0.411321, (GLfloat) - 0.609532, (GLfloat) - 0.677706, + (GLfloat) - 0.434496, (GLfloat) - 0.577758, (GLfloat) - 0.690948, + (GLfloat) 0.178092, (GLfloat) - 0.947923, (GLfloat) - 0.264056, + (GLfloat) 0.205866, (GLfloat) - 0.936578, (GLfloat) - 0.283621, + (GLfloat) 0.411321, (GLfloat) - 0.609532, (GLfloat) - 0.677706, + (GLfloat) 0.434496, (GLfloat) - 0.577758, (GLfloat) - 0.690948, + (GLfloat) 0.154572, (GLfloat) - 0.534923, (GLfloat) - 0.830641, + (GLfloat) 0.139105, (GLfloat) - 0.566920, (GLfloat) - 0.811943, + (GLfloat) 0.073162, (GLfloat) - 0.949849, (GLfloat) - 0.304029, + (GLfloat) 0.068965, (GLfloat) - 0.946548, (GLfloat) - 0.315105, + (GLfloat) - 0.831768, (GLfloat) 0.243104, (GLfloat) - 0.499061, + (GLfloat) - 0.831768, (GLfloat) 0.243103, (GLfloat) - 0.499062, + (GLfloat) - 0.957902, (GLfloat) 0.238609, (GLfloat) - 0.159651, + (GLfloat) - 0.957902, (GLfloat) 0.238611, (GLfloat) - 0.159650, + (GLfloat) - 0.982539, (GLfloat) 0.084307, (GLfloat) - 0.165861, + (GLfloat) - 0.982460, (GLfloat) 0.089222, (GLfloat) - 0.163743, + (GLfloat) - 0.853634, (GLfloat) 0.079020, (GLfloat) - 0.514845, + (GLfloat) - 0.854444, (GLfloat) 0.084251, (GLfloat) - 0.512667, + (GLfloat) - 0.831768, (GLfloat) 0.243103, (GLfloat) 0.499062, + (GLfloat) - 0.831768, (GLfloat) 0.243104, (GLfloat) 0.499061, + (GLfloat) - 0.853634, (GLfloat) 0.079021, (GLfloat) 0.514845, + (GLfloat) - 0.854444, (GLfloat) 0.084251, (GLfloat) 0.512667, + (GLfloat) - 0.982460, (GLfloat) 0.089222, (GLfloat) 0.163743, + (GLfloat) - 0.982539, (GLfloat) 0.084307, (GLfloat) 0.165861, + (GLfloat) - 0.957902, (GLfloat) 0.238609, (GLfloat) 0.159651, + (GLfloat) - 0.957902, (GLfloat) 0.238611, (GLfloat) 0.159650, + (GLfloat) - 0.283620, (GLfloat) - 0.936578, (GLfloat) 0.205866, + (GLfloat) - 0.264055, (GLfloat) - 0.947923, (GLfloat) 0.178092, + (GLfloat) - 0.315105, (GLfloat) - 0.946548, (GLfloat) 0.068965, + (GLfloat) - 0.304029, (GLfloat) - 0.949849, (GLfloat) 0.073163, + (GLfloat) - 0.811943, (GLfloat) - 0.566920, (GLfloat) 0.139104, + (GLfloat) - 0.830641, (GLfloat) - 0.534923, (GLfloat) 0.154571, + (GLfloat) - 0.677707, (GLfloat) - 0.609531, (GLfloat) 0.411322, + (GLfloat) - 0.690948, (GLfloat) - 0.577758, (GLfloat) 0.434496, + (GLfloat) - 0.264056, (GLfloat) - 0.947923, (GLfloat) - 0.178092, + (GLfloat) - 0.283620, (GLfloat) - 0.936578, (GLfloat) - 0.205866, + (GLfloat) - 0.677706, (GLfloat) - 0.609532, (GLfloat) - 0.411322, + (GLfloat) - 0.690948, (GLfloat) - 0.577758, (GLfloat) - 0.434496, + (GLfloat) - 0.830641, (GLfloat) - 0.534923, (GLfloat) - 0.154571, + (GLfloat) - 0.811943, (GLfloat) - 0.566920, (GLfloat) - 0.139104, + (GLfloat) - 0.304029, (GLfloat) - 0.949849, (GLfloat) - 0.073163, + (GLfloat) - 0.315105, (GLfloat) - 0.946548, (GLfloat) - 0.068965, + (GLfloat) - 0.499061, (GLfloat) 0.243104, (GLfloat) 0.831769, + (GLfloat) - 0.499061, (GLfloat) 0.243103, (GLfloat) 0.831768, + (GLfloat) - 0.159650, (GLfloat) 0.238610, (GLfloat) 0.957902, + (GLfloat) - 0.159651, (GLfloat) 0.238610, (GLfloat) 0.957902, + (GLfloat) - 0.165862, (GLfloat) 0.084307, (GLfloat) 0.982539, + (GLfloat) - 0.163744, (GLfloat) 0.089222, (GLfloat) 0.982460, + (GLfloat) - 0.514844, (GLfloat) 0.079021, (GLfloat) 0.853634, + (GLfloat) - 0.512667, (GLfloat) 0.084251, (GLfloat) 0.854444, + (GLfloat) 0.499061, (GLfloat) 0.243103, (GLfloat) 0.831768, + (GLfloat) 0.499061, (GLfloat) 0.243104, (GLfloat) 0.831769, + (GLfloat) 0.514844, (GLfloat) 0.079021, (GLfloat) 0.853634, + (GLfloat) 0.512667, (GLfloat) 0.084251, (GLfloat) 0.854444, + (GLfloat) 0.163744, (GLfloat) 0.089222, (GLfloat) 0.982460, + (GLfloat) 0.165862, (GLfloat) 0.084307, (GLfloat) 0.982539, + (GLfloat) 0.159650, (GLfloat) 0.238610, (GLfloat) 0.957902, + (GLfloat) 0.159651, (GLfloat) 0.238610, (GLfloat) 0.957902, + (GLfloat) 0.205866, (GLfloat) - 0.936578, (GLfloat) 0.283621, + (GLfloat) 0.178092, (GLfloat) - 0.947923, (GLfloat) 0.264055, + (GLfloat) 0.068965, (GLfloat) - 0.946548, (GLfloat) 0.315105, + (GLfloat) 0.073162, (GLfloat) - 0.949849, (GLfloat) 0.304029, + (GLfloat) 0.139105, (GLfloat) - 0.566920, (GLfloat) 0.811943, + (GLfloat) 0.154572, (GLfloat) - 0.534923, (GLfloat) 0.830641, + (GLfloat) 0.411321, (GLfloat) - 0.609531, (GLfloat) 0.677707, + (GLfloat) 0.434496, (GLfloat) - 0.577757, (GLfloat) 0.690948, + (GLfloat) - 0.178092, (GLfloat) - 0.947923, (GLfloat) 0.264055, + (GLfloat) - 0.205866, (GLfloat) - 0.936578, (GLfloat) 0.283621, + (GLfloat) - 0.411321, (GLfloat) - 0.609531, (GLfloat) 0.677707, + (GLfloat) - 0.434496, (GLfloat) - 0.577757, (GLfloat) 0.690948, + (GLfloat) - 0.154572, (GLfloat) - 0.534923, (GLfloat) 0.830641, + (GLfloat) - 0.139105, (GLfloat) - 0.566920, (GLfloat) 0.811943, + (GLfloat) - 0.073162, (GLfloat) - 0.949849, (GLfloat) 0.304029, + (GLfloat) - 0.068965, (GLfloat) - 0.946548, (GLfloat) 0.315105, + (GLfloat) 0.135802, (GLfloat) - 0.982944, (GLfloat) - 0.124011, + (GLfloat) 0.124011, (GLfloat) - 0.982944, (GLfloat) - 0.135802, + (GLfloat) 0.043834, (GLfloat) - 0.993006, (GLfloat) - 0.109621, + (GLfloat) 0.039656, (GLfloat) - 0.992607, (GLfloat) - 0.114709, + (GLfloat) 0.030163, (GLfloat) - 0.998998, (GLfloat) - 0.033079, + (GLfloat) 0.033079, (GLfloat) - 0.998998, (GLfloat) - 0.030163, + (GLfloat) 0.109621, (GLfloat) - 0.993006, (GLfloat) - 0.043834, + (GLfloat) 0.114709, (GLfloat) - 0.992607, (GLfloat) - 0.039656, + (GLfloat) - 0.124011, (GLfloat) - 0.982944, (GLfloat) - 0.135802, + (GLfloat) - 0.135802, (GLfloat) - 0.982944, (GLfloat) - 0.124011, + (GLfloat) - 0.109621, (GLfloat) - 0.993006, (GLfloat) - 0.043834, + (GLfloat) - 0.114709, (GLfloat) - 0.992607, (GLfloat) - 0.039656, + (GLfloat) - 0.033079, (GLfloat) - 0.998998, (GLfloat) - 0.030163, + (GLfloat) - 0.030163, (GLfloat) - 0.998998, (GLfloat) - 0.033079, + (GLfloat) - 0.043834, (GLfloat) - 0.993006, (GLfloat) - 0.109621, + (GLfloat) - 0.039656, (GLfloat) - 0.992607, (GLfloat) - 0.114709, + (GLfloat) - 0.135803, (GLfloat) - 0.982944, (GLfloat) 0.124011, + (GLfloat) - 0.124011, (GLfloat) - 0.982944, (GLfloat) 0.135802, + (GLfloat) - 0.043834, (GLfloat) - 0.993006, (GLfloat) 0.109621, + (GLfloat) - 0.039656, (GLfloat) - 0.992607, (GLfloat) 0.114709, + (GLfloat) - 0.030163, (GLfloat) - 0.998998, (GLfloat) 0.033079, + (GLfloat) - 0.033079, (GLfloat) - 0.998998, (GLfloat) 0.030163, + (GLfloat) - 0.109621, (GLfloat) - 0.993006, (GLfloat) 0.043834, + (GLfloat) - 0.114709, (GLfloat) - 0.992607, (GLfloat) 0.039656, + (GLfloat) 0.124011, (GLfloat) - 0.982944, (GLfloat) 0.135802, + (GLfloat) 0.135803, (GLfloat) - 0.982944, (GLfloat) 0.124011, + (GLfloat) 0.109621, (GLfloat) - 0.993006, (GLfloat) 0.043834, + (GLfloat) 0.114709, (GLfloat) - 0.992607, (GLfloat) 0.039656, + (GLfloat) 0.033079, (GLfloat) - 0.998998, (GLfloat) 0.030163, + (GLfloat) 0.030163, (GLfloat) - 0.998998, (GLfloat) 0.033079, + (GLfloat) 0.043834, (GLfloat) - 0.993006, (GLfloat) 0.109621, + (GLfloat) 0.039656, (GLfloat) - 0.992607, (GLfloat) 0.114709, +}; + +static unsigned short int s1_6_POLS[] = +{ + 3, 82, 12, 76, 1, 3, 76, 74, 82, 1, 3, 22, 78, 74, 1, 3, 22, 74, 76, 1, + 3, 78, 20, 80, 1, 3, 80, 74, 78, 1, 3, 28, 82, 74, 1, 3, 28, 74, 80, 1, + 3, 88, 13, 84, 1, 3, 84, 77, 88, 1, 3, 24, 86, 77, 1, 3, 24, 77, 84, 1, + 3, 86, 20, 78, 1, 3, 78, 77, 86, 1, 3, 22, 88, 77, 1, 3, 22, 77, 78, 1, + 3, 14, 90, 85, 1, 3, 14, 85, 93, 1, 3, 26, 91, 85, 1, 3, 26, 85, 90, 1, + 3, 20, 86, 85, 1, 3, 20, 85, 91, 1, 3, 86, 24, 93, 1, 3, 93, 85, 86, 1, + 3, 15, 95, 79, 1, 3, 15, 79, 97, 1, 3, 95, 28, 80, 1, 3, 80, 79, 95, 1, + 3, 20, 91, 79, 1, 3, 20, 79, 80, 1, 3, 26, 97, 79, 1, 3, 26, 79, 91, 1, + 3, 13, 99, 83, 1, 3, 13, 83, 84, 1, 3, 99, 30, 101, 1, 3, 101, 83, 99, 1, + 3, 23, 102, 83, 1, 3, 23, 83, 101, 1, 3, 102, 24, 84, 1, 3, 84, 83, 102, 1, + 3, 108, 16, 104, 1, 3, 104, 100, 108, 1, 3, 32, 106, 100, 1, 3, 32, 100, 104, 1, + 3, 106, 23, 101, 1, 3, 101, 100, 106, 1, 3, 30, 108, 100, 1, 3, 30, 100, 101, 1, + 3, 17, 110, 105, 1, 3, 17, 105, 113, 1, 3, 110, 33, 111, 1, 3, 111, 105, 110, 1, + 3, 23, 106, 105, 1, 3, 23, 105, 111, 1, 3, 106, 32, 113, 1, 3, 113, 105, 106, 1, + 3, 114, 14, 93, 1, 3, 93, 92, 114, 1, 3, 93, 24, 102, 1, 3, 102, 92, 93, 1, +3, 23, 111, 92, 1, 3, 23, 92, 102, 1, 3, 111, 33, 114, 1, 3, 114, 92, 111, 1, + 3, 16, 116, 103, 1, 3, 16, 103, 104, 1, 3, 116, 35, 118, 1, 3, 118, 103, 116, 1, + 3, 31, 119, 103, 1, 3, 31, 103, 118, 1, 3, 119, 32, 104, 1, 3, 104, 103, 119, 1, + 3, 18, 121, 117, 1, 3, 18, 117, 125, 1, 3, 121, 36, 123, 1, 3, 123, 117, 121, 1, + 3, 31, 118, 117, 1, 3, 31, 117, 123, 1, 3, 118, 35, 125, 1, 3, 125, 117, 118, 1, + 3, 19, 127, 122, 1, 3, 19, 122, 130, 1, 3, 37, 128, 122, 1, 3, 37, 122, 127, 1, + 3, 31, 123, 122, 1, 3, 31, 122, 128, 1, 3, 36, 130, 122, 1, 3, 36, 122, 123, 1, + 3, 17, 113, 112, 1, 3, 17, 112, 131, 1, 3, 32, 119, 112, 1, 3, 32, 112, 113, 1, + 3, 31, 128, 112, 1, 3, 31, 112, 119, 1, 3, 37, 131, 112, 1, 3, 37, 112, 128, 1, + 3, 121, 18, 133, 1, 3, 133, 120, 121, 1, 3, 39, 134, 120, 1, 3, 39, 120, 133, 1, + 3, 134, 27, 135, 1, 3, 135, 120, 134, 1, 3, 36, 121, 120, 1, 3, 36, 120, 135, 1, + 3, 12, 82, 81, 1, 3, 12, 81, 138, 1, 3, 82, 28, 136, 1, 3, 136, 81, 82, 1, +3, 27, 134, 81, 1, 3, 27, 81, 136, 1, 3, 134, 39, 138, 1, 3, 138, 81, 134, 1, +3, 95, 15, 139, 1, 3, 139, 94, 95, 1, 3, 139, 40, 140, 1, 3, 140, 94, 139, 1, + 3, 27, 136, 94, 1, 3, 27, 94, 140, 1, 3, 136, 28, 95, 1, 3, 95, 94, 136, 1, + 3, 19, 130, 129, 1, 3, 19, 129, 141, 1, 3, 130, 36, 135, 1, 3, 135, 129, 130, 1, + 3, 27, 140, 129, 1, 3, 27, 129, 135, 1, 3, 140, 40, 141, 1, 3, 141, 129, 140, 1, + 3, 14, 114, 89, 1, 3, 14, 89, 90, 1, 3, 114, 33, 142, 1, 3, 142, 89, 114, 1, + 3, 25, 143, 89, 1, 3, 25, 89, 142, 1, 3, 143, 26, 90, 1, 3, 90, 89, 143, 1, + 3, 17, 131, 109, 1, 3, 17, 109, 110, 1, 3, 131, 37, 144, 1, 3, 144, 109, 131, 1, + 3, 25, 142, 109, 1, 3, 25, 109, 144, 1, 3, 142, 33, 110, 1, 3, 110, 109, 142, 1, + 3, 19, 141, 126, 1, 3, 19, 126, 127, 1, 3, 141, 40, 145, 1, 3, 145, 126, 141, 1, + 3, 25, 144, 126, 1, 3, 25, 126, 145, 1, 3, 144, 37, 127, 1, 3, 127, 126, 144, 1, + 3, 15, 97, 96, 1, 3, 15, 96, 139, 1, 3, 97, 26, 143, 1, 3, 143, 96, 97, 1, +3, 25, 145, 96, 1, 3, 25, 96, 143, 1, 3, 145, 40, 139, 1, 3, 139, 96, 145, 1, + 3, 12, 146, 75, 1, 3, 12, 75, 76, 1, 3, 146, 41, 148, 1, 3, 148, 75, 146, 1, + 3, 21, 149, 75, 1, 3, 21, 75, 148, 1, 3, 149, 22, 76, 1, 3, 76, 75, 149, 1, + 3, 155, 8, 151, 1, 3, 151, 147, 155, 1, 3, 43, 153, 147, 1, 3, 43, 147, 151, 1, + 3, 153, 21, 148, 1, 3, 148, 147, 153, 1, 3, 41, 155, 147, 1, 3, 41, 147, 148, 1, + 3, 160, 11, 157, 1, 3, 157, 152, 160, 1, 3, 44, 158, 152, 1, 3, 44, 152, 157, 1, + 3, 158, 21, 153, 1, 3, 153, 152, 158, 1, 3, 43, 160, 152, 1, 3, 43, 152, 153, 1, + 3, 13, 88, 87, 1, 3, 13, 87, 161, 1, 3, 88, 22, 149, 1, 3, 149, 87, 88, 1, +3, 21, 158, 87, 1, 3, 21, 87, 149, 1, 3, 158, 44, 161, 1, 3, 161, 87, 158, 1, + 3, 18, 162, 132, 1, 3, 18, 132, 133, 1, 3, 162, 45, 164, 1, 3, 164, 132, 162, 1, + 3, 38, 165, 132, 1, 3, 38, 132, 164, 1, 3, 165, 39, 133, 1, 3, 133, 132, 165, 1, + 3, 170, 9, 167, 1, 3, 167, 163, 170, 1, 3, 47, 168, 163, 1, 3, 47, 163, 167, 1, + 3, 168, 38, 164, 1, 3, 164, 163, 168, 1, 3, 45, 170, 163, 1, 3, 45, 163, 164, 1, +3, 8, 155, 154, 1, 3, 8, 154, 173, 1, 3, 155, 41, 171, 1, 3, 171, 154, 155, 1, + 3, 38, 168, 154, 1, 3, 38, 154, 171, 1, 3, 168, 47, 173, 1, 3, 173, 154, 168, 1, + 3, 146, 12, 138, 1, 3, 138, 137, 146, 1, 3, 39, 165, 137, 1, 3, 39, 137, 138, 1, + 3, 165, 38, 171, 1, 3, 171, 137, 165, 1, 3, 41, 146, 137, 1, 3, 41, 137, 171, 1, + 3, 16, 108, 107, 1, 3, 16, 107, 177, 1, 3, 108, 30, 174, 1, 3, 174, 107, 108, 1, + 3, 29, 176, 107, 1, 3, 29, 107, 174, 1, 3, 176, 50, 177, 1, 3, 177, 107, 176, 1, + 3, 99, 13, 161, 1, 3, 161, 98, 99, 1, 3, 44, 178, 98, 1, 3, 44, 98, 161, 1, + 3, 178, 29, 174, 1, 3, 174, 98, 178, 1, 3, 30, 99, 98, 1, 3, 30, 98, 174, 1, + 3, 11, 180, 156, 1, 3, 11, 156, 157, 1, 3, 180, 49, 181, 1, 3, 181, 156, 180, 1, + 3, 29, 178, 156, 1, 3, 29, 156, 181, 1, 3, 178, 44, 157, 1, 3, 157, 156, 178, 1, + 3, 185, 10, 183, 1, 3, 183, 175, 185, 1, 3, 50, 176, 175, 1, 3, 50, 175, 183, 1, + 3, 176, 29, 181, 1, 3, 181, 175, 176, 1, 3, 49, 185, 175, 1, 3, 49, 175, 181, 1, + 3, 162, 18, 125, 1, 3, 125, 124, 162, 1, 3, 35, 186, 124, 1, 3, 35, 124, 125, 1, + 3, 186, 34, 187, 1, 3, 187, 124, 186, 1, 3, 45, 162, 124, 1, 3, 45, 124, 187, 1, + 3, 116, 16, 177, 1, 3, 177, 115, 116, 1, 3, 50, 188, 115, 1, 3, 50, 115, 177, 1, + 3, 188, 34, 186, 1, 3, 186, 115, 188, 1, 3, 35, 116, 115, 1, 3, 35, 115, 186, 1, + 3, 10, 190, 182, 1, 3, 10, 182, 183, 1, 3, 190, 52, 191, 1, 3, 191, 182, 190, 1, + 3, 34, 188, 182, 1, 3, 34, 182, 191, 1, 3, 188, 50, 183, 1, 3, 183, 182, 188, 1, +3, 9, 170, 169, 1, 3, 9, 169, 193, 1, 3, 170, 45, 187, 1, 3, 187, 169, 170, 1, + 3, 34, 191, 169, 1, 3, 34, 169, 187, 1, 3, 191, 52, 193, 1, 3, 193, 169, 191, 1, + 3, 201, 1, 196, 1, 3, 196, 194, 201, 1, 3, 54, 198, 194, 1, 3, 54, 194, 196, 1, + 3, 198, 46, 199, 1, 3, 199, 194, 198, 1, 3, 56, 201, 194, 1, 3, 56, 194, 199, 1, + 3, 206, 3, 203, 1, 3, 203, 197, 206, 1, 3, 55, 204, 197, 1, 3, 55, 197, 203, 1, + 3, 204, 46, 198, 1, 3, 198, 197, 204, 1, 3, 54, 206, 197, 1, 3, 54, 197, 198, 1, +3, 8, 173, 172, 1, 3, 8, 172, 208, 1, 3, 173, 47, 207, 1, 3, 207, 172, 173, 1, + 3, 46, 204, 172, 1, 3, 46, 172, 207, 1, 3, 204, 55, 208, 1, 3, 208, 172, 204, 1, +3, 9, 209, 166, 1, 3, 9, 166, 167, 1, 3, 209, 56, 199, 1, 3, 199, 166, 209, 1, + 3, 46, 207, 166, 1, 3, 46, 166, 199, 1, 3, 207, 47, 167, 1, 3, 167, 166, 207, 1, + 3, 214, 1, 201, 1, 3, 201, 200, 214, 1, 3, 56, 210, 200, 1, 3, 56, 200, 201, 1, + 3, 210, 51, 212, 1, 3, 212, 200, 210, 1, 3, 59, 214, 200, 1, 3, 59, 200, 212, 1, + 3, 209, 9, 193, 1, 3, 193, 192, 209, 1, 3, 52, 215, 192, 1, 3, 52, 192, 193, 1, + 3, 51, 210, 192, 1, 3, 51, 192, 215, 1, 3, 210, 56, 209, 1, 3, 209, 192, 210, 1, + 3, 190, 10, 216, 1, 3, 216, 189, 190, 1, 3, 216, 57, 217, 1, 3, 217, 189, 216, 1, + 3, 51, 215, 189, 1, 3, 51, 189, 217, 1, 3, 52, 190, 189, 1, 3, 52, 189, 215, 1, + 3, 221, 0, 219, 1, 3, 219, 211, 221, 1, 3, 59, 212, 211, 1, 3, 59, 211, 219, 1, + 3, 212, 51, 217, 1, 3, 217, 211, 212, 1, 3, 57, 221, 211, 1, 3, 57, 211, 217, 1, + 3, 226, 0, 221, 1, 3, 221, 220, 226, 1, 3, 57, 222, 220, 1, 3, 57, 220, 221, 1, + 3, 222, 48, 224, 1, 3, 224, 220, 222, 1, 3, 62, 226, 220, 1, 3, 62, 220, 224, 1, + 3, 10, 185, 184, 1, 3, 10, 184, 216, 1, 3, 185, 49, 227, 1, 3, 227, 184, 185, 1, + 3, 48, 222, 184, 1, 3, 48, 184, 227, 1, 3, 222, 57, 216, 1, 3, 216, 184, 222, 1, + 3, 11, 228, 179, 1, 3, 11, 179, 180, 1, 3, 228, 60, 229, 1, 3, 229, 179, 228, 1, + 3, 48, 227, 179, 1, 3, 48, 179, 229, 1, 3, 227, 49, 180, 1, 3, 180, 179, 227, 1, + 3, 233, 2, 231, 1, 3, 231, 223, 233, 1, 3, 62, 224, 223, 1, 3, 62, 223, 231, 1, + 3, 224, 48, 229, 1, 3, 229, 223, 224, 1, 3, 60, 233, 223, 1, 3, 60, 223, 229, 1, + 3, 237, 2, 233, 1, 3, 233, 232, 237, 1, 3, 60, 234, 232, 1, 3, 60, 232, 233, 1, + 3, 234, 42, 235, 1, 3, 235, 232, 234, 1, 3, 64, 237, 232, 1, 3, 64, 232, 235, 1, + 3, 11, 160, 159, 1, 3, 11, 159, 228, 1, 3, 160, 43, 238, 1, 3, 238, 159, 160, 1, + 3, 42, 234, 159, 1, 3, 42, 159, 238, 1, 3, 234, 60, 228, 1, 3, 228, 159, 234, 1, +3, 8, 208, 150, 1, 3, 8, 150, 151, 1, 3, 208, 55, 239, 1, 3, 239, 150, 208, 1, + 3, 42, 238, 150, 1, 3, 42, 150, 239, 1, 3, 238, 43, 151, 1, 3, 151, 150, 238, 1, + 3, 203, 3, 241, 1, 3, 241, 202, 203, 1, 3, 64, 235, 202, 1, 3, 64, 202, 241, 1, + 3, 235, 42, 239, 1, 3, 239, 202, 235, 1, 3, 55, 203, 202, 1, 3, 55, 202, 239, 1, +3, 2, 237, 236, 1, 3, 2, 236, 245, 1, 3, 237, 64, 242, 1, 3, 242, 236, 237, 1, + 3, 63, 244, 236, 1, 3, 63, 236, 242, 1, 3, 244, 68, 245, 1, 3, 245, 236, 244, 1, +3, 3, 246, 240, 1, 3, 3, 240, 241, 1, 3, 246, 65, 248, 1, 3, 248, 240, 246, 1, + 3, 63, 242, 240, 1, 3, 63, 240, 248, 1, 3, 242, 64, 241, 1, 3, 241, 240, 242, 1, +3, 4, 250, 247, 1, 3, 4, 247, 253, 1, 3, 67, 251, 247, 1, 3, 67, 247, 250, 1, + 3, 63, 248, 247, 1, 3, 63, 247, 251, 1, 3, 248, 65, 253, 1, 3, 253, 247, 248, 1, +3, 7, 255, 243, 1, 3, 7, 243, 257, 1, 3, 255, 68, 244, 1, 3, 244, 243, 255, 1, + 3, 63, 251, 243, 1, 3, 63, 243, 244, 1, 3, 67, 257, 243, 1, 3, 67, 243, 251, 1, +3, 3, 206, 205, 1, 3, 3, 205, 246, 1, 3, 206, 54, 258, 1, 3, 258, 205, 206, 1, + 3, 53, 259, 205, 1, 3, 53, 205, 258, 1, 3, 259, 65, 246, 1, 3, 246, 205, 259, 1, +3, 1, 260, 195, 1, 3, 1, 195, 196, 1, 3, 260, 69, 262, 1, 3, 262, 195, 260, 1, + 3, 53, 258, 195, 1, 3, 53, 195, 262, 1, 3, 258, 54, 196, 1, 3, 196, 195, 258, 1, +3, 5, 264, 261, 1, 3, 5, 261, 267, 1, 3, 70, 265, 261, 1, 3, 70, 261, 264, 1, + 3, 53, 262, 261, 1, 3, 53, 261, 265, 1, 3, 262, 69, 267, 1, 3, 267, 261, 262, 1, +3, 4, 253, 252, 1, 3, 4, 252, 268, 1, 3, 253, 65, 259, 1, 3, 259, 252, 253, 1, + 3, 53, 265, 252, 1, 3, 53, 252, 259, 1, 3, 70, 268, 252, 1, 3, 70, 252, 265, 1, +3, 1, 214, 213, 1, 3, 1, 213, 260, 1, 3, 214, 59, 269, 1, 3, 269, 213, 214, 1, + 3, 58, 270, 213, 1, 3, 58, 213, 269, 1, 3, 270, 69, 260, 1, 3, 260, 213, 270, 1, +3, 0, 271, 218, 1, 3, 0, 218, 219, 1, 3, 271, 71, 273, 1, 3, 273, 218, 271, 1, + 3, 58, 269, 218, 1, 3, 58, 218, 273, 1, 3, 269, 59, 219, 1, 3, 219, 218, 269, 1, +3, 6, 275, 272, 1, 3, 6, 272, 278, 1, 3, 72, 276, 272, 1, 3, 72, 272, 275, 1, + 3, 58, 273, 272, 1, 3, 58, 272, 276, 1, 3, 273, 71, 278, 1, 3, 278, 272, 273, 1, +3, 5, 267, 266, 1, 3, 5, 266, 279, 1, 3, 267, 69, 270, 1, 3, 270, 266, 267, 1, + 3, 58, 276, 266, 1, 3, 58, 266, 270, 1, 3, 72, 279, 266, 1, 3, 72, 266, 276, 1, +3, 0, 226, 225, 1, 3, 0, 225, 271, 1, 3, 226, 62, 280, 1, 3, 280, 225, 226, 1, + 3, 61, 281, 225, 1, 3, 61, 225, 280, 1, 3, 281, 71, 271, 1, 3, 271, 225, 281, 1, +3, 2, 245, 230, 1, 3, 2, 230, 231, 1, 3, 245, 68, 282, 1, 3, 282, 230, 245, 1, + 3, 61, 280, 230, 1, 3, 61, 230, 282, 1, 3, 280, 62, 231, 1, 3, 231, 230, 280, 1, +3, 7, 283, 254, 1, 3, 7, 254, 255, 1, 3, 73, 284, 254, 1, 3, 73, 254, 283, 1, + 3, 61, 282, 254, 1, 3, 61, 254, 284, 1, 3, 282, 68, 255, 1, 3, 255, 254, 282, 1, +3, 6, 278, 277, 1, 3, 6, 277, 285, 1, 3, 278, 71, 281, 1, 3, 281, 277, 278, 1, + 3, 61, 284, 277, 1, 3, 61, 277, 281, 1, 3, 73, 285, 277, 1, 3, 73, 277, 284, 1, +3, 4, 268, 249, 1, 3, 4, 249, 250, 1, 3, 268, 70, 286, 1, 3, 286, 249, 268, 1, + 3, 66, 287, 249, 1, 3, 66, 249, 286, 1, 3, 287, 67, 250, 1, 3, 250, 249, 287, 1, +3, 5, 279, 263, 1, 3, 5, 263, 264, 1, 3, 279, 72, 288, 1, 3, 288, 263, 279, 1, + 3, 66, 286, 263, 1, 3, 66, 263, 288, 1, 3, 286, 70, 264, 1, 3, 264, 263, 286, 1, +3, 6, 285, 274, 1, 3, 6, 274, 275, 1, 3, 285, 73, 289, 1, 3, 289, 274, 285, 1, + 3, 66, 288, 274, 1, 3, 66, 274, 289, 1, 3, 288, 72, 275, 1, 3, 275, 274, 288, 1, +3, 7, 257, 256, 1, 3, 7, 256, 283, 1, 3, 257, 67, 287, 1, 3, 287, 256, 257, 1, + 3, 66, 289, 256, 1, 3, 66, 256, 287, 1, 3, 289, 73, 283, 1, 3, 283, 256, 289, 1, + + 0 +}; + +struct lwo LWO_s1_6 = +{ + 290, /* number of points */ + s1_6_PNTS, s1_6_normals, s1_6_POLS, 0L +}; + +#endif /* USE_GL */ + +/* End of s1_6.c */ diff --git a/hacks/glx/s1_b.c b/hacks/glx/s1_b.c new file mode 100644 index 00000000..5aca3911 --- /dev/null +++ b/hacks/glx/s1_b.c @@ -0,0 +1,537 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_b.c 4.2 97/04/20 xlockmore"; + +#endif + +/*- + * Points to render "s1_b" in 3D. + * + * Generated by lw2ogl. Link this with your program but do + * not edit by hand. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef USE_GL + +#ifdef STANDALONE +#include +#endif +#include +#include "buildlwo.h" + +static GLfloat s1_b_PNTS[] = +{ + (GLfloat) - 0.137893, (GLfloat) 0.043508, (GLfloat) - 0.125711, + (GLfloat) - 0.095845, (GLfloat) - 0.165656, (GLfloat) 0.072892, + (GLfloat) - 0.093165, (GLfloat) 0.152051, (GLfloat) 0.327744, + (GLfloat) - 0.003795, (GLfloat) 0.001470, (GLfloat) - 0.102225, + (GLfloat) 0.152845, (GLfloat) - 0.430757, (GLfloat) - 0.031907, + (GLfloat) - 0.118828, (GLfloat) 0.399389, (GLfloat) 0.091047, + (GLfloat) - 0.169137, (GLfloat) - 0.181241, (GLfloat) - 0.288763, + (GLfloat) 0.048660, (GLfloat) 0.018262, (GLfloat) - 0.035049, + (GLfloat) 0.008859, (GLfloat) 0.208004, (GLfloat) - 0.059048, + (GLfloat) - 0.009212, (GLfloat) - 0.042229, (GLfloat) - 0.000692, + (GLfloat) - 0.040025, (GLfloat) 0.115695, (GLfloat) 0.178962, + (GLfloat) - 0.198525, (GLfloat) 0.018630, (GLfloat) 0.257202, + (GLfloat) 0.205081, (GLfloat) - 0.244569, (GLfloat) 0.136314, + (GLfloat) - 0.214336, (GLfloat) - 0.149946, (GLfloat) - 0.006872, + (GLfloat) 0.245675, (GLfloat) - 0.227316, (GLfloat) - 0.184201, + (GLfloat) - 0.001494, (GLfloat) 0.259139, (GLfloat) - 0.260652, + (GLfloat) 0.070243, (GLfloat) 0.038750, (GLfloat) 0.069425, + (GLfloat) - 0.033229, (GLfloat) - 0.259151, (GLfloat) 0.298856, + (GLfloat) 0.088773, (GLfloat) - 0.065324, (GLfloat) 0.260294, + (GLfloat) 0.009195, (GLfloat) 0.078651, (GLfloat) 0.055543, + (GLfloat) - 0.090795, (GLfloat) 0.025672, (GLfloat) 0.056988, + (GLfloat) - 0.163707, (GLfloat) - 0.011627, (GLfloat) - 0.096395, + (GLfloat) 0.068886, (GLfloat) 0.257031, (GLfloat) - 0.264175, + (GLfloat) - 0.018086, (GLfloat) - 0.285526, (GLfloat) 0.152989, + (GLfloat) - 0.017489, (GLfloat) 0.031671, (GLfloat) 0.000107, + (GLfloat) - 0.075583, (GLfloat) - 0.097617, (GLfloat) 0.030074, + (GLfloat) 0.129221, (GLfloat) - 0.087628, (GLfloat) 0.171748, + (GLfloat) - 0.007530, (GLfloat) - 0.084194, (GLfloat) 0.186045, + (GLfloat) 0.474638, (GLfloat) 0.004818, (GLfloat) 0.200460, + (GLfloat) 0.016796, (GLfloat) 0.096614, (GLfloat) - 0.221351, + (GLfloat) 0.187032, (GLfloat) 0.031017, (GLfloat) 0.039986, + (GLfloat) - 0.142119, (GLfloat) - 0.105297, (GLfloat) - 0.100849, + (GLfloat) 0.142768, (GLfloat) - 0.313960, (GLfloat) - 0.349716, + (GLfloat) - 0.146805, (GLfloat) 0.140482, (GLfloat) 0.035653, + (GLfloat) 0.039939, (GLfloat) - 0.051822, (GLfloat) - 0.017672, + (GLfloat) 0.057111, (GLfloat) - 0.075686, (GLfloat) - 0.103478, + (GLfloat) 0.049696, (GLfloat) - 0.135070, (GLfloat) 0.055097, + (GLfloat) 0.030271, (GLfloat) 0.075412, (GLfloat) - 0.103571, + (GLfloat) 0.100158, (GLfloat) - 0.022917, (GLfloat) 0.073895, + (GLfloat) 0.085544, (GLfloat) - 0.273613, (GLfloat) 0.092456, + (GLfloat) 0.077489, (GLfloat) - 0.309836, (GLfloat) - 0.003664, + (GLfloat) - 0.017590, (GLfloat) - 0.127869, (GLfloat) 0.153118, + (GLfloat) - 0.157014, (GLfloat) - 0.242184, (GLfloat) 0.070478, + (GLfloat) - 0.018167, (GLfloat) - 0.133639, (GLfloat) - 0.174937, + (GLfloat) - 0.106973, (GLfloat) - 0.189783, (GLfloat) 0.038622, + (GLfloat) - 0.000096, (GLfloat) 0.104429, (GLfloat) - 0.032589, + (GLfloat) - 0.032036, (GLfloat) - 0.021493, (GLfloat) 0.279829, + (GLfloat) - 0.093181, (GLfloat) - 0.058024, (GLfloat) 0.182239, + (GLfloat) 0.012941, (GLfloat) - 0.010409, (GLfloat) 0.088080, + (GLfloat) 0.256718, (GLfloat) - 0.118137, (GLfloat) - 0.078847, + (GLfloat) - 0.113382, (GLfloat) 0.135060, (GLfloat) 0.269946, + (GLfloat) 0.175810, (GLfloat) - 0.026321, (GLfloat) 0.013860, + (GLfloat) - 0.110606, (GLfloat) - 0.023553, (GLfloat) - 0.255525, + (GLfloat) 0.007163, (GLfloat) 0.068674, (GLfloat) 0.010214, + (GLfloat) 0.031631, (GLfloat) - 0.170381, (GLfloat) - 0.174604, + (GLfloat) 0.117242, (GLfloat) 0.014353, (GLfloat) - 0.021215, + (GLfloat) 0.090315, (GLfloat) 0.161755, (GLfloat) 0.074427, + (GLfloat) 0.285616, (GLfloat) 0.335824, (GLfloat) - 0.083891, + (GLfloat) - 0.145763, (GLfloat) 0.109292, (GLfloat) 0.121340, + (GLfloat) - 0.147459, (GLfloat) - 0.041936, (GLfloat) 0.010427, + (GLfloat) - 0.082626, (GLfloat) 0.151300, (GLfloat) - 0.030875, + (GLfloat) 0.217154, (GLfloat) - 0.288504, (GLfloat) - 0.202483, + (GLfloat) 0.026532, (GLfloat) - 0.106796, (GLfloat) 0.121041, + (GLfloat) 0.046695, (GLfloat) - 0.033673, (GLfloat) - 0.043721, + (GLfloat) 0.135596, (GLfloat) 0.217426, (GLfloat) - 0.219631, + (GLfloat) 0.137627, (GLfloat) 0.026335, (GLfloat) - 0.082390, + (GLfloat) - 0.031665, (GLfloat) - 0.115897, (GLfloat) 0.077834, + (GLfloat) - 0.214922, (GLfloat) - 0.162169, (GLfloat) 0.073035, + (GLfloat) - 0.076108, (GLfloat) 0.200481, (GLfloat) 0.036119, + (GLfloat) 0.012715, (GLfloat) - 0.161921, (GLfloat) 0.179804, + (GLfloat) 0.140409, (GLfloat) - 0.165899, (GLfloat) - 0.005149, + (GLfloat) - 0.054606, (GLfloat) 0.011149, (GLfloat) 0.045768, + (GLfloat) 0.116640, (GLfloat) - 0.180314, (GLfloat) 0.045320, + (GLfloat) 0.342166, (GLfloat) 0.295895, (GLfloat) - 0.049250, + (GLfloat) - 0.133242, (GLfloat) 0.129064, (GLfloat) 0.136969, + (GLfloat) 0.137520, (GLfloat) - 0.387145, (GLfloat) 0.132137, + (GLfloat) 0.023302, (GLfloat) 0.194298, (GLfloat) - 0.066187, + (GLfloat) 0.089302, (GLfloat) 0.128683, (GLfloat) - 0.072530, + (GLfloat) - 0.141374, (GLfloat) 0.035924, (GLfloat) - 0.079354, + (GLfloat) - 0.209233, (GLfloat) 0.018987, (GLfloat) - 0.004193, + (GLfloat) 0.156295, (GLfloat) - 0.034087, (GLfloat) 0.344315, + (GLfloat) - 0.005946, (GLfloat) 0.039791, (GLfloat) 0.071862, + (GLfloat) 0.076043, (GLfloat) - 0.094430, (GLfloat) 0.090122, + (GLfloat) 0.127394, (GLfloat) 0.031466, (GLfloat) - 0.028015, + (GLfloat) - 0.061000, (GLfloat) 0.169741, (GLfloat) - 0.127635, + (GLfloat) - 0.015117, (GLfloat) - 0.160883, (GLfloat) - 0.095443, + (GLfloat) - 0.185998, (GLfloat) - 0.182942, (GLfloat) 0.056857, + (GLfloat) 0.016499, (GLfloat) - 0.308118, (GLfloat) - 0.075513, + (GLfloat) 0.024971, (GLfloat) - 0.301226, (GLfloat) - 0.027251, + (GLfloat) - 0.035944, (GLfloat) 0.061566, (GLfloat) 0.013883, + (GLfloat) 0.007215, (GLfloat) 0.046198, (GLfloat) - 0.227891, + (GLfloat) 0.189165, (GLfloat) 0.079471, (GLfloat) - 0.067849, + (GLfloat) 0.026963, (GLfloat) 0.027982, (GLfloat) - 0.050419, + (GLfloat) - 0.050896, (GLfloat) 0.069604, (GLfloat) - 0.196938, + (GLfloat) 0.064274, (GLfloat) - 0.205263, (GLfloat) 0.297868, + (GLfloat) - 0.047543, (GLfloat) 0.147822, (GLfloat) 0.166593, + (GLfloat) 0.010318, (GLfloat) - 0.002148, (GLfloat) 0.029434, + (GLfloat) 0.036107, (GLfloat) - 0.523568, (GLfloat) - 0.118442, + (GLfloat) - 0.199410, (GLfloat) 0.233526, (GLfloat) - 0.161289, + (GLfloat) - 0.047441, (GLfloat) - 0.013973, (GLfloat) 0.112998, + (GLfloat) - 0.043494, (GLfloat) - 0.181796, (GLfloat) 0.065864, + (GLfloat) - 0.074984, (GLfloat) 0.177758, (GLfloat) - 0.156470, + (GLfloat) 0.225216, (GLfloat) 0.081058, (GLfloat) - 0.169876, + (GLfloat) - 0.041510, (GLfloat) 0.025763, (GLfloat) - 0.231350, + (GLfloat) 0.259015, (GLfloat) 0.274641, (GLfloat) 0.018290, + (GLfloat) 0.039196, (GLfloat) 0.010028, (GLfloat) 0.072771, + (GLfloat) 0.031646, (GLfloat) 0.075290, (GLfloat) 0.039258, + (GLfloat) 0.052930, (GLfloat) - 0.034809, (GLfloat) 0.165429, + (GLfloat) - 0.072511, (GLfloat) 0.095786, (GLfloat) - 0.222144, + (GLfloat) 0.038706, (GLfloat) 0.032296, (GLfloat) - 0.002495, + (GLfloat) 0.011675, (GLfloat) - 0.061944, (GLfloat) 0.082555, + (GLfloat) - 0.168400, (GLfloat) 0.074113, (GLfloat) 0.049321, + (GLfloat) 0.001263, (GLfloat) - 0.207436, (GLfloat) 0.013949, + (GLfloat) - 0.027045, (GLfloat) 0.015697, (GLfloat) - 0.047831, + (GLfloat) 0.121989, (GLfloat) - 0.043014, (GLfloat) - 0.004426, + (GLfloat) 0.238374, (GLfloat) - 0.320060, (GLfloat) - 0.111754, + (GLfloat) 0.095077, (GLfloat) 0.014640, (GLfloat) 0.070665, + (GLfloat) - 0.084367, (GLfloat) 0.016444, (GLfloat) 0.000788, + (GLfloat) - 0.117804, (GLfloat) 0.113550, (GLfloat) 0.087029, + (GLfloat) - 0.109080, (GLfloat) - 0.155795, (GLfloat) 0.040085, + (GLfloat) - 0.020370, (GLfloat) 0.118787, (GLfloat) 0.101787, + (GLfloat) 0.140877, (GLfloat) - 0.144829, (GLfloat) 0.107720, + (GLfloat) - 0.247002, (GLfloat) - 0.454632, (GLfloat) 0.070535, + (GLfloat) - 0.016278, (GLfloat) - 0.111440, (GLfloat) 0.270110, + (GLfloat) - 0.017624, (GLfloat) - 0.146232, (GLfloat) 0.154626, + (GLfloat) 0.214030, (GLfloat) 0.041025, (GLfloat) - 0.170250, + (GLfloat) 0.010009, (GLfloat) - 0.159290, (GLfloat) - 0.076895, + (GLfloat) 0.116168, (GLfloat) 0.156775, (GLfloat) - 0.077935, + (GLfloat) 0.199355, (GLfloat) 0.081120, (GLfloat) 0.003352, + (GLfloat) 0.054178, (GLfloat) - 0.036863, (GLfloat) - 0.004573, + (GLfloat) - 0.015149, (GLfloat) 0.057005, (GLfloat) - 0.008878, + (GLfloat) 0.374758, (GLfloat) - 0.007823, (GLfloat) - 0.078051, + (GLfloat) - 0.034977, (GLfloat) 0.026837, (GLfloat) 0.035441, + (GLfloat) 0.101867, (GLfloat) 0.121954, (GLfloat) 0.040450, + (GLfloat) - 0.136911, (GLfloat) 0.010061, (GLfloat) 0.082698, + (GLfloat) 0.121665, (GLfloat) - 0.589852, (GLfloat) 0.106401, + (GLfloat) - 0.064574, (GLfloat) 0.098679, (GLfloat) 0.059336, + (GLfloat) 0.103037, (GLfloat) - 0.075263, (GLfloat) 0.172586, + (GLfloat) - 0.217492, (GLfloat) - 0.170584, (GLfloat) - 0.025846, + (GLfloat) 0.260366, (GLfloat) 0.002117, (GLfloat) 0.041535, + (GLfloat) - 0.024112, (GLfloat) - 0.023437, (GLfloat) - 0.088146, + (GLfloat) - 0.007767, (GLfloat) 0.061738, (GLfloat) 0.116208, + (GLfloat) 0.253471, (GLfloat) 0.113278, (GLfloat) 0.231012, + (GLfloat) - 0.011399, (GLfloat) 0.116962, (GLfloat) - 0.037465, + (GLfloat) 0.233898, (GLfloat) 0.226108, (GLfloat) 0.077176, + (GLfloat) - 0.004640, (GLfloat) 0.209191, (GLfloat) - 0.091738, + (GLfloat) 0.093995, (GLfloat) 0.328937, (GLfloat) 0.245098, + (GLfloat) 0.155739, (GLfloat) - 0.327971, (GLfloat) - 0.115265, + (GLfloat) 0.125306, (GLfloat) 0.174931, (GLfloat) 0.130030, + (GLfloat) 0.005005, (GLfloat) - 0.022310, (GLfloat) 0.120651, + (GLfloat) 0.046982, (GLfloat) - 0.058839, (GLfloat) - 0.097958, + (GLfloat) - 0.059618, (GLfloat) - 0.068114, (GLfloat) 0.070137, + (GLfloat) 0.053184, (GLfloat) - 0.081163, (GLfloat) 0.000020, + (GLfloat) 0.188066, (GLfloat) - 0.082942, (GLfloat) - 0.013689, + (GLfloat) - 0.161390, (GLfloat) - 0.335891, (GLfloat) - 0.060737, + (GLfloat) 0.131189, (GLfloat) 0.036733, (GLfloat) - 0.093511, + (GLfloat) - 0.002496, (GLfloat) - 0.059035, (GLfloat) - 0.084055, + (GLfloat) 0.109820, (GLfloat) - 0.235531, (GLfloat) 0.130865, + (GLfloat) 0.018909, (GLfloat) 0.062351, (GLfloat) 0.111532, + (GLfloat) 0.123548, (GLfloat) 0.094008, (GLfloat) 0.056761, + (GLfloat) 0.106710, (GLfloat) - 0.049834, (GLfloat) - 0.147748, + (GLfloat) 0.102940, (GLfloat) - 0.113169, (GLfloat) 0.191710, + (GLfloat) - 0.028647, (GLfloat) 0.128038, (GLfloat) - 0.104189, + (GLfloat) 0.107226, (GLfloat) - 0.220633, (GLfloat) - 0.147310, + (GLfloat) - 0.205747, (GLfloat) 0.063433, (GLfloat) - 0.026135, + (GLfloat) - 0.064614, (GLfloat) 0.096963, (GLfloat) - 0.080108, + (GLfloat) - 0.083255, (GLfloat) 0.113008, (GLfloat) - 0.089852, + (GLfloat) 0.180961, (GLfloat) - 0.269100, (GLfloat) 0.115523, + (GLfloat) 0.044722, (GLfloat) - 0.023285, (GLfloat) 0.024813, + (GLfloat) 0.078986, (GLfloat) 0.037242, (GLfloat) 0.005124, + (GLfloat) 0.115141, (GLfloat) 0.124478, (GLfloat) - 0.034603, + (GLfloat) 0.022454, (GLfloat) 0.155937, (GLfloat) - 0.096183, + (GLfloat) 0.175318, (GLfloat) 0.007233, (GLfloat) - 0.138507, + (GLfloat) 0.019182, (GLfloat) - 0.037869, (GLfloat) 0.074242, + (GLfloat) 0.058218, (GLfloat) 0.212269, (GLfloat) - 0.003886, + (GLfloat) - 0.188525, (GLfloat) - 0.075703, (GLfloat) 0.075643, + (GLfloat) - 0.029085, (GLfloat) - 0.076746, (GLfloat) - 0.273473, + (GLfloat) - 0.105590, (GLfloat) - 0.238524, (GLfloat) - 0.087465, + (GLfloat) 0.086122, (GLfloat) - 0.340807, (GLfloat) - 0.192851, + (GLfloat) - 0.247936, (GLfloat) - 0.003160, (GLfloat) 0.082106, + (GLfloat) 0.137988, (GLfloat) - 0.041876, (GLfloat) - 0.012086, + (GLfloat) - 0.140714, (GLfloat) - 0.138827, (GLfloat) - 0.064179, + (GLfloat) - 0.059380, (GLfloat) 0.015642, (GLfloat) 0.113841, + (GLfloat) - 0.031501, (GLfloat) 0.007130, (GLfloat) - 0.125767, + (GLfloat) 0.021294, (GLfloat) - 0.021957, (GLfloat) - 0.069365, + (GLfloat) - 0.012419, (GLfloat) 0.019780, (GLfloat) - 0.077459, + (GLfloat) 0.085524, (GLfloat) 0.087513, (GLfloat) - 0.107484, + (GLfloat) - 0.303263, (GLfloat) 0.263672, (GLfloat) - 0.220649, + (GLfloat) - 0.090267, (GLfloat) - 0.376337, (GLfloat) - 0.127634, + (GLfloat) 0.087681, (GLfloat) 0.015985, (GLfloat) - 0.029860, + (GLfloat) 0.119257, (GLfloat) 0.140347, (GLfloat) 0.194003, + (GLfloat) 0.066270, (GLfloat) 0.127178, (GLfloat) - 0.003765, + (GLfloat) 0.037563, (GLfloat) - 0.110829, (GLfloat) 0.000382, + (GLfloat) 0.034295, (GLfloat) - 0.045737, (GLfloat) 0.045204, + (GLfloat) 0.017365, (GLfloat) - 0.072708, (GLfloat) 0.056698, + (GLfloat) 0.045238, (GLfloat) 0.187956, (GLfloat) - 0.055878, + (GLfloat) - 0.132755, (GLfloat) 0.017969, (GLfloat) - 0.041205, + (GLfloat) 0.189702, (GLfloat) - 0.020780, (GLfloat) - 0.077422, + (GLfloat) 0.210419, (GLfloat) 0.178041, (GLfloat) - 0.005855, + (GLfloat) 0.104527, (GLfloat) - 0.304323, (GLfloat) 0.002581, + (GLfloat) 0.043359, (GLfloat) - 0.060695, (GLfloat) - 0.011878, + (GLfloat) - 0.000267, (GLfloat) 0.020510, (GLfloat) - 0.046383, + (GLfloat) 0.252891, (GLfloat) 0.074246, (GLfloat) - 0.047689, + (GLfloat) - 0.069874, (GLfloat) 0.118962, (GLfloat) - 0.052781, + (GLfloat) 0.086188, (GLfloat) 0.068354, (GLfloat) - 0.213621, + (GLfloat) 0.086637, (GLfloat) - 0.171519, (GLfloat) 0.006447, + (GLfloat) 0.196785, (GLfloat) - 0.086044, (GLfloat) - 0.068059, + (GLfloat) 0.100401, (GLfloat) 0.243886, (GLfloat) - 0.142258, + (GLfloat) 0.173010, (GLfloat) 0.303375, (GLfloat) - 0.060085, + (GLfloat) - 0.041181, (GLfloat) - 0.097467, (GLfloat) 0.073776, + (GLfloat) - 0.013471, (GLfloat) - 0.133299, (GLfloat) - 0.143570, + (GLfloat) - 0.302092, (GLfloat) - 0.158342, (GLfloat) 0.230719, + (GLfloat) 0.074434, (GLfloat) - 0.143530, (GLfloat) 0.294895, + (GLfloat) - 0.165626, (GLfloat) 0.200869, (GLfloat) - 0.130737, + (GLfloat) 0.102444, (GLfloat) 0.277067, (GLfloat) 0.078210, + (GLfloat) - 0.183696, (GLfloat) - 0.010502, (GLfloat) - 0.150481, + (GLfloat) - 0.070029, (GLfloat) - 0.019635, (GLfloat) - 0.059141, + (GLfloat) - 0.005930, (GLfloat) 0.069199, (GLfloat) - 0.013126, + (GLfloat) - 0.119333, (GLfloat) - 0.007972, (GLfloat) 0.119489, + (GLfloat) 0.033072, (GLfloat) 0.081756, (GLfloat) - 0.034481, + (GLfloat) - 0.108282, (GLfloat) - 0.065310, (GLfloat) 0.146009, + (GLfloat) 0.080950, (GLfloat) 0.111320, (GLfloat) 0.004291, + (GLfloat) 0.071208, (GLfloat) - 0.112941, (GLfloat) 0.028135, + (GLfloat) - 0.024632, (GLfloat) 0.190525, (GLfloat) - 0.285626, + (GLfloat) - 0.105040, (GLfloat) 0.044008, (GLfloat) 0.020236, + (GLfloat) - 0.017815, (GLfloat) - 0.076684, (GLfloat) - 0.065840, + (GLfloat) 0.083563, (GLfloat) 0.100873, (GLfloat) - 0.141154, + (GLfloat) - 0.062066, (GLfloat) - 0.010894, (GLfloat) 0.066110, + (GLfloat) - 0.056763, (GLfloat) 0.024777, (GLfloat) - 0.176209, + (GLfloat) - 0.014442, (GLfloat) 0.052861, (GLfloat) 0.013010, + (GLfloat) - 0.157546, (GLfloat) - 0.118279, (GLfloat) - 0.237648, + (GLfloat) - 0.234497, (GLfloat) - 0.158049, (GLfloat) 0.102635, + (GLfloat) 0.061685, (GLfloat) - 0.052695, (GLfloat) - 0.042243, + (GLfloat) 0.093961, (GLfloat) - 0.025060, (GLfloat) 0.046602, + (GLfloat) 0.004395, (GLfloat) 0.150912, (GLfloat) 0.191784, + (GLfloat) 0.067299, (GLfloat) - 0.059575, (GLfloat) 0.161018, + (GLfloat) - 0.233155, (GLfloat) - 0.109721, (GLfloat) 0.194653, + (GLfloat) 0.217444, (GLfloat) 0.221231, (GLfloat) - 0.201241, + (GLfloat) - 0.033689, (GLfloat) - 0.341937, (GLfloat) - 0.099231, + (GLfloat) 0.042771, (GLfloat) - 0.028862, (GLfloat) 0.067736, + (GLfloat) 0.110240, (GLfloat) 0.274029, (GLfloat) - 0.157689, + (GLfloat) - 0.055994, (GLfloat) 0.144729, (GLfloat) 0.090901, + (GLfloat) 0.211192, (GLfloat) 0.058165, (GLfloat) - 0.149872, + (GLfloat) 0.102735, (GLfloat) - 0.044061, (GLfloat) - 0.044795, + (GLfloat) - 0.042153, (GLfloat) - 0.010955, (GLfloat) 0.014341, + (GLfloat) - 0.011649, (GLfloat) 0.099072, (GLfloat) - 0.086419, + (GLfloat) - 0.018920, (GLfloat) 0.000640, (GLfloat) - 0.031729, + (GLfloat) - 0.216886, (GLfloat) - 0.057512, (GLfloat) 0.071195, + (GLfloat) - 0.188150, (GLfloat) 0.049292, (GLfloat) 0.258489, + (GLfloat) - 0.023494, (GLfloat) 0.021489, (GLfloat) 0.199785, + (GLfloat) - 0.045818, (GLfloat) 0.066753, (GLfloat) - 0.035593, + (GLfloat) 0.010986, (GLfloat) 0.166767, (GLfloat) 0.275085, + (GLfloat) - 0.177039, (GLfloat) 0.010372, (GLfloat) 0.167936, + (GLfloat) - 0.423239, (GLfloat) 0.027466, (GLfloat) - 0.126114, + (GLfloat) - 0.102035, (GLfloat) 0.282640, (GLfloat) 0.022622, + (GLfloat) - 0.023997, (GLfloat) 0.176943, (GLfloat) 0.093272, + (GLfloat) - 0.090009, (GLfloat) 0.015338, (GLfloat) 0.250857, + (GLfloat) 0.011095, (GLfloat) 0.006703, (GLfloat) 0.057076, + (GLfloat) 0.133423, (GLfloat) 0.234639, (GLfloat) - 0.070260, + (GLfloat) - 0.295994, (GLfloat) 0.185615, (GLfloat) 0.117148, + (GLfloat) 0.235480, (GLfloat) 0.066195, (GLfloat) 0.078641, + (GLfloat) - 0.026545, (GLfloat) 0.093931, (GLfloat) 0.008019, + (GLfloat) 0.181656, (GLfloat) - 0.088719, (GLfloat) 0.045959, + (GLfloat) - 0.076308, (GLfloat) - 0.164584, (GLfloat) 0.018271, + (GLfloat) 0.092026, (GLfloat) 0.201866, (GLfloat) - 0.106051, + (GLfloat) 0.019876, (GLfloat) 0.050967, (GLfloat) 0.176081, + (GLfloat) - 0.018546, (GLfloat) 0.138749, (GLfloat) - 0.008255, + (GLfloat) - 0.026049, (GLfloat) - 0.068465, (GLfloat) - 0.055467, + (GLfloat) - 0.260245, (GLfloat) 0.221833, (GLfloat) - 0.048541, + (GLfloat) - 0.169783, (GLfloat) 0.354992, (GLfloat) - 0.017943, + (GLfloat) - 0.306063, (GLfloat) 0.074787, (GLfloat) 0.101971, + (GLfloat) 0.215973, (GLfloat) 0.107558, (GLfloat) - 0.008808, + (GLfloat) 0.390235, (GLfloat) - 0.275652, (GLfloat) - 0.117085, + (GLfloat) 0.033898, (GLfloat) 0.046047, (GLfloat) - 0.108977, + (GLfloat) - 0.263507, (GLfloat) - 0.091765, (GLfloat) - 0.250234, + (GLfloat) - 0.044613, (GLfloat) 0.149563, (GLfloat) 0.027937, + (GLfloat) - 0.015397, (GLfloat) - 0.040254, (GLfloat) 0.065692, + (GLfloat) - 0.017531, (GLfloat) - 0.013504, (GLfloat) 0.004021, + (GLfloat) 0.054665, (GLfloat) - 0.018996, (GLfloat) - 0.006954, + (GLfloat) 0.033068, (GLfloat) 0.219349, (GLfloat) - 0.194079, + (GLfloat) - 0.057780, (GLfloat) 0.011881, (GLfloat) 0.084904, + (GLfloat) 0.139243, (GLfloat) - 0.109890, (GLfloat) 0.039145, + (GLfloat) 0.223272, (GLfloat) 0.208110, (GLfloat) 0.165882, + (GLfloat) - 0.008046, (GLfloat) 0.103847, (GLfloat) 0.278718, + (GLfloat) - 0.035499, (GLfloat) 0.112662, (GLfloat) - 0.088418, + (GLfloat) - 0.053118, (GLfloat) 0.053871, (GLfloat) - 0.054706, + (GLfloat) 0.118632, (GLfloat) 0.086431, (GLfloat) - 0.022494, + (GLfloat) 0.014943, (GLfloat) 0.039622, (GLfloat) 0.047307, + (GLfloat) 0.006570, (GLfloat) 0.093461, (GLfloat) 0.058982, + (GLfloat) 0.031448, (GLfloat) 0.325716, (GLfloat) - 0.047305, + (GLfloat) - 0.193710, (GLfloat) 0.087226, (GLfloat) 0.051790, + (GLfloat) 0.116154, (GLfloat) - 0.080023, (GLfloat) - 0.106643, + (GLfloat) 0.156514, (GLfloat) - 0.222710, (GLfloat) 0.275425, + (GLfloat) - 0.084294, (GLfloat) - 0.101851, (GLfloat) 0.425222, + (GLfloat) 0.030344, (GLfloat) - 0.141370, (GLfloat) - 0.282460, + (GLfloat) 0.003022, (GLfloat) 0.108996, (GLfloat) - 0.229152, + (GLfloat) - 0.133040, (GLfloat) 0.061025, (GLfloat) - 0.128942, + (GLfloat) - 0.077348, (GLfloat) 0.013363, (GLfloat) - 0.072511, + (GLfloat) - 0.050317, (GLfloat) 0.452190, (GLfloat) 0.094114, + (GLfloat) 0.053309, (GLfloat) - 0.143722, (GLfloat) 0.249884, + (GLfloat) - 0.257016, (GLfloat) 0.100544, (GLfloat) 0.012236, + (GLfloat) - 0.022056, (GLfloat) - 0.212133, (GLfloat) 0.023533, + (GLfloat) 0.153299, (GLfloat) 0.031763, (GLfloat) 0.034577, + (GLfloat) 0.161729, (GLfloat) 0.084914, (GLfloat) 0.050770, + (GLfloat) 0.320438, (GLfloat) 0.112175, (GLfloat) 0.135015, + (GLfloat) - 0.040717, (GLfloat) 0.073400, (GLfloat) 0.080543, + (GLfloat) - 0.226004, (GLfloat) 0.143154, (GLfloat) 0.170139, + (GLfloat) 0.009756, (GLfloat) 0.068337, (GLfloat) 0.132111, + (GLfloat) 0.380191, (GLfloat) 0.233715, (GLfloat) 0.026664, + (GLfloat) - 0.018016, (GLfloat) 0.265426, (GLfloat) - 0.110691, + (GLfloat) 0.041281, (GLfloat) 0.056674, (GLfloat) - 0.119834, + (GLfloat) 0.170794, (GLfloat) - 0.112611, (GLfloat) 0.094839, + (GLfloat) 0.216318, (GLfloat) 0.002081, (GLfloat) 0.154653, + (GLfloat) - 0.036815, (GLfloat) 0.024332, (GLfloat) 0.172587, + (GLfloat) - 0.064554, (GLfloat) 0.160699, (GLfloat) 0.101229, + (GLfloat) 0.114451, (GLfloat) 0.016039, (GLfloat) 0.293489, + (GLfloat) 0.023010, (GLfloat) - 0.028932, (GLfloat) 0.014800, + (GLfloat) - 0.290527, (GLfloat) 0.172553, (GLfloat) 0.129526, + (GLfloat) - 0.048159, (GLfloat) - 0.181222, (GLfloat) 0.305871, + (GLfloat) 0.065351, (GLfloat) - 0.399962, (GLfloat) - 0.030479, + (GLfloat) 0.334123, (GLfloat) - 0.120149, (GLfloat) 0.241310, + (GLfloat) - 0.203728, (GLfloat) - 0.155627, (GLfloat) 0.140805, + (GLfloat) 0.061022, (GLfloat) - 0.016097, (GLfloat) 0.131688, + (GLfloat) 0.045050, (GLfloat) - 0.313782, (GLfloat) - 0.279077, + (GLfloat) 0.034252, (GLfloat) - 0.135512, (GLfloat) - 0.087765, + (GLfloat) 0.276236, (GLfloat) 0.036449, (GLfloat) 0.418332, + (GLfloat) - 0.122146, (GLfloat) 0.050998, (GLfloat) 0.131453, + (GLfloat) - 0.087629, (GLfloat) 0.330142, (GLfloat) 0.061353, + (GLfloat) 0.228676, (GLfloat) 0.093309, (GLfloat) - 0.009307, + (GLfloat) 0.435264, (GLfloat) 0.186185, (GLfloat) - 0.127484, + (GLfloat) 0.156565, (GLfloat) 0.013842, (GLfloat) - 0.103874, + (GLfloat) - 0.274053, (GLfloat) - 0.084119, (GLfloat) 0.096687, + (GLfloat) - 0.027947, (GLfloat) - 0.051152, (GLfloat) - 0.078997, + (GLfloat) 0.013399, (GLfloat) 0.194440, (GLfloat) 0.072030, + (GLfloat) 0.000082, (GLfloat) 0.130666, (GLfloat) 0.052218, + (GLfloat) 0.064984, (GLfloat) - 0.136859, (GLfloat) 0.092204, + (GLfloat) 0.109060, (GLfloat) 0.424779, (GLfloat) - 0.111867, + (GLfloat) 0.061748, (GLfloat) 0.160827, (GLfloat) - 0.068538, + (GLfloat) 0.062960, (GLfloat) 0.059638, (GLfloat) - 0.181514, + (GLfloat) 0.018961, (GLfloat) 0.072298, (GLfloat) 0.003517, + (GLfloat) - 0.099508, (GLfloat) - 0.225455, (GLfloat) - 0.021791, + (GLfloat) 0.001955, (GLfloat) - 0.320555, (GLfloat) 0.159506, + (GLfloat) - 0.057735, (GLfloat) - 0.054327, (GLfloat) - 0.095525, + (GLfloat) 0.319748, (GLfloat) - 0.146158, (GLfloat) - 0.198384, + (GLfloat) - 0.158741, (GLfloat) - 0.265443, (GLfloat) 0.036635, + (GLfloat) - 0.093089, (GLfloat) - 0.358379, (GLfloat) - 0.110549, + (GLfloat) - 0.049805, (GLfloat) 0.022246, (GLfloat) - 0.036724, + (GLfloat) 0.223000, (GLfloat) 0.247522, (GLfloat) - 0.232652, + (GLfloat) - 0.249441, (GLfloat) - 0.248325, (GLfloat) - 0.071169, + (GLfloat) 0.000369, (GLfloat) 0.094598, (GLfloat) - 0.162153, + (GLfloat) - 0.133873, (GLfloat) - 0.188473, (GLfloat) 0.272734, + (GLfloat) 0.046594, (GLfloat) 0.069766, (GLfloat) 0.015561, + (GLfloat) 0.111582, (GLfloat) - 0.239786, (GLfloat) 0.034658, + (GLfloat) 0.093232, (GLfloat) 0.183507, (GLfloat) - 0.011298, + (GLfloat) - 0.226805, (GLfloat) 0.514871, (GLfloat) - 0.064144, + (GLfloat) 0.085949, (GLfloat) 0.031412, (GLfloat) 0.042790, + (GLfloat) - 0.043755, (GLfloat) - 0.290797, (GLfloat) - 0.159142, + (GLfloat) 0.056671, (GLfloat) 0.167837, (GLfloat) 0.016536, + (GLfloat) - 0.034538, (GLfloat) 0.072185, (GLfloat) 0.066973, + (GLfloat) - 0.021211, (GLfloat) 0.064120, (GLfloat) - 0.174756, + (GLfloat) 0.090627, (GLfloat) - 0.055253, (GLfloat) 0.109457, + (GLfloat) 0.019686, (GLfloat) 0.004469, (GLfloat) - 0.096316, + (GLfloat) - 0.038864, (GLfloat) - 0.135083, (GLfloat) 0.244529, + (GLfloat) 0.034613, (GLfloat) - 0.069587, (GLfloat) 0.144533, + (GLfloat) - 0.100009, (GLfloat) - 0.057516, (GLfloat) - 0.079338, + (GLfloat) - 0.178026, (GLfloat) 0.085994, (GLfloat) 0.061804, + (GLfloat) - 0.189256, (GLfloat) 0.342739, (GLfloat) 0.043372, + (GLfloat) - 0.046206, (GLfloat) 0.168946, (GLfloat) - 0.133904, + (GLfloat) 0.015314, (GLfloat) - 0.090127, (GLfloat) - 0.058530, + (GLfloat) 0.169657, (GLfloat) - 0.097086, (GLfloat) 0.013746, + (GLfloat) 0.185131, (GLfloat) - 0.089445, (GLfloat) 0.347806, + (GLfloat) - 0.264432, (GLfloat) - 0.170170, (GLfloat) - 0.335858, + (GLfloat) - 0.086511, (GLfloat) 0.248252, (GLfloat) - 0.169698, + (GLfloat) 0.002287, (GLfloat) - 0.028338, (GLfloat) - 0.266432, + (GLfloat) - 0.085060, (GLfloat) 0.001974, (GLfloat) - 0.032789, + (GLfloat) 0.192750, (GLfloat) - 0.007081, (GLfloat) 0.098197, + (GLfloat) 0.012577, (GLfloat) 0.034983, (GLfloat) - 0.003058, + (GLfloat) - 0.039249, (GLfloat) 0.038498, (GLfloat) 0.067306, + (GLfloat) 0.021988, (GLfloat) 0.379705, (GLfloat) - 0.054619, + (GLfloat) - 0.151707, (GLfloat) 0.051034, (GLfloat) - 0.016003, + (GLfloat) - 0.057048, (GLfloat) 0.075729, (GLfloat) - 0.213397, + (GLfloat) - 0.137847, (GLfloat) 0.130600, (GLfloat) 0.046198, + (GLfloat) 0.024786, (GLfloat) 0.049556, (GLfloat) - 0.045772, + (GLfloat) - 0.082533, (GLfloat) 0.155397, (GLfloat) - 0.096145, + (GLfloat) 0.049152, (GLfloat) 0.270979, (GLfloat) - 0.147022, + (GLfloat) 0.061153, (GLfloat) - 0.104531, (GLfloat) - 0.103623, + (GLfloat) - 0.142997, (GLfloat) - 0.232885, (GLfloat) 0.040538, + (GLfloat) 0.048806, (GLfloat) - 0.013095, (GLfloat) - 0.003505, + (GLfloat) - 0.095063, (GLfloat) 0.241414, (GLfloat) - 0.202255, + (GLfloat) 0.108558, (GLfloat) - 0.147584, (GLfloat) 0.162682, + (GLfloat) 0.217105, (GLfloat) 0.252340, (GLfloat) - 0.114830, + (GLfloat) - 0.188028, (GLfloat) 0.417252, (GLfloat) - 0.077456, + (GLfloat) - 0.112855, (GLfloat) 0.105192, (GLfloat) 0.073968, + (GLfloat) - 0.186972, (GLfloat) 0.164022, (GLfloat) - 0.073415, + (GLfloat) - 0.074349, (GLfloat) - 0.324874, (GLfloat) - 0.056645, + (GLfloat) 0.327855, (GLfloat) - 0.271424, (GLfloat) - 0.141142, + (GLfloat) 0.151049, (GLfloat) 0.155239, (GLfloat) - 0.083116, + (GLfloat) 0.035395, (GLfloat) - 0.133176, (GLfloat) - 0.095112, + (GLfloat) 0.127283, (GLfloat) - 0.011837, (GLfloat) 0.199750, + (GLfloat) - 0.120775, (GLfloat) 0.103698, (GLfloat) 0.063302, + (GLfloat) 0.014222, (GLfloat) 0.198468, (GLfloat) 0.137537, + (GLfloat) - 0.269656, (GLfloat) 0.120644, (GLfloat) - 0.153958, + (GLfloat) - 0.136743, (GLfloat) - 0.119817, (GLfloat) - 0.073747, + (GLfloat) - 0.068156, (GLfloat) - 0.138484, (GLfloat) 0.033507, + (GLfloat) - 0.106835, (GLfloat) 0.114964, (GLfloat) 0.023924, + (GLfloat) - 0.222525, (GLfloat) 0.330321, (GLfloat) - 0.007431, + (GLfloat) - 0.011739, (GLfloat) 0.095156, (GLfloat) 0.139086, + (GLfloat) 0.146766, (GLfloat) 0.037685, (GLfloat) 0.136122, + (GLfloat) - 0.086532, (GLfloat) - 0.081295, (GLfloat) 0.009434, + (GLfloat) 0.189439, (GLfloat) 0.290592, (GLfloat) - 0.048317, + (GLfloat) 0.139152, (GLfloat) 0.224931, (GLfloat) 0.355509, + (GLfloat) 0.017162, (GLfloat) - 0.016825, (GLfloat) 0.094198, + (GLfloat) - 0.237595, (GLfloat) 0.205475, (GLfloat) - 0.041412, + (GLfloat) 0.050511, (GLfloat) 0.094900, (GLfloat) 0.252891, + (GLfloat) - 0.012538, (GLfloat) - 0.014082, (GLfloat) 0.064629, + (GLfloat) - 0.059810, (GLfloat) 0.020665, (GLfloat) - 0.260979, + (GLfloat) 0.073490, (GLfloat) - 0.242270, (GLfloat) 0.085847, + (GLfloat) 0.049499, (GLfloat) - 0.045617, (GLfloat) - 0.015894, + (GLfloat) - 0.121040, (GLfloat) 0.004350, (GLfloat) 0.381603, + (GLfloat) - 0.062798, (GLfloat) 0.055006, (GLfloat) 0.077472, + (GLfloat) - 0.156846, (GLfloat) - 0.033342, (GLfloat) 0.035284, + (GLfloat) 0.105383, (GLfloat) 0.002776, (GLfloat) - 0.046394, + (GLfloat) 0.247612, (GLfloat) 0.310528, (GLfloat) 0.046188, + (GLfloat) - 0.144567, (GLfloat) - 0.197996, (GLfloat) 0.083309, + (GLfloat) - 0.317845, (GLfloat) - 0.014793, (GLfloat) - 0.041608, + (GLfloat) - 0.169858, (GLfloat) 0.102631, (GLfloat) 0.283962, + (GLfloat) - 0.168757, (GLfloat) 0.093105, (GLfloat) 0.050325, + (GLfloat) - 0.013639, (GLfloat) 0.285100, (GLfloat) 0.047089, + (GLfloat) 0.216644, (GLfloat) 0.102018, (GLfloat) 0.031983, + (GLfloat) 0.046988, (GLfloat) 0.081482, (GLfloat) 0.021865, + (GLfloat) 0.124995, (GLfloat) - 0.193086, (GLfloat) 0.127870, + (GLfloat) 0.009153, (GLfloat) 0.178713, (GLfloat) - 0.077949, + (GLfloat) - 0.235371, (GLfloat) - 0.046817, (GLfloat) - 0.125764, + (GLfloat) - 0.089381, (GLfloat) 0.289172, (GLfloat) - 0.129356, + (GLfloat) 0.312993, (GLfloat) 0.120426, (GLfloat) 0.296957, + (GLfloat) - 0.106431, (GLfloat) 0.117096, (GLfloat) 0.156971, + (GLfloat) 0.030001, (GLfloat) 0.244577, (GLfloat) 0.085119, + (GLfloat) 0.002958, (GLfloat) - 0.035469, (GLfloat) - 0.084615, + (GLfloat) - 0.052248, (GLfloat) - 0.004298, (GLfloat) - 0.129170, + (GLfloat) - 0.158458, (GLfloat) 0.059061, (GLfloat) - 0.041780, + (GLfloat) - 0.007117, (GLfloat) - 0.174211, (GLfloat) 0.098819, + (GLfloat) - 0.158387, (GLfloat) 0.060840, (GLfloat) - 0.064818, + (GLfloat) 0.117241, (GLfloat) - 0.050754, (GLfloat) - 0.027945, + (GLfloat) - 0.014301, (GLfloat) 0.146402, (GLfloat) - 0.118414, + (GLfloat) 0.186611, (GLfloat) - 0.162182, (GLfloat) - 0.150909, + (GLfloat) - 0.106992, (GLfloat) 0.286109, (GLfloat) - 0.055512, + (GLfloat) 0.109689, (GLfloat) - 0.346409, (GLfloat) 0.072611, + (GLfloat) - 0.009694, (GLfloat) - 0.038102, (GLfloat) 0.098565, + (GLfloat) - 0.034598, (GLfloat) 0.323300, (GLfloat) 0.020962, + (GLfloat) - 0.149219, (GLfloat) 0.040596, (GLfloat) - 0.114206, + (GLfloat) 0.164744, (GLfloat) 0.048081, (GLfloat) 0.105464, + (GLfloat) 0.036214, (GLfloat) 0.099523, (GLfloat) 0.038595, + (GLfloat) 0.056537, (GLfloat) 0.036271, (GLfloat) 0.003042, + (GLfloat) - 0.157110, (GLfloat) 0.001614, (GLfloat) - 0.133994, + (GLfloat) - 0.104357, (GLfloat) - 0.032004, (GLfloat) 0.262334, + (GLfloat) 0.041215, (GLfloat) - 0.010418, (GLfloat) - 0.037968, + (GLfloat) 0.223491, (GLfloat) - 0.387946, (GLfloat) 0.117291, + (GLfloat) - 0.344434, (GLfloat) 0.110318, (GLfloat) - 0.031448, + (GLfloat) 0.123562, (GLfloat) - 0.315729, (GLfloat) 0.164533, + (GLfloat) 0.008207, (GLfloat) 0.042004, (GLfloat) 0.050014, + (GLfloat) - 0.191339, (GLfloat) - 0.069291, (GLfloat) - 0.220065, + (GLfloat) 0.023845, (GLfloat) 0.009474, (GLfloat) 0.035598, + (GLfloat) - 0.173295, (GLfloat) - 0.036604, (GLfloat) - 0.193323, + (GLfloat) - 0.040347, (GLfloat) - 0.106063, (GLfloat) - 0.055559, + (GLfloat) - 0.071543, (GLfloat) 0.136487, (GLfloat) 0.105697, + (GLfloat) - 0.179027, (GLfloat) - 0.071852, (GLfloat) 0.117512, + (GLfloat) 0.064769, (GLfloat) - 0.345895, (GLfloat) 0.012833, + (GLfloat) 0.044800, (GLfloat) - 0.032357, (GLfloat) - 0.042161, + (GLfloat) 0.243586, (GLfloat) 0.392499, (GLfloat) - 0.180641, + (GLfloat) - 0.148924, (GLfloat) - 0.181446, (GLfloat) 0.146644, + (GLfloat) - 0.042773, (GLfloat) 0.045843, (GLfloat) - 0.176893, + (GLfloat) 0.025938, (GLfloat) 0.058109, (GLfloat) 0.242063, + (GLfloat) - 0.028489, (GLfloat) - 0.024828, (GLfloat) 0.161289, + (GLfloat) 0.073899, (GLfloat) - 0.081205, (GLfloat) - 0.023751, + (GLfloat) 0.026149, (GLfloat) 0.051399, (GLfloat) - 0.072348, + (GLfloat) 0.024308, (GLfloat) - 0.041819, (GLfloat) - 0.030578, + (GLfloat) - 0.077778, (GLfloat) 0.010272, (GLfloat) 0.066967, + (GLfloat) - 0.139184, (GLfloat) - 0.018983, (GLfloat) 0.035150, + (GLfloat) - 0.061359, (GLfloat) - 0.152358, (GLfloat) - 0.072849, + (GLfloat) 0.043101, (GLfloat) 0.028278, (GLfloat) 0.077387, + (GLfloat) 0.065599, (GLfloat) - 0.049676, (GLfloat) 0.043708, + (GLfloat) - 0.255767, (GLfloat) 0.023510, (GLfloat) - 0.076982, + (GLfloat) 0.020468, (GLfloat) - 0.040630, (GLfloat) 0.208424, + (GLfloat) 0.044922, (GLfloat) 0.025184, (GLfloat) 0.004764, + (GLfloat) 0.107432, (GLfloat) - 0.009356, (GLfloat) 0.239863, + (GLfloat) - 0.005475, (GLfloat) 0.158400, (GLfloat) 0.089743, + (GLfloat) 0.018352, (GLfloat) 0.134559, (GLfloat) 0.221650, + (GLfloat) 0.094423, (GLfloat) 0.129390, (GLfloat) - 0.031274, + (GLfloat) 0.048541, (GLfloat) 0.100595, (GLfloat) - 0.155938, + (GLfloat) - 0.016298, (GLfloat) - 0.036518, (GLfloat) - 0.149178, + (GLfloat) - 0.329953, (GLfloat) - 0.327602, (GLfloat) - 0.150086, + (GLfloat) 0.148403, (GLfloat) - 0.363334, (GLfloat) 0.028237, + (GLfloat) - 0.305790, (GLfloat) - 0.009844, (GLfloat) - 0.075571, + (GLfloat) - 0.045131, (GLfloat) 0.152595, (GLfloat) 0.228720, + (GLfloat) 0.039725, (GLfloat) - 0.127469, (GLfloat) 0.066522, + (GLfloat) - 0.078576, (GLfloat) - 0.349749, (GLfloat) - 0.146881, + (GLfloat) 0.013160, (GLfloat) - 0.040312, (GLfloat) 0.129980, + (GLfloat) 0.221142, (GLfloat) - 0.106068, (GLfloat) 0.254967, + (GLfloat) 0.180912, (GLfloat) - 0.207357, (GLfloat) - 0.196999, + (GLfloat) 0.098219, (GLfloat) 0.085231, (GLfloat) 0.121963, +}; + +struct lwo LWO_s1_b = +{ + 500, /* number of points */ + s1_b_PNTS, 0L, 0L, 0L +}; + +#endif /* USE_GL */ + +/* End of s1_b.c */ diff --git a/hacks/glx/sproingies.c b/hacks/glx/sproingies.c new file mode 100644 index 00000000..e48c639a --- /dev/null +++ b/hacks/glx/sproingies.c @@ -0,0 +1,820 @@ +/* -*- Mode: C; tab-width: 4 -*- + * sproingies.c --- 3D sproingies + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sproingies.c 4.04 97/07/26 xlockmore"; +#endif +/* Copyright 1996 by Ed Mackey, 12/7/96 freely distributable. + * 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. + */ + +#ifdef STANDALONE +# include "xlockmoreI.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +#include +#include +#include "buildlwo.h" + +#define MAXSPROING 100 +#define T_COUNT 40 +#define BOOM_FRAME 50 + +struct sPosColor { + int x, y, z, frame, life; + GLfloat r, g, b; +}; + +typedef struct { + int rotx, roty, dist, wireframe, flatshade, groundlevel, + maxsproingies, mono; + int sframe, target_rx, target_ry, target_dist, target_count; + GLuint sproingies[6], TopsSides, SproingieBoom; + struct sPosColor *positions; +} sp_instance; + +static sp_instance *si_list = NULL; +static int active_screens = 0; + +void SproingieSwap(void); + +extern struct lwo LWO_s1_1, LWO_s1_2, LWO_s1_3, LWO_s1_4; +extern struct lwo LWO_s1_5, LWO_s1_6, LWO_s1_b; + +static int +myrand(int range) +{ + return ((int) (((float) range) * LRAND() / (MAXRAND))); +} + +static GLuint +build_TopsSides(int wireframe) +{ + GLuint dl_num; + GLfloat mat_color[4] = + {0.0, 0.0, 0.0, 1.0}; + + dl_num = glGenLists(2); + if (!dl_num) + return (0); /* 0 means out of display lists. */ + + /* Surface: Tops */ + glNewList(dl_num, GL_COMPILE); + mat_color[0] = 0.392157; + mat_color[1] = 0.784314; + mat_color[2] = 0.941176; + if (wireframe) + glColor3fv(mat_color); + else { + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_color); + } + glEndList(); + + /* Surface: Sides */ + glNewList(dl_num + 1, GL_COMPILE); + mat_color[0] = 0.156863; + mat_color[1] = 0.156863; + mat_color[2] = 0.392157; + if (wireframe) + glColor3fv(mat_color); + else { + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_color); + } + glEndList(); + return (dl_num); +} + +static void +LayGround(int sx, int sy, int sz, int width, int height, sp_instance * si) +{ + int x, y, z, w, h; + GLenum begin_polygon; + + if (si->wireframe) + begin_polygon = GL_LINE_LOOP; + else + begin_polygon = GL_POLYGON; + + if (!si->wireframe) { + if (!si->mono) + glCallList(si->TopsSides); /* Render the tops */ + glNormal3f(0.0, 1.0, 0.0); + + for (h = 0; h < height; ++h) { + x = sx + h; + y = sy - (h << 1); + z = sz + h; + for (w = 0; w < width; ++w) { + glBegin(begin_polygon); + glVertex3i(x, y, z); + glVertex3i(x, y, z - 1); + glVertex3i(x + 1, y, z - 1); + glVertex3i(x + 1, y, z); + glEnd(); + glBegin(begin_polygon); + glVertex3i(x + 1, y - 1, z); + glVertex3i(x + 1, y - 1, z - 1); + glVertex3i(x + 2, y - 1, z - 1); + glVertex3i(x + 2, y - 1, z); + glEnd(); + ++x; + --z; + } + } + } + if (!si->mono) + glCallList(si->TopsSides + 1); /* Render the sides */ + if (!si->wireframe) + glNormal3f(0.0, 0.0, 1.0); + + for (h = 0; h < height; ++h) { + x = sx + h; + y = sy - (h << 1); + z = sz + h; + for (w = 0; w < width; ++w) { + glBegin(begin_polygon); + glVertex3i(x, y, z); + glVertex3i(x + 1, y, z); + glVertex3i(x + 1, y - 1, z); + glVertex3i(x, y - 1, z); + glEnd(); + glBegin(begin_polygon); + glVertex3i(x + 1, y - 1, z); + glVertex3i(x + 2, y - 1, z); + glVertex3i(x + 2, y - 2, z); + glVertex3i(x + 1, y - 2, z); +/*- + * PURIFY 4.0.1 reports an unitialized memory read on the next line when using + * MesaGL 2.2 and -mono. This has been fixed in MesaGL 2.3 and later. */ + glEnd(); + ++x; + --z; + } + } + + /* Render the other sides */ + if (!si->wireframe) + glNormal3f(1.0, 0.0, 0.0); + + for (h = 0; h < height; ++h) { + x = sx + h; + y = sy - (h << 1); + z = sz + h; + for (w = 0; w < width; ++w) { + glBegin(begin_polygon); + glVertex3i(x + 1, y, z); + glVertex3i(x + 1, y, z - 1); + glVertex3i(x + 1, y - 1, z - 1); + glVertex3i(x + 1, y - 1, z); + glEnd(); + glBegin(begin_polygon); + glVertex3i(x + 2, y - 1, z); + glVertex3i(x + 2, y - 1, z - 1); + glVertex3i(x + 2, y - 2, z - 1); + glVertex3i(x + 2, y - 2, z); + glEnd(); + ++x; + --z; + } + } + + if (si->wireframe) { + if (!si->mono) + glCallList(si->TopsSides); /* Render the tops */ + + for (h = 0; h < height; ++h) { + x = sx + h; + y = sy - (h << 1); + z = sz + h; + for (w = 0; w < width; ++w) { + glBegin(begin_polygon); + glVertex3i(x, y, z); + glVertex3i(x, y, z - 1); + glVertex3i(x + 1, y, z - 1); + glVertex3i(x + 1, y, z); + glEnd(); + glBegin(begin_polygon); + glVertex3i(x + 1, y - 1, z); + glVertex3i(x + 1, y - 1, z - 1); + glVertex3i(x + 2, y - 1, z - 1); + glVertex3i(x + 2, y - 1, z); + glEnd(); + ++x; + --z; + } + } + } +} + +#define RESET_SPROINGIE (-30 + myrand(28)) + +static void +AdvanceSproingie(int t, sp_instance * si) +{ + int g_higher, g_back, t2; + struct sPosColor *thisSproingie = &(si->positions[t]); + struct sPosColor *S2 = &(si->positions[0]); + + if (thisSproingie->life > 0) { + if ((++(thisSproingie->frame)) > 11) { + if (thisSproingie->frame >= BOOM_FRAME) { + if ((thisSproingie->r -= 0.08) < 0.0) + thisSproingie->r = 0.0; + if ((thisSproingie->g -= 0.08) < 0.0) + thisSproingie->g = 0.0; + if ((thisSproingie->b -= 0.08) < 0.0) + thisSproingie->b = 0.0; + if ((--(thisSproingie->life)) < 1) { + thisSproingie->life = RESET_SPROINGIE; + } + return; + } + thisSproingie->x += 1; + thisSproingie->y -= 2; + thisSproingie->z += 1; + thisSproingie->frame = 0; + + for (t2 = 0; t2 < si->maxsproingies; ++t2) { + if ((t2 != t) && (thisSproingie->x == S2->x) && + (thisSproingie->y == S2->y) && (thisSproingie->z == S2->z) && + (S2->life > 10) && (S2->frame < 6)) { +#if 0 + if (thisSproingie->life > S2->life) { + S2->life = 10; + } else { +#endif + if (thisSproingie->life > 10) { + thisSproingie->life = 10; + thisSproingie->frame = BOOM_FRAME; + if ((thisSproingie->r += 0.5) > 1.0) + thisSproingie->r = 1.0; + if ((thisSproingie->g += 0.5) > 1.0) + thisSproingie->g = 1.0; + if ((thisSproingie->b += 0.5) > 1.0) + thisSproingie->b = 1.0; + } +#if 0 + } +#endif + } + ++S2; + } + } + if (!((thisSproingie->life == 10) && + (thisSproingie->frame > 0) && + (thisSproingie->frame < BOOM_FRAME))) { + if ((--(thisSproingie->life)) < 1) { + thisSproingie->life = RESET_SPROINGIE; + } else if (thisSproingie->life < 9) { + thisSproingie->frame -= 2; + } + } /* else wait here for frame 0 to come about. */ + } else if (++(thisSproingie->life) >= 0) { + if (t > 1) { + g_higher = -3 + myrand(5); + g_back = -2 + myrand(5); + } else if (t == 1) { + g_higher = -2 + myrand(3); + g_back = -1 + myrand(3); + } else { + g_higher = -1; + g_back = 0; + } + + thisSproingie->x = (-g_higher - g_back); + thisSproingie->y = (g_higher << 1); + thisSproingie->z = (g_back - g_higher); + thisSproingie->life = 40 + myrand(200); + thisSproingie->frame = -10; + thisSproingie->r = (GLfloat) (40 + myrand(200)) / 255.0; + thisSproingie->g = (GLfloat) (40 + myrand(200)) / 255.0; + thisSproingie->b = (GLfloat) (40 + myrand(200)) / 255.0; + + for (t2 = 0; t2 < si->maxsproingies; ++t2) { + if ((t2 != t) && (thisSproingie->x == S2->x) && + (thisSproingie->y == S2->y) && (thisSproingie->z == S2->z) && + (S2->life > 10) && (S2->frame < 0)) { + /* If one is already being born, just wait. */ + thisSproingie->life = -1; + } + ++S2; + } + } +} + +static void +NextSproingie(int screen) +{ + sp_instance *si = &si_list[screen]; + int ddx, t; + struct sPosColor *thisSproingie = &(si->positions[0]); + + if (++si->sframe > 11) { + si->sframe = 0; + for (t = 0; t < si->maxsproingies; ++t) { + thisSproingie->x -= 1; + thisSproingie->y += 2; + thisSproingie->z -= 1; + ++thisSproingie; + } + } + for (t = 0; t < si->maxsproingies; ++t) { + AdvanceSproingie(t, si); + } + + if (si->target_count < 0) { /* track to current target */ + if (si->target_rx < si->rotx) + --si->rotx; + else if (si->target_rx > si->rotx) + ++si->rotx; + + if (si->target_ry < si->roty) + --si->roty; + else if (si->target_ry > si->roty) + ++si->roty; + + ddx = (si->target_dist - si->dist) / 8; + if (ddx) + si->dist += ddx; + else if (si->target_dist < si->dist) + --si->dist; + else if (si->target_dist > si->dist) + ++si->dist; + + if ((si->target_rx == si->rotx) && (si->target_ry == si->roty) && + (si->target_dist == si->dist)) { + si->target_count = T_COUNT; + if (si->target_dist <= 32) + si->target_count >>= 2; + } + } else if (--si->target_count < 0) { /* make up new target */ + si->target_rx = myrand(100) - 35; + si->target_ry = -myrand(90); + si->target_dist = 32 << myrand(2); /* could be 32, 64, or 128, (previously or 256) */ + + if (si->target_dist >= si->dist) /* no duplicate distances */ + si->target_dist <<= 1; + } + /* Otherwise just hang loose for a while here */ +} + +#ifdef __AUXFUNCS__ +void +PrintEm(void) +{ + int t, count = 0; + + for (t = 0; t < maxsproingies; ++t) { + if (positions[t].life > 0) + ++count; + } + (void) printf("RotX: %d, RotY: %d, Dist: %d. Targets: X %d, Y %d, D %d. Visible: %d\n", + rotx, roty, dist, target_rx, target_ry, target_dist, count); +} + +void +ResetEm(void) +{ + int t; + + for (t = 0; t < maxsproingies; ++t) { + positions[t].x = 0; + positions[t].y = 0; + positions[t].z = 0; + positions[t].life = -2; + positions[t].frame = 0; + } +} + +void +distAdd(void) +{ + if (dist < (1 << 16 << 4)) + dist <<= 1; +} + +void +distSubtract(void) +{ + if (dist > 1) + dist >>= 1; +} + +void +rotxAdd(void) +{ + rotx = (rotx + 5) % 360; +} + +void +rotxSubtract(void) +{ + rotx = (rotx - 5) % 360; +} + +void +rotyAdd(void) +{ + roty = (roty + 5) % 360; +} + +void +rotySubtract(void) +{ + roty = (roty - 5) % 360; +} + +void +rotxBAdd(void) +{ + rotx = (rotx + 45) % 360; +} + +void +rotxBSubtract(void) +{ + rotx = (rotx - 45) % 360; +} + +void +rotyBAdd(void) +{ + roty = (roty + 45) % 360; +} + +void +rotyBSubtract(void) +{ + roty = (roty - 45) % 360; +} + +#endif + +static void +RenderSproingie(int t, sp_instance * si) +{ + GLfloat scale, pointsize, mat_color[4] = + {0.0, 0.0, 0.0, 1.0}; + GLdouble clipplane[4] = + {0.0, 1.0, 0.0, 0.0}; + struct sPosColor *thisSproingie = &(si->positions[t]); + + if (thisSproingie->life < 1) + return; + + glPushMatrix(); + + if (!si->mono) { + mat_color[0] = thisSproingie->r; + mat_color[1] = thisSproingie->g; + mat_color[2] = thisSproingie->b; + if (si->wireframe) + glColor3fv(mat_color); + else { + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_color); + } + } + if (thisSproingie->frame < 0) { + glEnable(GL_CLIP_PLANE0); + glTranslatef((GLfloat) (thisSproingie->x), + (GLfloat) (thisSproingie->y) + + ((GLfloat) (thisSproingie->frame) / 9.0), + (GLfloat) (thisSproingie->z)); + clipplane[3] = ((GLdouble) (thisSproingie->frame) / 9.0) + + (si->wireframe ? 0.0 : 0.1); + glClipPlane(GL_CLIP_PLANE0, clipplane); + glCallList(si->sproingies[0]); + glDisable(GL_CLIP_PLANE0); + } else if (thisSproingie->frame >= BOOM_FRAME) { + glTranslatef((GLfloat) (thisSproingie->x) + 0.5, + (GLfloat) (thisSproingie->y) + 0.5, + (GLfloat) (thisSproingie->z) - 0.5); + scale = (GLfloat) (1 << (thisSproingie->frame - BOOM_FRAME)); + glScalef(scale, scale, scale); + if (!si->wireframe) { + if (!si->mono) + glColor3fv(mat_color); + glDisable(GL_LIGHTING); + } + pointsize = (GLfloat) ((BOOM_FRAME + 8) - thisSproingie->frame) - + (si->dist / 64.0); + glPointSize((pointsize < 1.0) ? 1.0 : pointsize); +/*- + * PURIFY 4.0.1 reports an unitialized memory read on the next line when using + * MesaGL 2.2. This has been tracked to MesaGL 2.2 src/points.c line 313. */ + glCallList(si->SproingieBoom); + glPointSize(1.0); + if (!si->wireframe) { + glEnable(GL_LIGHTING); + } + } else if (thisSproingie->frame > 5) { + glTranslatef((GLfloat) (thisSproingie->x + 1), + (GLfloat) (thisSproingie->y - 1), (GLfloat) (thisSproingie->z - 1)); + glRotatef((GLfloat) - 90.0, 0.0, 1.0, 0.0); + glCallList(si->sproingies[thisSproingie->frame - 6]); + } else { + glTranslatef((GLfloat) (thisSproingie->x), (GLfloat) (thisSproingie->y), + (GLfloat) (thisSproingie->z)); + glCallList(si->sproingies[thisSproingie->frame]); + } + + glPopMatrix(); + +} + +static void +ComputeGround(sp_instance * si) +{ + int g_higher, g_back, g_width, g_height; + + /* higher: x-1, y+2, z-1 */ + /* back: x-1, y, z+1 */ + + if (si->groundlevel == 0) { + g_back = 2; + g_width = 5; + } else if (si->groundlevel == 1) { + g_back = 4; + g_width = 8; + } else { + g_back = 8; + g_width = 16; + } + + if ((g_higher = si->dist >> 3) < 4) + g_higher = 4; + if (g_higher > 16) + g_higher = 16; + g_height = g_higher << 1; + + if (si->rotx < -10) + g_higher += (g_higher >> 2); + else if (si->rotx > 10) + g_higher -= (g_higher >> 2); + +#if 0 + if (si->dist > 128) { + ++g_higher; + ++g_back; + g_back <<= 1; + } else if (si->dist > 64) { + ++g_higher; + ++g_back; + } else if (si->dist > 32) { + /* nothing special */ + } else { + if (g_higher > 2) { + g_higher = g_back = 4; + } + } +#endif + + /* startx, starty, startz, width, height */ + LayGround((-g_higher - g_back), (g_higher << 1), (g_back - g_higher), + (g_width), (g_height), si); +} + +void +DisplaySproingies(int screen) +{ + sp_instance *si = &si_list[screen]; + int t; + GLfloat position[] = + {8.0, 5.0, -2.0, 0.1}; + + if (si->wireframe) + glClear(GL_COLOR_BUFFER_BIT); + else + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + glTranslatef(0.0, 0.0, -(GLfloat) (si->dist) / 16.0); /* viewing transform */ + glRotatef((GLfloat) si->rotx, 1.0, 0.0, 0.0); + glRotatef((GLfloat) si->roty, 0.0, 1.0, 0.0); + + if (!si->wireframe) + glLightfv(GL_LIGHT0, GL_POSITION, position); + +#if 0 /* Show light pos */ + glPushMatrix(); + glTranslatef(position[0], position[1], position[2]); + glColor3f(1.0, 1.0, 1.0); + if (!si->wireframe) { + glDisable(GL_LIGHTING); + } + glCallList(si->SproingieBoom); + if (!si->wireframe) { + glEnable(GL_LIGHTING); + } + glPopMatrix(); +#endif + + glTranslatef((GLfloat) si->sframe * (-1.0 / 12.0) - 0.75, + (GLfloat) si->sframe * (2.0 / 12.0) - 0.5, + (GLfloat) si->sframe * (-1.0 / 12.0) + 0.75); + + if (si->wireframe) + ComputeGround(si); + + for (t = 0; t < si->maxsproingies; ++t) { + RenderSproingie(t, si); + } + + if (!si->wireframe) + ComputeGround(si); + + glPopMatrix(); + glFlush(); + + SproingieSwap(); +} + +void +NextSproingieDisplay(int screen) +{ + NextSproingie(screen); + DisplaySproingies(screen); +} + +#if 0 +void +ReshapeSproingies(int w, int h) +{ + glViewport(0, 0, w, h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(65.0, (GLfloat) w / (GLfloat) h, 0.1, 2000.0); /* was 200000.0 */ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +#endif + +void +CleanupSproingies(int screen) +{ + sp_instance *si = &si_list[screen]; + int t; + + if (si->SproingieBoom) { + for (t = 0; t < 6; ++t) + glDeleteLists(si->sproingies[t], 1); + + glDeleteLists(si->TopsSides, 2); + glDeleteLists(si->SproingieBoom, 1); + + --active_screens; + si->SproingieBoom = 0; + } + if (si->positions) { + (void) free((void *) (si->positions)); + si->positions = NULL; + } + if ((active_screens == 0) && si_list) { + (void) free((void *) (si_list)); + si_list = NULL; + } +} + +void +InitSproingies(int wfmode, int grnd, int mspr, int screen, int numscreens, + int mono) +{ + GLfloat ambient[] = + {0.2, 0.2, 0.2, 1.0}; + GLfloat position[] = + {10.0, 1.0, 1.0, 10.0}; + GLfloat mat_diffuse[] = + {0.6, 0.6, 0.6, 1.0}; + GLfloat mat_specular[] = + {0.8, 0.8, 0.8, 1.0}; + GLfloat mat_shininess[] = + {50.0}; + + sp_instance *si; + int t; + + if (si_list == NULL) { + if ((si_list = (sp_instance *) calloc(numscreens, + sizeof (sp_instance))) == NULL) + return; + } + si = &si_list[screen]; + + active_screens++; + CleanupSproingies(screen); + + if (mspr < 0) + mspr = 0; + if (mspr >= MAXSPROING) + mspr = MAXSPROING - 1; + + si->rotx = 0; + si->roty = -45; + si->dist = (16 << 2); + si->sframe = 0; + si->target_count = 0; + si->mono = mono; + + si->wireframe = si->flatshade = 0; + + if (wfmode == 2) + si->flatshade = 1; + else if (wfmode) + si->wireframe = 1; + + si->groundlevel = grnd; + si->maxsproingies = mspr; + + if (si->maxsproingies) { + si->positions = (struct sPosColor *) calloc(si->maxsproingies, + sizeof (struct sPosColor)); + + if (!(si->positions)) + si->maxsproingies = 0; + } + for (t = 0; t < si->maxsproingies; ++t) { + si->positions[t].x = 0; + si->positions[t].y = 0; + si->positions[t].z = 0; + si->positions[t].life = (-t * ((si->maxsproingies > 19) ? 1 : 4)) - 2; + si->positions[t].frame = 0; + } + +#if 0 /* Test boom */ + si->positions[0].x = 0; + si->positions[0].y = 0; + si->positions[0].z = 0; + si->positions[0].life = 10; + si->positions[0].frame = BOOM_FRAME; + si->positions[0].r = 0.656863; + si->positions[0].g = 1.0; + si->positions[0].b = 0.656863; +#endif + + if (!(si->TopsSides = build_TopsSides(si->wireframe))) + (void) fprintf(stderr, "build_TopsSides\n"); + + if (!(si->sproingies[0] = BuildLWO(si->wireframe, &LWO_s1_1))) + (void) fprintf(stderr, "BuildLWO - 1\n"); + if (!(si->sproingies[1] = BuildLWO(si->wireframe, &LWO_s1_2))) + (void) fprintf(stderr, "BuildLWO - 2\n"); + if (!(si->sproingies[2] = BuildLWO(si->wireframe, &LWO_s1_3))) + (void) fprintf(stderr, "BuildLWO - 3\n"); + if (!(si->sproingies[3] = BuildLWO(si->wireframe, &LWO_s1_4))) + (void) fprintf(stderr, "BuildLWO - 4\n"); + if (!(si->sproingies[4] = BuildLWO(si->wireframe, &LWO_s1_5))) + (void) fprintf(stderr, "BuildLWO - 5\n"); + if (!(si->sproingies[5] = BuildLWO(si->wireframe, &LWO_s1_6))) + (void) fprintf(stderr, "BuildLWO - 6\n"); + + if (!(si->SproingieBoom = BuildLWO(si->wireframe, &LWO_s1_b))) + (void) fprintf(stderr, "BuildLWO - b\n"); + + if (si->wireframe) { + glShadeModel(GL_FLAT); + glDisable(GL_LIGHTING); + } else { + if (si->flatshade) { + glShadeModel(GL_FLAT); + position[0] = 1.0; + position[3] = 0.0; + } + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glDepthFunc(GL_LEQUAL); + glEnable(GL_DEPTH_TEST); + + glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); + glLightfv(GL_LIGHT0, GL_POSITION, position); + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular); + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess); + + /* glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); */ + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + + glFrontFace(GL_CW); + /* glEnable(GL_NORMALIZE); */ + } +} + +#endif + +/* End of sproingies.c */ diff --git a/hacks/glx/sproingiewrap.c b/hacks/glx/sproingiewrap.c new file mode 100644 index 00000000..6fb283e5 --- /dev/null +++ b/hacks/glx/sproingiewrap.c @@ -0,0 +1,227 @@ +/* -*- Mode: C; tab-width: 4 -*- + * sproingies.c --- 3D sproingies + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sproingiewrap.c 4.04 97/07/28 xlockmore"; +#endif +/* + * sproingiewrap.c - Copyright 1996 Sproingie Technologies Incorporated. + * Source and binary freely distributable under the + * terms in xlock.c + * + * 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. + * + *************************************************************************** + * Programming: Ed Mackey, http://www.early.com/~emackey/ + * Sproingie 3D objects modeled by: Al Mackey, al@iam.com + * (using MetaNURBS in NewTek's Lightwave 3D v5). + * + * Revision History: + * 26-Apr-97: Added glPointSize() calls around explosions, plus other fixes. + * 28-Mar-97: Added size support. + * 22-Mar-97: Updated to use glX interface instead of xmesa one. + * Also, support for multiscreens added. + * 20-Mar-97: Updated for xlockmore v4.02alpha7 and higher, using + * xlockmore's built-in Mesa/OpenGL support instead of + * my own. Submitted for inclusion in xlockmore. + * 09-Dec-96: Written. + * + * Ed Mackey + */ + +/*- + * The sproingies have six "real" frames, (s1_1 to s1_6) that show a + * sproingie jumping off a block, headed down and to the right. But + * the program thinks of sproingies as having twelve "virtual" frames, + * with the latter six being copies of the first, only lowered and + * rotated by 90 degrees (jumping to the left). So after going + * through 12 frames, a sproingie has gone down two rows but not + * moved horizontally. + * + * To have the sproingies randomly choose left/right jumps at each + * block, the program should go back to thinking of only 6 frames, + * and jumping down only one row when it is done. Then it can pick a + * direction for the next row. + * + * (Falling off the end might not be so bad either. :) ) + */ + +#ifdef STANDALONE +# define PROGCLASS "Sproingies" +# define HACK_INIT init_sproingies +# define HACK_DRAW draw_sproingies +# define sproingies_opts xlockmore_opts +# define DEFAULTS "*count: 5 \n" \ + "*cycles: 0 \n" \ + "*delay: 100 \n" \ + "*size: 0 \n" \ + "*wireframe: False \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +ModeSpecOpt sproingies_opts = { + 0, NULL, 0, NULL, NULL }; + +#define MINSIZE 32 + +#include +#include + +void NextSproingie(int screen); +void NextSproingieDisplay(int screen); +void DisplaySproingies(int screen); +#if 0 +void ReshapeSproingies(int w, int h); +#endif +void CleanupSproingies(int screen); +void InitSproingies(int wfmode, int grnd, int mspr, int screen, int numscreens, int mono); + +typedef struct { + GLfloat view_rotx, view_roty, view_rotz; + GLint gear1, gear2, gear3; + GLfloat angle; + GLuint limit; + GLuint count; + GLXContext glx_context; + int mono; +} sproingiesstruct; + +static sproingiesstruct *sproingies = NULL; + +static Display *swap_display; +static Window swap_window; + +void +SproingieSwap(void) +{ + glFinish(); + glXSwapBuffers(swap_display, swap_window); +} + + +/* ARGSUSED */ +void +draw_sproingies(ModeInfo * mi) +{ + sproingiesstruct *sp = &sproingies[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + glDrawBuffer(GL_BACK); + glXMakeCurrent(display, window, sp->glx_context); + + swap_display = display; + swap_window = window; + + NextSproingieDisplay(MI_SCREEN(mi)); /* It will swap. */ +} + +void +refresh_sproingies(ModeInfo * mi) +{ + /* No need to do anything here... The whole screen is updated + * every frame anyway. Otherwise this would be just like + * draw_sproingies, above, but replace NextSproingieDisplay(...) + * with DisplaySproingies(...). + */ +} + +void +release_sproingies(ModeInfo * mi) +{ + if (sproingies != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + sproingiesstruct *sp = &sproingies[screen]; + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), sp->glx_context); + CleanupSproingies(MI_SCREEN(mi)); + } + + /* Don't destroy the glXContext. init_GL does that. */ + + (void) free((void *) sproingies); + sproingies = NULL; + } +} + +void +init_sproingies(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int screen = MI_SCREEN(mi); + + int cycles = MI_CYCLES(mi); + int batchcount = MI_BATCHCOUNT(mi); + int size = MI_SIZE(mi); + + sproingiesstruct *sp; + int wfmode = 0, grnd, mspr, w, h; + + if (sproingies == NULL) { + if ((sproingies = (sproingiesstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (sproingiesstruct))) == NULL) + return; + } + sp = &sproingies[screen]; + + sp->mono = (MI_WIN_IS_MONO(mi) ? 1 : 0); + + sp->glx_context = init_GL(mi); + + if ((cycles & 1) || MI_WIN_IS_WIREFRAME(mi) || sp->mono) + wfmode = 1; + grnd = (cycles >> 1); + if (grnd > 2) + grnd = 2; + + mspr = batchcount; + if (mspr > 100) + mspr = 100; + + /* wireframe, ground, maxsproingies */ + InitSproingies(wfmode, grnd, mspr, MI_SCREEN(mi), MI_NUM_SCREENS(mi), sp->mono); + + /* Viewport is specified size if size >= MINSIZE && size < screensize */ + if (size == 0) { + w = MI_WIN_WIDTH(mi); + h = MI_WIN_HEIGHT(mi); + } else if (size < MINSIZE) { + w = MINSIZE; + h = MINSIZE; + } else { + w = (size > MI_WIN_WIDTH(mi)) ? MI_WIN_WIDTH(mi) : size; + h = (size > MI_WIN_HEIGHT(mi)) ? MI_WIN_HEIGHT(mi) : size; + } + + glViewport((MI_WIN_WIDTH(mi) - w) / 2, (MI_WIN_HEIGHT(mi) - h) / 2, w, h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(65.0, (GLfloat) w / (GLfloat) h, 0.1, 2000.0); /* was 200000.0 */ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + swap_display = display; + swap_window = window; + DisplaySproingies(MI_SCREEN(mi)); +} + +#endif + +/* End of sproingiewrap.c */ diff --git a/hacks/glx/superquadrics.c b/hacks/glx/superquadrics.c new file mode 100644 index 00000000..7e1d33e2 --- /dev/null +++ b/hacks/glx/superquadrics.c @@ -0,0 +1,757 @@ +/* -*- Mode: C; tab-width: 4 -*- + * superquadrics.c --- 3D mathematical shapes + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)superquadrics.c 4.04 97/07/28 xlockmore"; +#endif +/* 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. + * + * Superquadrics were invented by Dr. Alan Barr of Caltech University. + * They were first published in "Computer Graphics and Applications", + * volume 1, number 1, 1981, in the article "Superquadrics and Angle- + * Preserving Transformations." Dr. Barr based the Superquadrics on + * Piet Hein's "super ellipses." Super ellipses are like 2D ellipses, + * except that the formula includes an exponent, raising its X and Y + * values to a (fractional) power, and allowing them to gradually + * change from round to square edges. Superquadrics extend this + * idea into 3 dimensions, using two exponents to modify a + * quadric surface in a similar fashion. + * + * Revision History: + * 30-Mar-97: Turned into a module for xlockmore 4.02 alpha. The code + * is almost unrecognizable now from the first revision, except for + * a few remaining two-letter variable names. I still don't have + * the normal vectors working right (I wrote the buggy normal vector + * code myself, can you tell?) + * 07-Jan-97: A legend reborn; Superquadrics make an appearance as a + * real OpenGL program written in C. I can even render them with + * proper lighting and specular highlights. Gee, they look almost + * as good now as the original color plates of them that my uncle + * showed me as a child in 1981. I don't know what computer hardware + * he was using at the time, but it's taken a couple decades for the + * PC clone hardware to catch up to it. + * 05-Jan-97: After almost a decade, Superquadrics had almost faded away + * into the myths and folklore of all the things my brother and I played + * with on computers when we were kids with too much time on our hands. + * I had since gotten involved in Unix, OpenGL, and other things. + * A sudden flash of inspiration caused me to dig out the old Pascal + * source code, run it through p2c, and start ripping away the old + * wireframe rendering code, to be replaced by OpenGL. + * Late 1989 or early 1990: Around this time I did the Turbo Pascal + * port of the Superquadrics. Unfortunately, many of the original variable + * names remained the same from the C= 64 original. This was unfortunate + * because BASIC on the c64 only allowed 2-letter, global variable names. + * But the speed improvement over BASIC was very impressive at the time. + * Thanksgiving, 1987: Written. My uncle Al, who invented Superquadrics some + * years earlier, came to visit us. I was a high school kid at the time, + * with nothing more than a Commodore 64. Somehow we wrote this program, + * (he did the math obviously, I just coded it into BASIC for the c64). + * Yeah, 320x200 resolution, colorless white wireframe, and half an hour + * rendering time per superquadric. PLOT x,y. THOSE were the days. + * In the following years I would port Superquadrics to AppleBASIC, + * AmigaBASIC, and then Turbo Pascal for IBM clones. 5 minutes on a 286! + * Talk about fast rendering! But these days, when my Pentium 166 runs + * the same program, the superquadric will already be waiting on the + * screen before my monitor can change frequency from text to graphics + * mode. Can't time the number of minutes that way! Darn ;) + * + * Ed Mackey + */ + +/*- + * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock. + * otherwise caddr_t is not defined correctly + */ + +#include + +#ifdef STANDALONE +# define PROGCLASS "Superquadrics" +# define HACK_INIT init_superquadrics +# define HACK_DRAW draw_superquadrics +# define superquadrics_opts xlockmore_opts +# define DEFAULTS "*count: 25 \n" \ + "*cycles: 40 \n" \ + "*delay: 100 \n" \ + "*wireframe: False \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +/*- + * Note for low-CPU-speed machines: If your frame rate is so low that + * attempts at animation appear futile, try using "-cycles 1", which puts + * Superquadrics into kind of a slide-show mode. It will still use up + * all of your CPU power, but it may look nicer. + */ + +#define DEF_SPINSPEED "5.0" + +static float spinspeed; + +static XrmOptionDescRec opts[] = +{ + {"-spinspeed", ".superquadrics.spinspeed", XrmoptionSepArg, (caddr_t) NULL} +}; +static argtype vars[] = +{ + {(caddr_t *) & spinspeed, "spinspeed", "Spinspeed", DEF_SPINSPEED, t_Float} +}; +static OptionStruct desc[] = +{ + {"-spinspeed num", "speed of rotation, in degrees per frame"} +}; + +ModeSpecOpt superquadrics_opts = +{1, opts, 1, vars, desc}; + +#include + +#define MaxRes 50 +#define MinRes 5 + +typedef double dimi[MaxRes + 1]; + +typedef struct { + double xExponent, yExponent; + GLfloat r[4], g[4], b[4]; + long Mode; + int rotx, rotz; +} state; + +typedef struct { + GLXContext glx_context; + int dist, wireframe, flatshade, shownorms, maxcount, maxwait; + int counter, viewcount, viewwait, mono; + GLfloat curmat[4][4], rotx, roty, rotz, spinspeed; + /* In dimi: the first letter stands for cosine/sine, the second + * stands for North, South, East, or West. I think. + */ + dimi cs, se, sw, sn, ss, ce, cw, cn, Prevxx, Prevyy, Prevzz, + Prevxn, Prevyn, Prevzn; + double xExponent, yExponent, Mode; + int resolution; + state now, later; +} superquadricsstruct; + +static superquadricsstruct *superquadrics = NULL; + +#define CLIP_NORMALS 10000.0 + +static void ReshapeSuperquadrics(int w, int h); + +static int +myrand(int range) +{ + return ((int) (((float) range) * LRAND() / (MAXRAND))); +} + +static float +myrandreal(void) +{ + return (LRAND() / (MAXRAND)); +} + +/* Some old, old, OLD code follows. Ahh this takes me back..... */ + +/* Output from p2c, the Pascal-to-C translator */ +/* From input file "squad.pas" */ + +static double +XtoY(double x, double y) +{ + double z, a; + + /* This is NOT your typical raise-X-to-the-Y-power function. Do not attempt + * to replace this with a standard exponent function. If you must, just + * replace the "a = exp(y * log(z));" line with something faster. + */ + + z = fabs(x); + if (z < 1e-20) { + a = 0.0; + return a; + } + a = exp(y * log(z)); + if (a > CLIP_NORMALS) + a = CLIP_NORMALS; + if (x < 0) + a = -a; + return a; +} + + +static double +Sine(double x, double e) +{ + /* This is just the sine wave raised to the exponent. BUT, you can't + * raise negative numbers to fractional exponents. So we have a special + * XtoY routune which handles it in a way useful to superquadrics. + */ + + return (XtoY(sin(x), e)); +} + + +static double +Cosine(double x, double e) +{ + return (XtoY(cos(x), e)); +} + + +static void +MakeUpStuff(int allstuff, superquadricsstruct * sp) +{ + static int pats[4][4] = + { + {0, 0, 0, 0}, + {0, 1, 0, 1}, + {0, 0, 1, 1}, + {0, 1, 1, 0} + }; + + int dostuff; + int t, pat; + GLfloat r, g, b, r2, g2, b2; + + /* randomize it. */ + + if (sp->maxcount < 2) + allstuff = 1; + dostuff = allstuff * 15; + if (!dostuff) { + dostuff = myrand(3) + 1; + if (myrand(2) || (dostuff & 1)) + dostuff |= 4; + if (myrand(2)) + dostuff |= 8; + } + if (dostuff & 1) { + sp->later.xExponent = (((long) floor(myrandreal() * 250 + 0.5)) / 100.0) + 0.1; + sp->later.yExponent = (((long) floor(myrandreal() * 250 + 0.5)) / 100.0) + 0.1; + + /* Increase the 2.0 .. 2.5 range to 2.0 .. 3.0 */ + if (sp->later.xExponent > 2.0) + sp->later.xExponent = (sp->later.xExponent * 2.0) - 2.0; + if (sp->later.yExponent > 2.0) + sp->later.yExponent = (sp->later.yExponent * 2.0) - 2.0; + } + if (dostuff & 2) { + do { + sp->later.Mode = myrand(3L) + 1; + } while (!allstuff && (sp->later.Mode == sp->now.Mode)); + /* On init: make sure it can stay in mode 1 if it feels like it. */ + } + if (dostuff & 4) { + if (sp->mono) { + b = g = r = (GLfloat) (140 + myrand(100)) / 255.0; + b2 = g2 = r2 = ((r > 0.69) ? (1.0 - r) : r); + } else { + r = (GLfloat) (40 + myrand(200)) / 255.0; + g = (GLfloat) (40 + myrand(200)) / 255.0; + b = (GLfloat) (40 + myrand(200)) / 255.0; + + r2 = ((myrand(4) && ((r < 0.31) || (r > 0.69))) ? (1.0 - r) : r); + g2 = ((myrand(4) && ((g < 0.31) || (g > 0.69))) ? (1.0 - g) : g); + b2 = ((myrand(4) && ((b < 0.31) || (b > 0.69))) ? (1.0 - b) : b); + } + + pat = myrand(4); + for (t = 0; t < 4; ++t) { + sp->later.r[t] = pats[pat][t] ? r : r2; + sp->later.g[t] = pats[pat][t] ? g : g2; + sp->later.b[t] = pats[pat][t] ? b : b2; + } + } + if (dostuff & 8) { + sp->later.rotx = myrand(360) - 180; + sp->later.rotz = myrand(160) - 80; + } +} + +static void +inputs(superquadricsstruct * sp) +{ + int iv; + double u, v, mode3, cn3, inverter2, flatu, flatv; + + if (sp->Mode < 1.000001) { + mode3 = 1.0; + cn3 = 0.0; + inverter2 = 1.0; + } else if (sp->Mode < 2.000001) { + mode3 = 1.0; + cn3 = (sp->Mode - 1.0) * 1.5; + inverter2 = (sp->Mode - 1.0) * -2.0 + 1.0; + } else { + mode3 = (sp->Mode - 1.0); + cn3 = (sp->Mode - 2.0) / 2.0 + 1.5; + inverter2 = -1.0; + } + + if (sp->flatshade) { + flatu = M_PI / (sp->resolution - 1); + flatv = mode3 * M_PI / ((sp->resolution - 1) * 2); + } else { + flatu = flatv = 0.0; + } + + /* (void) printf("Calculating....\n"); */ + for (iv = 1; iv <= sp->resolution; iv++) { + + /* u ranges from PI down to -PI */ + u = (1 - iv) * 2 * M_PI / (sp->resolution - 1) + M_PI; + + /* v ranges from PI/2 down to -PI/2 */ + v = (1 - iv) * mode3 * M_PI / (sp->resolution - 1) + M_PI * (mode3 / 2.0); + + /* Use of xExponent */ + sp->se[iv] = Sine(u, sp->xExponent); + sp->ce[iv] = Cosine(u, sp->xExponent); + sp->sn[iv] = Sine(v, sp->yExponent); + sp->cn[iv] = Cosine(v, sp->yExponent) * inverter2 + cn3; + + /* Normal vector computations only */ + sp->sw[iv] = Sine(u + flatu, 2 - sp->xExponent); + sp->cw[iv] = Cosine(u + flatu, 2 - sp->xExponent); + sp->ss[iv] = Sine(v + flatv, 2 - sp->yExponent) * inverter2; + sp->cs[iv] = Cosine(v + flatv, 2 - sp->yExponent); + } /* next */ + + /* Now fix up the endpoints */ + sp->se[sp->resolution] = sp->se[1]; + sp->ce[sp->resolution] = sp->ce[1]; + + if (sp->Mode > 2.999999) { + sp->sn[sp->resolution] = sp->sn[1]; + sp->cn[sp->resolution] = sp->cn[1]; + } +} + + +static void +DoneScale(superquadricsstruct * sp) +{ + double xx, yy, zz, xp = 0, yp = 0, zp = 0, xn, yn, zn, xnp = 0, + ynp = 0, znp = 0; + int ih, iv; + + /* Hey don't knock my 2-letter variable names. Simon's BASIC rules, man! ;-> */ + /* Just kidding..... */ + int toggle = 0; + + for (ih = 1; ih <= sp->resolution; ih++) { + toggle ^= 2; + for (iv = 1; iv <= sp->resolution; iv++) { + toggle ^= 1; + if (sp->wireframe) + glColor3f(sp->curmat[toggle][0], sp->curmat[toggle][1], sp->curmat[toggle][2]); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, sp->curmat[toggle]); + + xx = sp->cn[iv] * sp->ce[ih]; + zz = sp->cn[iv] * sp->se[ih]; + yy = sp->sn[iv]; + + if (sp->wireframe) { + if ((ih > 1) || (iv > 1)) { + glBegin(GL_LINES); + if (ih > 1) { + glVertex3f(xx, yy, zz); + glVertex3f(sp->Prevxx[iv], sp->Prevyy[iv], sp->Prevzz[iv]); + } + if (iv > 1) { + glVertex3f(xx, yy, zz); + glVertex3f(sp->Prevxx[iv - 1], sp->Prevyy[iv - 1], sp->Prevzz[iv - 1]); + } +/* PURIFY 4.0.1 reports an unitialized memory read on the next line when using + * MesaGL 2.2 and -mono. This has been fixed in MesaGL 2.3 and later. */ + glEnd(); + } + } else { + if ((sp->cs[iv] > 1e+10) || (sp->cs[iv] < -1e+10)) { + xn = sp->cs[iv]; + zn = sp->cs[iv]; + yn = sp->ss[iv]; + } else { + xn = sp->cs[iv] * sp->cw[ih]; + zn = sp->cs[iv] * sp->sw[ih]; + yn = sp->ss[iv]; + } + if ((ih > 1) && (iv > 1)) { + glNormal3f(xn, yn, zn); + glBegin(GL_POLYGON); + glVertex3f(xx, yy, zz); + if (!sp->flatshade) + glNormal3f(sp->Prevxn[iv], sp->Prevyn[iv], sp->Prevzn[iv]); + glVertex3f(sp->Prevxx[iv], sp->Prevyy[iv], sp->Prevzz[iv]); + if (!sp->flatshade) + glNormal3f(xnp, ynp, znp); + glVertex3f(xp, yp, zp); + if (!sp->flatshade) + glNormal3f(sp->Prevxn[iv - 1], sp->Prevyn[iv - 1], sp->Prevzn[iv - 1]); + glVertex3f(sp->Prevxx[iv - 1], sp->Prevyy[iv - 1], sp->Prevzz[iv - 1]); + glEnd(); + } + if (sp->shownorms) { + if (!sp->flatshade) + glShadeModel(GL_FLAT); + glDisable(GL_LIGHTING); + glBegin(GL_LINES); + glVertex3f(xx, yy, zz); + glVertex3f(xx + xn, yy + yn, zz + zn); + glEnd(); + if (!sp->flatshade) + glShadeModel(GL_SMOOTH); + glEnable(GL_LIGHTING); + } + xnp = sp->Prevxn[iv]; + ynp = sp->Prevyn[iv]; + znp = sp->Prevzn[iv]; + sp->Prevxn[iv] = xn; + sp->Prevyn[iv] = yn; + sp->Prevzn[iv] = zn; + } + + xp = sp->Prevxx[iv]; + yp = sp->Prevyy[iv]; + zp = sp->Prevzz[iv]; + sp->Prevxx[iv] = xx; + sp->Prevyy[iv] = yy; + sp->Prevzz[iv] = zz; + + } /* next */ + } /* next */ +} + +/**** End of really old code ****/ + +static void +SetCull(int init, superquadricsstruct * sp) +{ + static int cullmode; + + if (init) { + cullmode = 0; + return; + } + if (sp->Mode < 1.0001) { + if (cullmode != 1) { + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); + cullmode = 1; + } + } else if (sp->Mode > 2.9999) { + if (cullmode != 2) { + glEnable(GL_CULL_FACE); + glCullFace(GL_FRONT); + cullmode = 2; + } + } else { + if (cullmode) { + glDisable(GL_CULL_FACE); + cullmode = 0; + } + } +} + +static void +SetCurrentShape(superquadricsstruct * sp) +{ + int t; + + sp->xExponent = sp->now.xExponent = sp->later.xExponent; + sp->yExponent = sp->now.yExponent = sp->later.yExponent; + + for (t = 0; t < 4; ++t) { + sp->curmat[t][0] = sp->now.r[t] = sp->later.r[t]; + sp->curmat[t][1] = sp->now.g[t] = sp->later.g[t]; + sp->curmat[t][2] = sp->now.b[t] = sp->later.b[t]; + } + + sp->Mode = (double) (sp->now.Mode = sp->later.Mode); + sp->rotx = sp->now.rotx = sp->later.rotx; + sp->rotz = sp->now.rotz = sp->later.rotz; + + sp->counter = -sp->maxwait; + + inputs(sp); +} + +static void +NextSuperquadric(superquadricsstruct * sp) +{ + double fnow, flater; + int t; + + sp->roty -= sp->spinspeed; + while (sp->roty >= 360.0) + sp->roty -= 360.0; + while (sp->roty < 0.0) + sp->roty += 360.0; + + --sp->viewcount; + + if (sp->counter > 0) { + if (--sp->counter == 0) { + SetCurrentShape(sp); + if (sp->counter == 0) { /* Happens if sp->maxwait == 0 */ + MakeUpStuff(0, sp); + sp->counter = sp->maxcount; + } + } else { + fnow = (double) sp->counter / (double) sp->maxcount; + flater = (double) (sp->maxcount - sp->counter) / (double) sp->maxcount; + sp->xExponent = sp->now.xExponent * fnow + sp->later.xExponent * flater; + sp->yExponent = sp->now.yExponent * fnow + sp->later.yExponent * flater; + + for (t = 0; t < 4; ++t) { + sp->curmat[t][0] = sp->now.r[t] * fnow + sp->later.r[t] * flater; + sp->curmat[t][1] = sp->now.g[t] * fnow + sp->later.g[t] * flater; + sp->curmat[t][2] = sp->now.b[t] * fnow + sp->later.b[t] * flater; + } + + sp->Mode = (double) sp->now.Mode * fnow + (double) sp->later.Mode * flater; + sp->rotx = (double) sp->now.rotx * fnow + (double) sp->later.rotx * flater; + sp->rotz = (double) sp->now.rotz * fnow + (double) sp->later.rotz * flater; + + inputs(sp); + } + } else { + if (++sp->counter >= 0) { + MakeUpStuff(0, sp); + sp->counter = sp->maxcount; + } + } +} + +static void +DisplaySuperquadrics(superquadricsstruct * sp) +{ + glDrawBuffer(GL_BACK); + if (sp->wireframe) + glClear(GL_COLOR_BUFFER_BIT); + else + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + if (sp->viewcount < 1) { + sp->viewcount = sp->viewwait; + ReshapeSuperquadrics(-1, -1); + } + glPushMatrix(); + glTranslatef(0.0, 0.0, -((GLfloat) (sp->dist) / 16.0) - (sp->Mode * 3.0 - 1.0)); /* viewing transform */ + glRotatef(sp->rotx, 1.0, 0.0, 0.0); /* pitch */ + glRotatef(sp->rotz, 0.0, 0.0, 1.0); /* bank */ + glRotatef(sp->roty, 0.0, 1.0, 0.0); /* "spin", like heading but comes after P & B */ + + SetCull(0, sp); + + DoneScale(sp); + + glPopMatrix(); + + /* Remember to flush & swap the buffers after calling this function! */ +} + +static void +NextSuperquadricDisplay(superquadricsstruct * sp) +{ + NextSuperquadric(sp); + DisplaySuperquadrics(sp); +} + +#define MINSIZE 200 +static void +ReshapeSuperquadrics(int w, int h) +{ + static int last_w = 0, last_h = 0; + int maxsize, cursize; + + if (w < 0) { + w = last_w; + h = last_h; + } else { + last_w = w; + last_h = h; + } + maxsize = (w < h) ? w : h; + if (maxsize <= MINSIZE) { + cursize = maxsize; + } else { + cursize = myrand(maxsize - MINSIZE) + MINSIZE; + } + if ((w > cursize) && (h > cursize)) { + glViewport(myrand(w - cursize), myrand(h - cursize), cursize, cursize); + w = h = cursize; + } else { + glViewport(0, 0, w, h); + } + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(30.0, (GLfloat) w / (GLfloat) h, 0.1, 200.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +static void +InitSuperquadrics(int wfmode, int snorm, int res, int count, float speed, superquadricsstruct * sp) +{ + GLfloat ambient[] = + {0.4, 0.4, 0.4, 1.0}; + GLfloat position[] = + {10.0, 1.0, 1.0, 10.0}; + GLfloat mat_diffuse[] = + {1.0, 0.5, 0.5, 1.0}; + GLfloat mat_specular[] = + {0.8, 0.8, 0.8, 1.0}; + GLfloat mat_shininess[] = + {50.0}; + + int t; + + for (t = 0; t < 4; ++t) + sp->curmat[t][3] = 1.0; + + sp->rotx = 35.0; + sp->roty = 0.0; + sp->rotz = 0.0; + sp->dist = (16 << 3); + sp->wireframe = sp->flatshade = sp->shownorms = 0; + sp->maxcount = count; + if (sp->maxcount < 1) + sp->maxcount = 1; + sp->maxwait = sp->maxcount >> 1; + SetCull(1, sp); + + sp->spinspeed = speed; + sp->viewcount = sp->viewwait = (sp->maxcount < 2) ? 1 : (sp->maxcount << 3); + + if (res < MinRes) + res = MinRes; + if (res > MaxRes) + res = MaxRes; + sp->resolution = res; + + if (wfmode == 2) + sp->flatshade = 1; + else if (wfmode) + sp->wireframe = 1; + + if (snorm) + sp->shownorms = 1; + + if (sp->wireframe) { + glShadeModel(GL_FLAT); + glDisable(GL_LIGHTING); + glColor3f(mat_diffuse[0], mat_diffuse[1], mat_diffuse[2]); + } else { + if (sp->flatshade) { + glShadeModel(GL_FLAT); + position[0] = 1.0; + position[3] = 0.0; + } + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glDepthFunc(GL_LEQUAL); + glEnable(GL_DEPTH_TEST); + + glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); + glLightfv(GL_LIGHT0, GL_POSITION, position); + + /*glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_diffuse); */ + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular); + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess); + + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + + glFrontFace(GL_CW); + glEnable(GL_NORMALIZE); + } + + MakeUpStuff(1, sp); + SetCurrentShape(sp); + MakeUpStuff(1, sp); /* Initialize it */ + sp->counter = sp->maxcount; +} + +/* End of superquadrics main functions */ + +void +init_superquadrics(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int screen = MI_SCREEN(mi); + + superquadricsstruct *sp; + + if (superquadrics == NULL) { + if ((superquadrics = (superquadricsstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (superquadricsstruct))) == NULL) + return; + } + sp = &superquadrics[screen]; + sp->mono = (MI_WIN_IS_MONO(mi) ? 1 : 0); + + sp->glx_context = init_GL(mi); + + InitSuperquadrics(MI_WIN_IS_WIREFRAME(mi) || sp->mono, 0, + MI_BATCHCOUNT(mi), MI_CYCLES(mi), spinspeed, sp); + ReshapeSuperquadrics(MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + + DisplaySuperquadrics(sp); + glFinish(); + glXSwapBuffers(display, window); +} + +void +refresh_superquadrics(ModeInfo * mi) +{ + /* Nothing happens here */ +} + +void +draw_superquadrics(ModeInfo * mi) +{ + superquadricsstruct *sp = &superquadrics[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + glXMakeCurrent(display, window, sp->glx_context); + + NextSuperquadricDisplay(sp); + + glFinish(); + glXSwapBuffers(display, window); +} + +void +release_superquadrics(ModeInfo * mi) +{ + if (superquadrics != NULL) { + + /* Don't destroy the glXContext. init_GL does that. */ + + (void) free((void *) superquadrics); + superquadrics = NULL; + } +} + + +#endif + +/* End of superquadrics.c */ diff --git a/hacks/glx/xlock-gl.c b/hacks/glx/xlock-gl.c new file mode 100644 index 00000000..28ee7ca3 --- /dev/null +++ b/hacks/glx/xlock-gl.c @@ -0,0 +1,173 @@ +/* xlock-gc.c --- xscreensaver compatibility layer for xlockmore GL modules. + * xscreensaver, Copyright (c) 1997 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. + * + * This file, along with xlockmore.h, make it possible to compile an xlockmore + * GL module into a standalone program, and thus use it with xscreensaver. + * By Jamie Zawinski on 31-May-97. + */ + +#include +#include "screenhack.h" +#include "xlockmoreI.h" + +#include +#include + +/* Gag -- we use this to turn X errors from glXCreateContext() into + something that will actually make sense to the user. + */ +static XErrorHandler orig_ehandler = 0; +static Bool got_error = 0; + +static int +BadValue_ehandler (Display *dpy, XErrorEvent *error) +{ + if (error->error_code == BadValue) + { + got_error = True; + return 0; + } + else + return orig_ehandler (dpy, error); +} + + +GLXContext +init_GL(ModeInfo * mi) +{ + Display *dpy = mi->dpy; + Window window = mi->window; + Screen *screen = mi->xgwa.screen; + Visual *visual = mi->xgwa.visual; + GLXContext glx_context = 0; + XVisualInfo vi_in, *vi_out; + int out_count; + + vi_in.screen = screen_number (screen); + vi_in.visualid = XVisualIDFromVisual (visual); + vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask, + &vi_in, &out_count); + if (! vi_out) abort (); + + { + XSync (dpy, False); + orig_ehandler = XSetErrorHandler (BadValue_ehandler); + glx_context = glXCreateContext (dpy, vi_out, 0, GL_TRUE); + XSync (dpy, False); + XSetErrorHandler (orig_ehandler); + if (got_error) + glx_context = 0; + } + + XFree((char *) vi_out); + + if (!glx_context) + { + fprintf(stderr, "%s: couldn't create GL context for visual 0x%x.\n", + progname, (unsigned int) XVisualIDFromVisual (visual)); + exit(1); + } + + glXMakeCurrent (dpy, window, glx_context); + + { + GLboolean rgba_mode = 0; + glGetBooleanv(GL_RGBA_MODE, &rgba_mode); + if (!rgba_mode) + { + glIndexi (WhitePixelOfScreen (screen)); + glClearIndex (BlackPixelOfScreen (screen)); + } + } + + return (glx_context); +} + + +Visual * +get_gl_visual (Screen *screen, char *name, char *class) +{ + char *string = get_string_resource (name, class); + XVisualInfo *vi = 0; + Bool done_once = False; + + AGAIN: + if (!string || !*string || + !strcmp (string, "best") || + !strcmp (string, "color") || + !strcmp (string, "default")) + { + Display *dpy = DisplayOfScreen (screen); + int screen_num = screen_number (screen); + int attrs[20]; + int i = 0; + Bool dbuf_p = !get_boolean_resource ("noBuffer", "NoBuffer"); + + done_once = True; + + attrs[i++] = GLX_RGBA; + attrs[i++] = GLX_RED_SIZE; attrs[i++] = 1; + attrs[i++] = GLX_GREEN_SIZE; attrs[i++] = 1; + attrs[i++] = GLX_BLUE_SIZE; attrs[i++] = 1; + attrs[i++] = GLX_DEPTH_SIZE; attrs[i++] = 1; + if (dbuf_p) + attrs[i++] = GLX_DOUBLEBUFFER; + attrs[i++] = 0; + + vi = glXChooseVisual (dpy, screen_num, attrs); + if (vi) goto DONE; + + /* Try without double-buffering. */ + attrs[i - 1] = 0; + vi = glXChooseVisual (dpy, screen_num, attrs); + if (vi) goto DONE; + + /* Try mono. */ + i = 0; + if (dbuf_p) + attrs[i++] = GLX_DOUBLEBUFFER; + attrs[i++] = 0; + vi = glXChooseVisual (dpy, screen_num, attrs); + if (vi) goto DONE; + + /* Try mono without double-buffering. */ + attrs[0] = 0; + vi = glXChooseVisual (dpy, screen_num, attrs); + } + + DONE: + { + Visual *v; + if (vi) + { + v = vi->visual; + XFree (vi); + } + else + { + v = get_visual (screen, string, False, True); + if (!v) + { + if (done_once) + v = DefaultVisualOfScreen (screen); + else + { + free (string); + string = 0; + goto AGAIN; + } + } + } + + free (string); + return v; + } +} diff --git a/hacks/goop.c b/hacks/goop.c new file mode 100644 index 00000000..079ebc61 --- /dev/null +++ b/hacks/goop.c @@ -0,0 +1,534 @@ +/* xscreensaver, Copyright (c) 1997 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. + */ + +#include +#include "screenhack.h" +#include "spline.h" +#include "alpha.h" + + +/* This is pretty compute-intensive, probably due to the large number of + polygon fills. I tried introducing a scaling factor to make the spline + code emit fewer line segments, but that made the edges very rough. + However, tuning *maxVelocity, *elasticity and *delay can result in much + smoother looking animation. I tuned these for a 1280x1024 Indy display, + but I don't know whether these values will be reasonable for a slower + machine... + + The more planes the better -- SGIs have a 12-bit pseudocolor display + (4096 colormap cells) which is mostly useless, except for this program, + where it means you can have 11 or 12 mutually-transparent objects instead + of only 7 or 8. But, if you are using the 12-bit visual, you should crank + down the velocity and elasticity, or server slowness will cause the + animation to look jerky (yes, it's sad but true, SGI's X server is + perceptibly slower when using plane masks on a 12-bit visual than on an + 8-bit visual.) Using -max-velocity 0.5 -elasticity 0.9 seems to work ok + on my Indy R5k with visual 0x27 and the bottom-of-the-line 24-bit graphics + board. + + It might look better if each blob had an outline, which was a *slightly* + darker color than the center, to give them a bit more definition -- but + that would mean using two planes per blob. (Or maybe allocating the + outline colors outside of the plane-space? Then the outlines wouldn't be + transparent, but maybe that wouldn't be so noticeable?) + + Oh, for an alpha channel... maybe I should rewrite this in GL. Then the + blobs could have thickness, and curved edges with specular reflections... + */ + + +#define SCALE 10000 /* fixed-point math, for sub-pixel motion */ +#define DEF_COUNT 12 /* When planes and count are 0, how many blobs. */ + + +#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n)))) +#define RANDSIGN() ((random() & 1) ? 1 : -1) + +struct blob { + long x, y; /* position of midpoint */ + long dx, dy; /* velocity and direction */ + double torque; /* rotational speed */ + double th; /* angle of rotation */ + long elasticity; /* how fast they deform */ + long max_velocity; /* speed limit */ + long min_r, max_r; /* radius range */ + int npoints; /* control points */ + long *r; /* radii */ + spline *spline; +}; + +struct layer { + int nblobs; + struct blob **blobs; + Pixmap pixmap; + unsigned long pixel; + GC gc; +}; + +enum goop_mode { + transparent, + opaque, + xor, + outline +}; + +struct goop { + enum goop_mode mode; + int width, height; + int nlayers; + struct layer **layers; + unsigned long background; + Pixmap pixmap; + GC pixmap_gc; + GC window_gc; +}; + + +static struct blob * +make_blob (int maxx, int maxy, int size) +{ + struct blob *b = (struct blob *) calloc(1, sizeof(*b)); + int i; + int mid; + + maxx *= SCALE; + maxy *= SCALE; + size *= SCALE; + + b->max_r = size/2; + b->min_r = size/10; + + if (b->min_r < (5*SCALE)) b->min_r = (5*SCALE); + mid = ((b->min_r + b->max_r) / 2); + + b->torque = get_float_resource ("torque", "Torque"); + b->elasticity = SCALE * get_float_resource ("elasticity", "Elasticity"); + b->max_velocity = SCALE * get_float_resource ("maxVelocity", "MaxVelocity"); + + b->x = RAND(maxx); + b->y = RAND(maxy); + + b->dx = RAND(b->max_velocity) * RANDSIGN(); + b->dy = RAND(b->max_velocity) * RANDSIGN(); + b->th = frand(M_PI+M_PI) * RANDSIGN(); + b->npoints = (random() % 5) + 5; + + b->spline = make_spline (b->npoints); + b->r = (long *) malloc (sizeof(*b->r) * b->npoints); + for (i = 0; i < b->npoints; i++) + b->r[i] = ((random() % mid) + (mid/2)) * RANDSIGN(); + return b; +} + +static void +throb_blob (struct blob *b) +{ + int i; + double frac = ((M_PI+M_PI) / b->npoints); + + for (i = 0; i < b->npoints; i++) + { + long r = b->r[i]; + long ra = (r > 0 ? r : -r); + double th = (b->th > 0 ? b->th : -b->th); + long x, y; + + /* place control points evenly around perimiter, shifted by theta */ + x = b->x + ra * cos (i * frac + th); + y = b->y + ra * sin (i * frac + th); + + b->spline->control_x[i] = x / SCALE; + b->spline->control_y[i] = y / SCALE; + + /* alter the radius by a random amount, in the direction in which + it had been going (the sign of the radius indicates direction.) */ + ra += (RAND(b->elasticity) * (r > 0 ? 1 : -1)); + r = ra * (r >= 0 ? 1 : -1); + + /* If we've reached the end (too long or too short) reverse direction. */ + if ((ra > b->max_r && r >= 0) || + (ra < b->min_r && r < 0)) + r = -r; + /* And reverse direction in mid-course once every 50 times. */ + else if (! (random() % 50)) + r = -r; + + b->r[i] = r; + } +} + +static void +move_blob (struct blob *b, int maxx, int maxy) +{ + maxx *= SCALE; + maxy *= SCALE; + + b->x += b->dx; + b->y += b->dy; + + /* If we've reached the edge of the box, reverse direction. */ + if ((b->x > maxx && b->dx >= 0) || + (b->x < 0 && b->dx < 0)) + { + b->dx = -b->dx; + } + if ((b->y > maxy && b->dy >= 0) || + (b->y < 0 && b->dy < 0)) + { + b->dy = -b->dy; + } + + /* Alter velocity randomly. */ + if (! (random() % 10)) + { + b->dx += (RAND(b->max_velocity/2) * RANDSIGN()); + b->dy += (RAND(b->max_velocity/2) * RANDSIGN()); + + /* Throttle velocity */ + if (b->dx > b->max_velocity || b->dx < -b->max_velocity) + b->dx /= 2; + if (b->dy > b->max_velocity || b->dy < -b->max_velocity) + b->dy /= 2; + } + + { + double th = b->th; + double d = (b->torque == 0 ? 0 : frand(b->torque)); + if (th < 0) + th = -(th + d); + else + th += d; + + if (th > (M_PI+M_PI)) + th -= (M_PI+M_PI); + else if (th < 0) + th += (M_PI+M_PI); + + b->th = (b->th > 0 ? th : -th); + } + + /* Alter direction of rotation randomly. */ + if (! (random() % 100)) + b->th *= -1; +} + +static void +draw_blob (Display *dpy, Drawable drawable, GC gc, struct blob *b, + Bool fill_p) +{ + compute_closed_spline (b->spline); +#ifdef DEBUG + { + int i; + for (i = 0; i < b->npoints; i++) + XDrawLine (dpy, drawable, gc, b->x/SCALE, b->y/SCALE, + b->spline->control_x[i], b->spline->control_y[i]); + } +#else + if (fill_p) + XFillPolygon (dpy, drawable, gc, b->spline->points, b->spline->n_points, + Nonconvex, CoordModeOrigin); + else +#endif + XDrawLines (dpy, drawable, gc, b->spline->points, b->spline->n_points, + CoordModeOrigin); +} + + +static struct layer * +make_layer (Display *dpy, Window window, int width, int height, int nblobs) +{ + int i; + struct layer *layer = (struct layer *) calloc(1, sizeof(*layer)); + int blob_min, blob_max; + XGCValues gcv; + layer->nblobs = nblobs; + + layer->blobs = (struct blob **) malloc(sizeof(*layer->blobs)*layer->nblobs); + + blob_max = (width < height ? width : height) / 2; + blob_min = (blob_max * 2) / 3; + for (i = 0; i < layer->nblobs; i++) + layer->blobs[i] = make_blob (width, height, + (random() % (blob_max-blob_min)) + blob_min); + + layer->pixmap = XCreatePixmap (dpy, window, width, height, 1); + layer->gc = XCreateGC (dpy, layer->pixmap, 0, &gcv); + + return layer; +} + +static void +draw_layer_plane (Display *dpy, struct layer *layer, int width, int height) +{ + int i; + XSetForeground (dpy, layer->gc, 1L); + XFillRectangle (dpy, layer->pixmap, layer->gc, 0, 0, width, height); + XSetForeground (dpy, layer->gc, 0L); + for (i = 0; i < layer->nblobs; i++) + { + throb_blob (layer->blobs[i]); + move_blob (layer->blobs[i], width, height); + draw_blob (dpy, layer->pixmap, layer->gc, layer->blobs[i], True); + } +} + + +static void +draw_layer_blobs (Display *dpy, Drawable drawable, GC gc, + struct layer *layer, int width, int height, + Bool fill_p) +{ + int i; + for (i = 0; i < layer->nblobs; i++) + { + throb_blob (layer->blobs[i]); + move_blob (layer->blobs[i], width, height); + draw_blob (dpy, drawable, gc, layer->blobs[i], fill_p); + } +} + + +static struct goop * +make_goop (Display *dpy, Window window, Colormap cmap, + int width, int height, long depth) +{ + int i; + struct goop *goop = (struct goop *) calloc(1, sizeof(*goop)); + XGCValues gcv; + int nblobs = get_integer_resource ("count", "Count"); + + unsigned long *plane_masks = 0; + unsigned long base_pixel = 0; + + goop->mode = (get_boolean_resource("xor", "Xor") + ? xor + : (get_boolean_resource("transparent", "Transparent") + ? transparent + : opaque)); + + goop->width = width; + goop->height = height; + + + goop->nlayers = get_integer_resource ("planes", "Planes"); + if (goop->nlayers <= 0) + goop->nlayers = (random() % (depth-2)) + 2; + goop->layers = (struct layer **) malloc(sizeof(*goop->layers)*goop->nlayers); + + + if (mono_p && goop->mode == transparent) + goop->mode = opaque; + + /* Try to allocate some color planes before committing to nlayers. + */ + if (goop->mode == transparent) + { + Bool additive_p = get_boolean_resource ("additive", "Additive"); + int nplanes = goop->nlayers; + allocate_alpha_colors (dpy, cmap, &nplanes, additive_p, &plane_masks, + &base_pixel); + if (nplanes > 1) + goop->nlayers = nplanes; + else + { + fprintf (stderr, + "%s: couldn't allocate any color planes; turning transparency off.\n", + progname); + goop->mode = opaque; + } + } + + { + int lblobs[32]; + int total = DEF_COUNT; + memset (lblobs, 0, sizeof(lblobs)); + if (nblobs <= 0) + while (total) + for (i = 0; total && i < goop->nlayers; i++) + lblobs[i]++, total--; + for (i = 0; i < goop->nlayers; i++) + goop->layers[i] = make_layer (dpy, window, width, height, + (nblobs > 0 ? nblobs : lblobs[i])); + } + + if (goop->mode == transparent && plane_masks) + { + for (i = 0; i < goop->nlayers; i++) + goop->layers[i]->pixel = base_pixel | plane_masks[i]; + goop->background = base_pixel; + } + if (plane_masks) + free (plane_masks); + + if (goop->mode != transparent) + { + XColor color; + color.flags = DoRed|DoGreen|DoBlue; + + goop->background = + get_pixel_resource ("background", "Background", dpy,cmap); + + for (i = 0; i < goop->nlayers; i++) + { + int H = random() % 360; /* range 0-360 */ + double S = ((double) (random()%70) + 30)/100.0; /* range 30%-100% */ + double V = ((double) (random()%34) + 66)/100.0; /* range 66%-100% */ + hsv_to_rgb (H, S, V, &color.red, &color.green, &color.blue); + if (XAllocColor (dpy, cmap, &color)) + goop->layers[i]->pixel = color.pixel; + else + goop->layers[i]->pixel = + WhitePixelOfScreen(DefaultScreenOfDisplay(dpy)); + } + } + + goop->pixmap = XCreatePixmap (dpy, window, width, height, + (goop->mode == xor ? 1L : depth)); + + gcv.background = goop->background; + gcv.foreground = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + gcv.line_width = get_integer_resource ("thickness","Thickness"); + goop->pixmap_gc = XCreateGC (dpy, goop->pixmap, GCLineWidth, &gcv); + goop->window_gc = XCreateGC (dpy, window, GCForeground|GCBackground, &gcv); + + return goop; +} + +static struct goop * +init_goop (Display *dpy, Window window) +{ + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + + return make_goop (dpy, window, xgwa.colormap, + xgwa.width, xgwa.height, xgwa.depth); +} + +static void +run_goop (Display *dpy, Window window, struct goop *goop) +{ + int i; + + switch (goop->mode) + { + case transparent: + + for (i = 0; i < goop->nlayers; i++) + draw_layer_plane (dpy, goop->layers[i], goop->width, goop->height); + + XSetForeground (dpy, goop->pixmap_gc, goop->background); + XSetPlaneMask (dpy, goop->pixmap_gc, AllPlanes); + XFillRectangle (dpy, goop->pixmap, goop->pixmap_gc, 0, 0, + goop->width, goop->height); + XSetForeground (dpy, goop->pixmap_gc, ~0L); + for (i = 0; i < goop->nlayers; i++) + { + XSetPlaneMask (dpy, goop->pixmap_gc, goop->layers[i]->pixel); +/* + XSetForeground (dpy, goop->pixmap_gc, ~0L); + XFillRectangle (dpy, goop->pixmap, goop->pixmap_gc, 0, 0, + goop->width, goop->height); + XSetForeground (dpy, goop->pixmap_gc, 0L); + */ + draw_layer_blobs (dpy, goop->pixmap, goop->pixmap_gc, + goop->layers[i], goop->width, goop->height, + True); + } + XCopyArea (dpy, goop->pixmap, window, goop->window_gc, 0, 0, + goop->width, goop->height, 0, 0); + break; + + case xor: + XSetFunction (dpy, goop->pixmap_gc, GXcopy); + XSetForeground (dpy, goop->pixmap_gc, 0); + XFillRectangle (dpy, goop->pixmap, goop->pixmap_gc, 0, 0, + goop->width, goop->height); + XSetFunction (dpy, goop->pixmap_gc, GXxor); + XSetForeground (dpy, goop->pixmap_gc, 1); + for (i = 0; i < goop->nlayers; i++) + draw_layer_blobs (dpy, goop->pixmap, goop->pixmap_gc, + goop->layers[i], goop->width, goop->height, + (goop->mode != outline)); + XCopyPlane (dpy, goop->pixmap, window, goop->window_gc, 0, 0, + goop->width, goop->height, 0, 0, 1L); + break; + + case opaque: + case outline: + XSetForeground (dpy, goop->pixmap_gc, goop->background); + XFillRectangle (dpy, goop->pixmap, goop->pixmap_gc, 0, 0, + goop->width, goop->height); + for (i = 0; i < goop->nlayers; i++) + { + XSetForeground (dpy, goop->pixmap_gc, goop->layers[i]->pixel); + draw_layer_blobs (dpy, goop->pixmap, goop->pixmap_gc, + goop->layers[i], goop->width, goop->height, + (goop->mode != outline)); + } + XCopyArea (dpy, goop->pixmap, window, goop->window_gc, 0, 0, + goop->width, goop->height, 0, 0); + break; + + default: + abort (); + break; + } +} + + +char *progclass = "Goop"; + +char *defaults [] = { + "Goop.background: black", /* to placate SGI */ + "Goop.foreground: white", + "*delay: 12000", + "*transparent: true", + "*additive: true", + "*xor: false", + "*count: 0", + "*planes: 0", + "*thickness: 5", + "*torque: 0.0075", + "*elasticity: 1.8", + "*maxVelocity: 1.2", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-count", ".count", XrmoptionSepArg, 0 }, + { "-planes", ".planes", XrmoptionSepArg, 0 }, + { "-transparent", ".transparent", XrmoptionNoArg, "True" }, + { "-non-transparent", ".transparent", XrmoptionNoArg, "False" }, + { "-additive", ".additive", XrmoptionNoArg, "True" }, + { "-subtractive", ".additive", XrmoptionNoArg, "false" }, + { "-xor", ".xor", XrmoptionNoArg, "true" }, + { "-no-xor", ".xor", XrmoptionNoArg, "false" }, + { "-thickness", ".thickness", XrmoptionSepArg, 0 }, + { "-torque", ".torque", XrmoptionSepArg, 0 }, + { "-elasticity", ".elasticity", XrmoptionSepArg, 0 }, + { "-max-velocity", ".maxVelocity", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + struct goop *g = init_goop (dpy, window); + int delay = get_integer_resource ("delay", "Integer"); + while (1) + { + run_goop (dpy, window, g); + XSync (dpy, True); + if (delay) usleep (delay); + } +} diff --git a/hacks/goop.man b/hacks/goop.man new file mode 100644 index 00000000..e7f4c3da --- /dev/null +++ b/hacks/goop.man @@ -0,0 +1,81 @@ +.TH XScreenSaver 1 "11-Jun-97" "X Version 11" +.SH NAME +goop - squishy transparent oil and bubble screenhack +.SH SYNOPSIS +.B goop +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-transparent] [\-non\-transparent] [\-additive] [\-subtractive] [\-xor] [\-no\-xor] +.SH DESCRIPTION +The \fIgoop\fP program draws a simulation of bubbles in layers of +overlapping multicolored translucent fluid. +.SH OPTIONS +.I goop +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 \-count \fIinteger\fP +How many bubbles to draw per layer. Default: random. +.TP 8 +.B \-layers \fIinteger\fP +How many layers to draw. Default: random, based on screen depth. +.TP 8 +.B \-delay \fImicroseconds\fP +How much of a delay should be introduced between steps of the animation. +Default 100000, or about 1/10th second. +.TP 8 +.B \-transparent +If \fI\-layers\fP is greater than 1, then each layer will be drawn in one +color, and when they overlap, the colors will be mixed. This only works +on \fBPseudoColor\fP displays. This is the default. +.TP 8 +.B \-non\-transparent +Turns off \fI\-transparent\fP. +.TP 8 +.B \-additive +If \fI\-transparent\fP is specified, then this option means that the colors +will be mixed using an additive color model, as if the blobs were projected +light. This is the default. +.TP 8 +.B \-subtractive +If \fI\-transparent\fP is specified, then this option means that the +colors will be mixed using a subtractive color model, as if the blobs were +translucent filters. +.TP 8 +.B \-xor +Draw with xor instead of the other color tricks. +.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 , 11-Jun-97. diff --git a/hacks/grav.c b/hacks/grav.c new file mode 100644 index 00000000..528bb1b9 --- /dev/null +++ b/hacks/grav.c @@ -0,0 +1,322 @@ +/* -*- Mode: C; tab-width: 4 -*- + * grav --- simulation of a planetary system. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)grav.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1993 Greg Bowering + * + * 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: jwz@netscape.com: turned into a standalone program. + * 11-Jul-94: color version + * 06-Oct-93: by Greg Bowering + */ + +#ifdef STANDALONE +# define PROGCLASS "Grav" +# define HACK_INIT init_grav +# define HACK_DRAW draw_grav +# define grav_opts xlockmore_opts +# define DEFAULTS "*count: 12 \n" \ + "*delay: 10000 \n" \ + "*ncolors: 64 \n" +# define BRIGHT_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#define GRAV -0.02 /* Gravitational constant */ +#define DIST 16.0 +#define COLLIDE 0.0001 +#define ALMOST 15.99 +#define HALF 0.5 +/* #define INTRINSIC_RADIUS 200.0 */ +#define INTRINSIC_RADIUS ((float) (gp->height/5)) +#define STARRADIUS (unsigned int)(gp->height/(2*DIST)) +#define AVG_RADIUS (INTRINSIC_RADIUS/DIST) +#define RADIUS (unsigned int)(INTRINSIC_RADIUS/(POS(Z)+DIST)) + +#define XR HALF*ALMOST +#define YR HALF*ALMOST +#define ZR HALF*ALMOST + +#define VR 0.04 + +#define DIMENSIONS 3 +#define X 0 +#define Y 1 +#define Z 2 + +#define DAMP 0.999999 +#define MaxA 0.1 /* Maximum acceleration (w/ damping) */ + +#define POS(c) planet->P[c] +#define VEL(c) planet->V[c] +#define ACC(c) planet->A[c] + +#define Planet(x,y)\ + if ((x) >= 0 && (y) >= 0 && (x) <= gp->width && (y) <= gp->height) {\ + if (planet->ri < 2)\ + XDrawPoint(display, window, gc, (x), (y));\ + else\ + XFillArc(display, window, gc,\ + (x) - planet->ri / 2, (y) - planet->ri / 2, planet->ri, planet->ri,\ + 0, 23040);\ + } + +#define FLOATRAND(min,max) ((min)+(LRAND()/MAXRAND)*((max)-(min))) + +#define DEF_DECAY "False" /* Damping for decaying orbits */ +#define DEF_TRAIL "False" /* For trails (works good in mono only) */ + +static Bool decay; +static Bool trail; + +static XrmOptionDescRec opts[] = +{ + {"-decay", ".grav.decay", XrmoptionNoArg, (caddr_t) "on"}, + {"+decay", ".grav.decay", XrmoptionNoArg, (caddr_t) "off"}, + {"-trail", ".grav.trail", XrmoptionNoArg, (caddr_t) "on"}, + {"+trail", ".grav.trail", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & decay, "decay", "Decay", DEF_DECAY, t_Bool}, + {(caddr_t *) & trail, "trail", "Trail", DEF_TRAIL, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+decay", "turn on/off decaying orbits"}, + {"-/+trail", "turn on/off trail dots"} +}; + +ModeSpecOpt grav_opts = { 4, opts, 2, vars, desc }; + +typedef struct { + double P[DIMENSIONS], V[DIMENSIONS], A[DIMENSIONS]; + int xi, yi, ri; + unsigned long colors; +} planetstruct; + +typedef struct { + int width, height; + int x, y, sr, nplanets; + unsigned long starcolor; + planetstruct *planets; +} gravstruct; + +static gravstruct *gravs = NULL; + +static void +init_planet(ModeInfo * mi, planetstruct * planet) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + gravstruct *gp = &gravs[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) > 2) + planet->colors = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + planet->colors = MI_WIN_WHITE_PIXEL(mi); + /* Initialize positions */ + POS(X) = FLOATRAND(-XR, XR); + POS(Y) = FLOATRAND(-YR, YR); + POS(Z) = FLOATRAND(-ZR, ZR); + + if (POS(Z) > -ALMOST) { + planet->xi = (int) + ((double) gp->width * (HALF + POS(X) / (POS(Z) + DIST))); + planet->yi = (int) + ((double) gp->height * (HALF + POS(Y) / (POS(Z) + DIST))); + } else + planet->xi = planet->yi = -1; + planet->ri = RADIUS; + + /* Initialize velocities */ + VEL(X) = FLOATRAND(-VR, VR); + VEL(Y) = FLOATRAND(-VR, VR); + VEL(Z) = FLOATRAND(-VR, VR); + + /* Draw planets */ + Planet(planet->xi, planet->yi); +} + +static void +draw_planet(ModeInfo * mi, planetstruct * planet) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + gravstruct *gp = &gravs[MI_SCREEN(mi)]; + double D; /* A distance variable to work with */ + register unsigned char cmpt; + + D = POS(X) * POS(X) + POS(Y) * POS(Y) + POS(Z) * POS(Z); + if (D < COLLIDE) + D = COLLIDE; + D = sqrt(D); + D = D * D * D; + for (cmpt = X; cmpt < DIMENSIONS; cmpt++) { + ACC(cmpt) = POS(cmpt) * GRAV / D; + if (decay) { + if (ACC(cmpt) > MaxA) + ACC(cmpt) = MaxA; + else if (ACC(cmpt) < -MaxA) + ACC(cmpt) = -MaxA; + VEL(cmpt) = VEL(cmpt) + ACC(cmpt); + VEL(cmpt) *= DAMP; + } else { + /* update velocity */ + VEL(cmpt) = VEL(cmpt) + ACC(cmpt); + } + /* update position */ + POS(cmpt) = POS(cmpt) + VEL(cmpt); + } + + gp->x = planet->xi; + gp->y = planet->yi; + + if (POS(Z) > -ALMOST) { + planet->xi = (int) + ((double) gp->width * (HALF + POS(X) / (POS(Z) + DIST))); + planet->yi = (int) + ((double) gp->height * (HALF + POS(Y) / (POS(Z) + DIST))); + } else + planet->xi = planet->yi = -1; + + /* Mask */ + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + Planet(gp->x, gp->y); + if (trail) { + XSetForeground(display, gc, planet->colors); + XDrawPoint(display, MI_WINDOW(mi), gc, gp->x, gp->y); + } + /* Move */ + gp->x = planet->xi; + gp->y = planet->yi; + planet->ri = RADIUS; + + /* Redraw */ + XSetForeground(display, gc, planet->colors); + Planet(gp->x, gp->y); +} + +void +init_grav(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + gravstruct *gp; + unsigned char ball; + + if (gravs == NULL) { + if ((gravs = (gravstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (gravstruct))) == NULL) + return; + } + gp = &gravs[MI_SCREEN(mi)]; + + gp->width = MI_WIN_WIDTH(mi); + gp->height = MI_WIN_HEIGHT(mi); + + gp->sr = STARRADIUS; + + gp->nplanets = MI_BATCHCOUNT(mi); + if (gp->nplanets < 0) { + if (gp->planets) { + (void) free((void *) gp->planets); + gp->planets = NULL; + } + gp->nplanets = NRAND(-gp->nplanets) + 1; /* Add 1 so its not too boring */ + } + if (!gp->planets) + gp->planets = (planetstruct *) calloc(gp->nplanets, sizeof (planetstruct)); + + XClearWindow(display, MI_WINDOW(mi)); + + if (MI_NPIXELS(mi) > 2) + gp->starcolor = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + gp->starcolor = MI_WIN_WHITE_PIXEL(mi); + for (ball = 0; ball < (unsigned char) gp->nplanets; ball++) + init_planet(mi, &gp->planets[ball]); + + /* Draw centrepoint */ + XDrawArc(display, MI_WINDOW(mi), gc, + gp->width / 2 - gp->sr / 2, gp->height / 2 - gp->sr / 2, gp->sr, gp->sr, + 0, 23040); +} + +void +draw_grav(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + gravstruct *gp = &gravs[MI_SCREEN(mi)]; + register unsigned char ball; + + /* Mask centrepoint */ + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + XDrawArc(display, window, gc, + gp->width / 2 - gp->sr / 2, gp->height / 2 - gp->sr / 2, gp->sr, gp->sr, + 0, 23040); + + /* Resize centrepoint */ + switch (NRAND(4)) { + case 0: + if (gp->sr < (int) STARRADIUS) + gp->sr++; + break; + case 1: + if (gp->sr > 2) + gp->sr--; + } + + /* Draw centrepoint */ + XSetForeground(display, gc, gp->starcolor); + XDrawArc(display, window, gc, + gp->width / 2 - gp->sr / 2, gp->height / 2 - gp->sr / 2, gp->sr, gp->sr, + 0, 23040); + + for (ball = 0; ball < (unsigned char) gp->nplanets; ball++) + draw_planet(mi, &gp->planets[ball]); +} + +void +release_grav(ModeInfo * mi) +{ + if (gravs != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + gravstruct *gp = &gravs[screen]; + + if (gp->planets) + (void) free((void *) gp->planets); + } + (void) free((void *) gravs); + gravs = NULL; + } +} + +void +refresh_grav(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/grav.man b/hacks/grav.man new file mode 100644 index 00000000..2a53938d --- /dev/null +++ b/hacks/grav.man @@ -0,0 +1,74 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +grav - draws a simple orbital simulation +.SH SYNOPSIS +.B grav +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-count \fIinteger\fP] [\-decay] [\-no\-decay] [\-trail] [\-no\-trail] + +.SH DESCRIPTION +The \fIgrav\fP program draws a simple orbital simulation +.SH OPTIONS +.I grav +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. +.TP 8 +.B \-count \fIinteger\fP +Default 12. +.TP 8 +.B \-decay +.TP 8 +.B \-no-\decay +Whether orbits should decay. + +.TP 8 +.B \-trail +.TP 8 +.B \-no\-trail +Whether the objects should leave trails behind them (makes it look vaguely +like a cloud-chamber. + +.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 1993 by Greg Bowering. + +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 +Greg Bowering , 1993. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/greynetic.c b/hacks/greynetic.c new file mode 100644 index 00000000..c3f5fbaf --- /dev/null +++ b/hacks/greynetic.c @@ -0,0 +1,182 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997 + * 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. + */ + +#include "screenhack.h" + +#define NBITS 12 + +#ifndef VMS +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#else /* VMS */ +# include "sys$common:[decw$include.bitmaps]stipple.xbm" +# include "sys$common:[decw$include.bitmaps]cross_weave.xbm" +# include "sys$common:[decw$include.bitmaps]dimple1.xbm" +# include "sys$common:[decw$include.bitmaps]dimple3.xbm" +# include "sys$common:[decw$include.bitmaps]flipped_gray.xbm" +# include "sys$common:[decw$include.bitmaps]gray1.xbm" +# include "sys$common:[decw$include.bitmaps]gray3.xbm" +# include "sys$common:[decw$include.bitmaps]hlines2.xbm" +# include "sys$common:[decw$include.bitmaps]light_gray.xbm" +# include "sys$common:[decw$include.bitmaps]root_weave.xbm" +# include "sys$common:[decw$include.bitmaps]vlines2.xbm" +# include "sys$common:[decw$include.bitmaps]vlines3.xbm" +#endif /* VMS */ + +static Pixmap pixmaps [NBITS]; +static GC gc; +static int delay; +static unsigned long fg, bg, pixels [512]; +static int npixels; + +static void +init_greynetic (Display *dpy, Window window) +{ + int i; + XGCValues gcv; + XWindowAttributes xgwa; + Colormap cmap; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + npixels = 0; + gcv.foreground= fg= get_pixel_resource("foreground","Foreground", dpy, cmap); + gcv.background= bg= get_pixel_resource("background","Background", dpy, cmap); + gcv.fill_style= FillOpaqueStippled; + gc = XCreateGC (dpy, window, GCForeground|GCBackground|GCFillStyle, &gcv); + + delay = get_integer_resource ("delay", "Integer"); + if (delay < 0) delay = 0; + + i = 0; +#define BITS(n,w,h) \ + pixmaps [i++] = XCreatePixmapFromBitmapData (dpy, window, n, w, h, 1, 0, 1) + + BITS (stipple_bits, stipple_width, stipple_height); + BITS (cross_weave_bits, cross_weave_width, cross_weave_height); + BITS (dimple1_bits, dimple1_width, dimple1_height); + BITS (dimple3_bits, dimple3_width, dimple3_height); + BITS (flipped_gray_bits, flipped_gray_width, flipped_gray_height); + BITS (gray1_bits, gray1_width, gray1_height); + BITS (gray3_bits, gray3_width, gray3_height); + BITS (hlines2_bits, hlines2_width, hlines2_height); + BITS (light_gray_bits, light_gray_width, light_gray_height); + BITS (root_weave_bits, root_weave_width, root_weave_height); + BITS (vlines2_bits, vlines2_width, vlines2_height); + BITS (vlines3_bits, vlines3_width, vlines3_height); +} + +static void +greynetic (Display *dpy, Window window) +{ + static int tick = 500, xlim, ylim; + static Colormap cmap; + int x, y, w, h, i; + XGCValues gcv; + if (tick++ == 500) + { + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + tick = 0; + xlim = xgwa.width; + ylim = xgwa.height; + cmap = xgwa.colormap; + } + for (i = 0; i < 10; i++) /* minimize area, but don't try too hard */ + { + w = 50 + random () % (xlim - 50); + h = 50 + random () % (ylim - 50); + if (w + h < xlim && w + h < ylim) + break; + } + x = random () % (xlim - w); + y = random () % (ylim - h); + gcv.stipple = pixmaps [random () % NBITS]; + if (mono_p) + { + MONO: + if (random () & 1) + gcv.foreground = fg, gcv.background = bg; + else + gcv.foreground = bg, gcv.background = fg; + } + else + { + XColor fgc, bgc; + if (npixels == sizeof (pixels) / sizeof (unsigned long)) + goto REUSE; + fgc.flags = bgc.flags = DoRed|DoGreen|DoBlue; + fgc.red = random (); + fgc.green = random (); + fgc.blue = random (); + bgc.red = random (); + bgc.green = random (); + bgc.blue = random (); + if (! XAllocColor (dpy, cmap, &fgc)) + goto REUSE; + pixels [npixels++] = fgc.pixel; + gcv.foreground = fgc.pixel; + if (! XAllocColor (dpy, cmap, &bgc)) + goto REUSE; + pixels [npixels++] = bgc.pixel; + gcv.background = bgc.pixel; + goto DONE; + REUSE: + if (npixels <= 0) + { + mono_p = 1; + goto MONO; + } + gcv.foreground = pixels [random () % npixels]; + gcv.background = pixels [random () % npixels]; + DONE: + ; + } + XChangeGC (dpy, gc, GCStipple|GCForeground|GCBackground, &gcv); + XFillRectangle (dpy, window, gc, x, y, w, h); + XSync (dpy, True); +} + + +char *progclass = "Greynetic"; + +char *defaults [] = { + "Greynetic.background: black", /* to placate SGI */ + "Greynetic.foreground: white", + "*delay: 0", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_greynetic (dpy, window); + while (1) + { + greynetic (dpy, window); + if (delay) usleep (delay); + } +} diff --git a/hacks/greynetic.man b/hacks/greynetic.man new file mode 100644 index 00000000..86381123 --- /dev/null +++ b/hacks/greynetic.man @@ -0,0 +1,52 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +greynetic - draw random stippled/color rectangles +.SH SYNOPSIS +.B greynetic +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP] +.SH DESCRIPTION +The \fIgreynetic\fP program draws random rectangles. +.SH OPTIONS +.I greynetic +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 \-delay \fImicroseconds\fP +Slow it down. +.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 1992 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 , 13-aug-92. diff --git a/hacks/halo.c b/hacks/halo.c new file mode 100644 index 00000000..470a9e90 --- /dev/null +++ b/hacks/halo.c @@ -0,0 +1,450 @@ +/* xscreensaver, Copyright (c) 1993, 1995, 1996, 1997 + * 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. + */ + +/* I wanted to lay down new circles with TV:ALU-ADD instead of TV:ALU-XOR, + but X doesn't support arithmetic combinations of pixmaps!! What losers. + I suppose I could crank out the 2's compliment math by hand, but that's + a real drag... + + This would probably look good with shapes other than circles as well. + + */ + +#include "screenhack.h" +#include + +struct circle { + int x, y, radius; + int increment; + int dx, dy; +}; + +static enum color_mode { + seuss_mode, ramp_mode, random_mode +} cmode; + + +static struct circle *circles; +static int count, global_count; +static Pixmap pixmap, buffer; +static int width, height, global_inc; +static int delay, delay2, cycle_delay; +static unsigned long fg_pixel, bg_pixel; +static GC draw_gc, erase_gc, copy_gc, merge_gc; +static Bool anim_p; +static Colormap cmap; + +static int ncolors; +static XColor *colors; +static Bool cycle_p; +static int fg_index; +static int bg_index; + + +#define min(x,y) ((x)<(y)?(x):(y)) +#define max(x,y) ((x)>(y)?(x):(y)) + +static void +init_circles_1 (Display *dpy, Window window) +{ + int i; + count = (global_count ? global_count + : (3 + (random () % max (1, (min (width, height) / 50))) + + (random () % max (1, (min (width, height) / 50))))); + circles = (struct circle *) malloc (count * sizeof (struct circle)); + for (i = 0; i < count; i++) + { + circles [i].x = 10 + random () % (width - 20); + circles [i].y = 10 + random () % (height - 20); + if (global_inc) + circles [i].increment = global_inc; + else + { /* prefer smaller increments to larger ones */ + int j = 8; + int inc = ((random()%j) + (random()%j) + (random()%j)) - ((j*3)/2); + if (inc < 0) inc = -inc + 3; + circles [i].increment = inc + 3; + } + circles [i].radius = random () % circles [i].increment; + circles [i].dx = ((random () % 3) - 1) * (1 + random () % 5); + circles [i].dy = ((random () % 3) - 1) * (1 + random () % 5); + } +} + +static void +init_circles (Display *dpy, Window window) +{ + XGCValues gcv; + XWindowAttributes xgwa; + char *mode_str = 0; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + global_count = get_integer_resource ("count", "Integer"); + if (global_count < 0) global_count = 0; + global_inc = get_integer_resource ("increment", "Integer"); + if (global_inc < 0) global_inc = 0; + anim_p = get_boolean_resource ("animate", "Boolean"); + delay = get_integer_resource ("delay", "Integer"); + delay2 = get_integer_resource ("delay2", "Integer") * 1000000; + cycle_delay = get_integer_resource ("cycleDelay", "Integer"); + mode_str = get_string_resource ("colorMode", "ColorMode"); + if (! mode_str) cmode = random_mode; + else if (!strcmp (mode_str, "seuss")) cmode = seuss_mode; + else if (!strcmp (mode_str, "ramp")) cmode = ramp_mode; + else if (!strcmp (mode_str, "random")) cmode = random_mode; + else { + fprintf (stderr, + "%s: colorMode must be seuss, ramp, or random, not \"%s\"\n", + progname, mode_str); + exit (1); + } + + if (mono_p) cmode = seuss_mode; + if (cmode == random_mode) + cmode = ((random()&3) == 1) ? ramp_mode : seuss_mode; + + if (cmode == ramp_mode) + anim_p = False; /* This combo doesn't work right... */ + + ncolors = get_integer_resource ("colors", "Colors"); + if (ncolors < 2) ncolors = 2; + if (ncolors <= 2) mono_p = True; + + if (mono_p) + colors = 0; + else + colors = (XColor *) malloc(sizeof(*colors) * (ncolors+1)); + + cycle_p = mono_p ? False : get_boolean_resource ("cycle", "Cycle"); + + + if (mono_p) + ; + else if (random() % (cmode == seuss_mode ? 2 : 10)) + make_uniform_colormap (dpy, xgwa.visual, cmap, colors, &ncolors, + True, &cycle_p, True); + else + make_smooth_colormap (dpy, xgwa.visual, cmap, colors, &ncolors, + True, &cycle_p, True); + + if (ncolors <= 2) mono_p = True; + if (mono_p) cycle_p = False; + if (mono_p) cmode = seuss_mode; + + if (mono_p) + { + fg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + bg_pixel = get_pixel_resource ("background", "Background", dpy, cmap); + } + else + { + fg_index = 0; + bg_index = ncolors / 4; + if (fg_index == bg_index) bg_index++; + fg_pixel = colors[fg_index].pixel; + bg_pixel = colors[bg_index].pixel; + } + + width = max (50, xgwa.width); + height = max (50, xgwa.height); + +#ifdef DEBUG + width/=2; height/=2; +#endif + + pixmap = XCreatePixmap (dpy, window, width, height, 1); + if (cmode == seuss_mode) + buffer = XCreatePixmap (dpy, window, width, height, 1); + else + buffer = 0; + + gcv.foreground = 1; + gcv.background = 0; + draw_gc = XCreateGC (dpy, pixmap, GCForeground | GCBackground, &gcv); + gcv.foreground = 0; + erase_gc = XCreateGC (dpy, pixmap, GCForeground, &gcv); + gcv.foreground = fg_pixel; + gcv.background = bg_pixel; + copy_gc = XCreateGC (dpy, window, GCForeground | GCBackground, &gcv); + + if (cmode == seuss_mode) + { + gcv.foreground = 1; + gcv.background = 0; + gcv.function = GXxor; + merge_gc = XCreateGC (dpy, pixmap, + GCForeground | GCBackground | GCFunction, &gcv); + } + else + { + gcv.foreground = fg_pixel; + gcv.background = bg_pixel; + gcv.function = GXcopy; + merge_gc = XCreateGC (dpy, window, + GCForeground | GCBackground | GCFunction, &gcv); + } + + init_circles_1 (dpy, window); + XClearWindow (dpy, window); + if (buffer) XFillRectangle (dpy, buffer, erase_gc, 0, 0, width, height); +} + +static void +run_circles (Display *dpy, Window window) +{ + int i; + static int iterations = 0; + static int oiterations = 0; + static Bool first_time_p = True; + Bool done = False; + Bool inhibit_sleep = False; + XFillRectangle (dpy, pixmap, erase_gc, 0, 0, width, height); + for (i = 0; i < count; i++) + { + int radius = circles [i].radius; + int inc = circles [i].increment; + + if (! (iterations & 1)) /* never stop on an odd number of iterations */ + ; + else if (radius == 0) /* eschew inf */ + ; + else if (radius < 0) /* stop when the circles are points */ + done = True; + else /* stop when the circles fill the window */ + { + /* Probably there's a simpler way to ask the musical question, + "is this square completely enclosed by this circle," but I've + forgotten too much trig to know it... (That's not really the + right question anyway, but the right question is too hard.) */ + double x1 = ((double) (-circles [i].x)) / ((double) radius); + double y1 = ((double) (-circles [i].y)) / ((double) radius); + double x2 = ((double) (width - circles [i].x)) / ((double) radius); + double y2 = ((double) (height - circles [i].y)) / ((double) radius); + x1 *= x1; x2 *= x2; y1 *= y1; y2 *= y2; + if ((x1 + y1) < 1 && (x2 + y2) < 1 && (x1 + y2) < 1 && (x2 + y1) < 1) + done = True; + } + + if (radius > 0 && + (cmode == seuss_mode || /* drawing all circles, or */ + circles [0].increment < 0)) /* on the way back in */ + { + XFillArc (dpy, + (cmode == seuss_mode ? pixmap : window), + (cmode == seuss_mode ? draw_gc : merge_gc), + circles [i].x - radius, circles [i].y - radius, + radius * 2, radius * 2, 0, 360*64); + } + circles [i].radius += inc; + } + + if (cycle_p && cmode != seuss_mode) + { + struct timeval now; + static struct timeval then = { 0, }; + unsigned long diff; +#ifdef GETTIMEOFDAY_TWO_ARGS + struct timezone tzp; + gettimeofday(&now, &tzp); +#else + gettimeofday(&now); +#endif + diff = (((now.tv_sec - then.tv_sec) * 1000000) + + (now.tv_usec - then.tv_usec)); + if (diff > cycle_delay) + { + rotate_colors (dpy, cmap, colors, ncolors, 1); + then = now; + } + } + + if (anim_p && !first_time_p) + inhibit_sleep = !done; + + if (done) + { + if (anim_p) + { + first_time_p = False; + for (i = 0; i < count; i++) + { + circles [i].x += circles [i].dx; + circles [i].y += circles [i].dy; + circles [i].radius %= circles [i].increment; + if (circles [i].x < 0 || circles [i].x >= width) + { + circles [i].dx = -circles [i].dx; + circles [i].x += (2 * circles [i].dx); + } + if (circles [i].y < 0 || circles [i].y >= height) + { + circles [i].dy = -circles [i].dy; + circles [i].y += (2 * circles [i].dy); + } + } + } + else if (circles [0].increment < 0) + { + /* We've zoomed out and the screen is blank -- re-pick the + center points, and shift the colors. + */ + free (circles); + init_circles_1 (dpy, window); + if (! mono_p) + { + fg_index = (fg_index + 1) % ncolors; + bg_index = (fg_index + (ncolors/2)) % ncolors; + XSetForeground (dpy, copy_gc, colors [fg_index].pixel); + XSetBackground (dpy, copy_gc, colors [bg_index].pixel); + } + } +#if 1 + /* Sometimes go out from the inside instead of the outside */ + else if ((random () % 10) == 0) + { +# if 0 + if (! mono_p) + { + unsigned long swap = fg_index; + fg_index = bg_index; + bg_index = swap; + XSetForeground (dpy, copy_gc, colors [fg_index].pixel); + XSetBackground (dpy, copy_gc, colors [bg_index].pixel); + } +# endif + iterations = 0; /* ick */ + for (i = 0; i < count; i++) + circles [i].radius %= circles [i].increment; + } +#endif + else + { + oiterations = iterations; + for (i = 0; i < count; i++) + { + circles [i].increment = -circles [i].increment; + circles [i].radius += (2 * circles [i].increment); + } + } + } + + if (buffer) + XCopyPlane (dpy, pixmap, buffer, merge_gc, 0, 0, width, height, 0, 0, 1); + else if (cmode != seuss_mode) + { + + if (!mono_p) + { + fg_index++; + bg_index++; + if (fg_index >= ncolors) fg_index = 0; + if (bg_index >= ncolors) bg_index = 0; + XSetForeground (dpy, merge_gc, colors [fg_index].pixel); + } + + if (circles [0].increment >= 0) + inhibit_sleep = True; + else if (done && cmode == seuss_mode) + XFillRectangle (dpy, window, merge_gc, 0, 0, width, height); + } + else + XCopyPlane (dpy, pixmap, window, merge_gc, 0, 0, width, height, 0, 0, 1); + + /* buffer is only used in seuss-mode or anim-mode */ + if (buffer && (anim_p + ? (done || (first_time_p && (iterations & 1))) + : (iterations & 1))) + { + XCopyPlane (dpy, buffer, window, copy_gc, 0, 0, width, height, 0, 0, 1); + XSync (dpy, True); + if (anim_p && done) + XFillRectangle (dpy, buffer, erase_gc, 0, 0, width, height); + } + +#ifdef DEBUG + XCopyPlane (dpy, pixmap, window, copy_gc, 0,0,width,height,width,height, 1); + if (buffer) + XCopyPlane (dpy, buffer, window, copy_gc, 0,0,width,height,0,height, 1); + XSync (dpy, True); +#endif + + if (done) + iterations = 0; + else + iterations++; + + if (delay && !inhibit_sleep) + { + static Bool really_first_p = True; + int direction = 1; + int d = delay; + if (done && cycle_p && cmode != seuss_mode && !really_first_p) + { + d = delay2; + if (! (random() % 10)) + direction = -1; + } + if (done) + really_first_p = False; + + XSync(dpy, False); + + if (cycle_p && cycle_delay) + { + int i = 0; + while (i < d) + { + rotate_colors (dpy, cmap, colors, ncolors, direction); + usleep(cycle_delay); + i += cycle_delay; + } + } + else + usleep (d); + } +} + + +char *progclass = "Halo"; + +char *defaults [] = { + "Halo.background: black", /* to placate SGI */ + "Halo.foreground: white", + "*colorMode: random", + "*colors: 100", + "*cycle: true", + "*count: 0", + "*delay: 100000", + "*delay2: 20", + "*cycleDelay: 100000", + 0 +}; + +XrmOptionDescRec options [] = { + { "-count", ".count", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-cycle-delay", ".cycleDelay", XrmoptionSepArg, 0 }, + { "-animate", ".animate", XrmoptionNoArg, "True" }, + { "-mode", ".colorMode", XrmoptionSepArg, 0 }, + { "-colors", ".colors", XrmoptionSepArg, 0 }, + { "-cycle", ".cycle", XrmoptionNoArg, "True" }, + { "-no-cycle", ".cycle", XrmoptionNoArg, "False" }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_circles (dpy, window); + while (1) + run_circles (dpy, window); +} diff --git a/hacks/halo.man b/hacks/halo.man new file mode 100644 index 00000000..0d3d4e01 --- /dev/null +++ b/hacks/halo.man @@ -0,0 +1,80 @@ +.TH XScreenSaver 1 "12-Jun-97" "X Version 11" +.SH NAME +halo - draw circular patterns +.SH SYNOPSIS +.B halo +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-count \fIint\fP] [\-delay \fIusecs\fP] [\-mode seuss | ramp | random ] [\-animate] [\-colors \fIinteger\fP] [\-cycle] [\-no\-cycle] [\-cycle\-delay \fIusecs\fP] +.SH DESCRIPTION +The \fIhalo\fP program draws cool patterns based on circles. +.SH OPTIONS +.I halo +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 \-count \fIinteger\fP +How many circles to draw. Default 0, meaning random. +.TP 8 +.B \-mode "seuss | ramp | random" +In \fIseuss\fP mode, alternating striped curves will be drawn. + +In \fIramp\fP mode, a color ramp will be drawn. + +\fIrandom\fP means pick the mode randomly. +.TP 8 +.B \-delay \fImicroseconds\fP +How much of a delay should be introduced between steps of the animation. +Default 100000, or about 0.1 second. +.TP 8 +.B \-colors \fIinteger\fP +How many colors to use. Default 100. +.TP 8 +.B \-animate +If specified, then the centerpoints of the circles will bounce around. +Otherwise, the circles will be drawn once, erased, and a new set of +circles will be drawn. +.TP 8 +.B \-cycle +.TP 8 +.B \-no\-cycle +Whether to do colormap cycling. Default is to cycle. +.TP 8 +.B \-cycle\-delay +Number of microseconds between shifts of the colormap; default 100000, +or 1/10th second. +.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 1993 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 , 6-jul-93. diff --git a/hacks/helix.c b/hacks/helix.c new file mode 100644 index 00000000..758c5557 --- /dev/null +++ b/hacks/helix.c @@ -0,0 +1,302 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997 + * 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. + */ + +/* Algorithm from a Mac program by Chris Tate, written in 1988 or so. */ + +/* 10-May-97: merged ellipse code by Dan Stromberg + * as found in xlockmore 4.03a10. + * 1992: jwz created. + */ + +#include +#include "screenhack.h" + +static double sins [360]; +static double coss [360]; + +static GC draw_gc, erase_gc; +static unsigned int default_fg_pixel; + +static void +init_helix (Display *dpy, Window window) +{ + int i; + XGCValues gcv; + XWindowAttributes xgwa; + Colormap cmap; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + 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); + + for (i = 0; i < 360; i++) + { + sins [i] = sin ((((double) i) / 180.0) * M_PI); + coss [i] = cos ((((double) i) / 180.0) * M_PI); + } +} + +static int +gcd (int a, int b) +{ + while (b > 0) + { + int tmp; + tmp = a % b; + a = b; + b = tmp; + } + return (a < 0 ? -a : a); +} + +static void +helix (Display *dpy, Window window, + int radius1, int radius2, int d_angle, + int factor1, int factor2, int factor3, int factor4) +{ + XWindowAttributes xgwa; + int width, height; + int xmid, ymid; + int x1, y1, x2, y2, angle, limit; + int i; + + XClearWindow (dpy, window); + XGetWindowAttributes (dpy, window, &xgwa); + width = xgwa.width; + height = xgwa.height; + + xmid = width / 2; + ymid = height / 2; + x1 = xmid; + y1 = ymid + radius2; + x2 = xmid; + y2 = ymid + radius1; + angle = 0; + limit = 1 + (360 / gcd (360, d_angle)); + + for (i = 0; i < limit; i++) + { + int tmp; +#define pmod(x,y) (tmp=((x) % (y)), (tmp >= 0 ? tmp : (tmp + (y)))) + + x1 = xmid + (((double) radius1) * sins [pmod ((angle * factor1), 360)]); + y1 = ymid + (((double) radius2) * coss [pmod ((angle * factor2), 360)]); + XDrawLine (dpy, window, draw_gc, x1, y1, x2, y2); + x2 = xmid + (((double) radius2) * sins [pmod ((angle * factor3), 360)]); + y2 = ymid + (((double) radius1) * coss [pmod ((angle * factor4), 360)]); + + XDrawLine (dpy, window, draw_gc, x1, y1, x2, y2); + angle += d_angle; + XFlush (dpy); + } +} + +static void +trig (Display *dpy, Window window, + int d_angle, int factor1, int factor2, + int offset, int d_angle_offset, int dir, int density) +{ + XWindowAttributes xgwa; + int width, height; + int xmid, ymid; + int x1, y1, x2, y2; + int tmp, angle; + Colormap cmap; + + XClearWindow (dpy, window); + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + width = xgwa.width; + height = xgwa.height; + + xmid = width / 2; + ymid = height / 2; + + while (d_angle >= -360 && d_angle <= 360) + { + angle = d_angle + d_angle_offset; + x1 = (sins [pmod(angle * factor1, 360)] * xmid) + xmid; + y1 = (coss [pmod(angle * factor1, 360)] * ymid) + ymid; + x2 = (sins [pmod(angle * factor2 + offset, 360)] * xmid) + xmid; + y2 = (coss [pmod(angle * factor2 + offset, 360)] * ymid) + ymid; + XDrawLine(dpy, window, draw_gc, x1, y1, x2, y2); + tmp = (int) 360 / (2 * density * factor1 * factor2); + if (tmp == 0) /* Do not want it getting stuck... */ + tmp = 1; /* Would not need if floating point */ + d_angle += dir * tmp; + } +} + +#define min(a,b) ((a)<(b)?(a):(b)) + +static void +random_helix (Display *dpy, Window window, XColor *color, Bool *got_color) +{ + Colormap cmap; + int width, height; + int radius, radius1, radius2, d_angle, factor1, factor2, factor3, factor4; + double divisor; + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + width = xgwa.width; + height = xgwa.height; + cmap = xgwa.colormap; + + radius = min (width, height) / 2; + + d_angle = 0; + factor1 = 2; + factor2 = 2; + factor3 = 2; + factor4 = 2; + + divisor = ((frand (3.0) + 1) * (((random() & 1) * 2) - 1)); + + if ((random () & 1) == 0) + { + radius1 = radius; + radius2 = radius / divisor; + } + else + { + radius2 = radius; + radius1 = radius / divisor; + } + + while (gcd (360, d_angle) >= 2) + d_angle = random () % 360; + +#define random_factor() \ + (((random() % 7) ? ((random() & 1) + 1) : 3) \ + * (((random() & 1) * 2) - 1)) + + while (gcd (gcd (gcd (factor1, factor2), factor3), factor4) != 1) + { + factor1 = random_factor (); + factor2 = random_factor (); + factor3 = random_factor (); + factor4 = random_factor (); + } + + if (mono_p) + XSetForeground (dpy, draw_gc, default_fg_pixel); + else + { + hsv_to_rgb (random () % 360, frand (1.0), frand (0.5) + 0.5, + &color->red, &color->green, &color->blue); + if ((*got_color = XAllocColor (dpy, cmap, color))) + XSetForeground (dpy, draw_gc, color->pixel); + else + XSetForeground (dpy, draw_gc, default_fg_pixel); + } + helix (dpy, window, radius1, radius2, d_angle, + factor1, factor2, factor3, factor4); +} + +static void +random_trig (Display *dpy, Window window, XColor *color, Bool *got_color) +{ + Colormap cmap; + int width, height; + int radius, d_angle, factor1, factor2; + int offset, d_angle_offset, dir, density; + + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + width = xgwa.width; + height = xgwa.height; + cmap = xgwa.colormap; + + radius = min (width, height) / 2; + + d_angle = 0; + factor1 = (random() % 8) + 1; + do { + factor2 = (random() % 8) + 1; + } while (factor1 == factor2); + + dir = (random() & 1) ? 1 : -1; + d_angle_offset = random() % 360; + offset = ((random() % ((360 / 4) - 1)) + 1) / 4; + density = 1 << ((random() % 4) + 4); /* Higher density, higher angles */ + + if (mono_p) + XSetForeground (dpy, draw_gc, default_fg_pixel); + else + { + hsv_to_rgb (random () % 360, frand (1.0), frand (0.5) + 0.5, + &color->red, &color->green, &color->blue); + if ((*got_color = XAllocColor (dpy, cmap, color))) + XSetForeground (dpy, draw_gc, color->pixel); + else + XSetForeground (dpy, draw_gc, default_fg_pixel); + } + trig (dpy, window, d_angle, factor1, factor2, + offset, d_angle_offset, dir, density); +} + +static void +random_helix_or_trig (Display *dpy, Window window) +{ + int i; + Bool free_color = False; + XColor color; + int width, height; + XWindowAttributes xgwa; + Colormap cmap; + XGetWindowAttributes (dpy, window, &xgwa); + width = xgwa.width; + height = xgwa.height; + cmap = xgwa.colormap; + + if (random() & 1) + random_helix(dpy, window, &color, &free_color); + else + random_trig(dpy, window, &color, &free_color); + + XSync (dpy, True); + sleep (5); + + for (i = 0; i < height; i++) + { + int y = (random () % height); + XDrawLine (dpy, window, erase_gc, 0, y, width, y); + XFlush (dpy); + if ((i % 50) == 0) + usleep (10000); + } + XClearWindow (dpy, window); + if (free_color) XFreeColors (dpy, cmap, &color.pixel, 1, 0); + XSync (dpy, True); + sleep (1); +} + + +char *progclass = "Helix"; + +char *defaults [] = { + "Helix.background: black", /* to placate SGI */ + 0 +}; + +XrmOptionDescRec options [] = { { 0, } }; + +void +screenhack (Display *dpy, Window window) +{ + init_helix (dpy, window); + while (1) + random_helix_or_trig (dpy, window); +} diff --git a/hacks/helix.man b/hacks/helix.man new file mode 100644 index 00000000..76c7cfef --- /dev/null +++ b/hacks/helix.man @@ -0,0 +1,50 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +helix - draw helical string-art patterns +.SH SYNOPSIS +.B helix +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] +.SH DESCRIPTION +The \fIhelix\fP program draws interesting patterns composed of line segments +in random colors. +.SH OPTIONS +.I helix +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. +.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 1992 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 , 13-aug-92. diff --git a/hacks/hopalong.c b/hacks/hopalong.c new file mode 100644 index 00000000..8b56155d --- /dev/null +++ b/hacks/hopalong.c @@ -0,0 +1,255 @@ +/* -*- Mode: C; tab-width: 4 -*- + * hop --- real plane fractals. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)hop.c 4.02 97/04/01 xlockmore"; +#endif + +/* Copyright (c) 1988-91 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: + * Changes of David Bagley + * 10-May-97: jwz@netscape.com: ported from xlockmore 4.03a10 to be a + * standalone program and thus usable with xscreensaver + * (I threw away my 1992 port and started over.) + * 27-Jul-95: added Peter de Jong's hop from Scientific American + * July 87 p. 111. Sometimes they are amazing but there are a + * few duds (I did not see a pattern in the parameters). + * 29-Mar-95: changed name from hopalong to hop + * 09-Dec-94: added sine hop + * + * (12-Aug-92: jwz@lucid.com: made xlock version run standalone.) + * + * Changes of Patrick J. Naughton + * 29-Oct-90: fix bad (int) cast. + * 29-Jul-90: support for multiple screens. + * 08-Jul-90: new timing and colors and new algorithm for fractals. + * 15-Dec-89: Fix for proper skipping of {White,Black}Pixel() in colors. + * 08-Oct-89: Fixed long standing typo bug in RandomInitHop(); + * Fixed bug in memory allocation in init_hop(); + * Moved seconds() to an extern. + * Got rid of the % mod since .mod is slow on a sparc. + * 20-Sep-89: Lint. + * 31-Aug-88: Forked from xlock.c for modularity. + * 23-Mar-88: Coded HOPALONG routines from Scientific American Sept. 86 p. 14. + */ + +#ifdef STANDALONE +# define PROGCLASS "Hopalong" +# define HACK_INIT init_hop +# define HACK_DRAW draw_hop +# define HACK_FREE release_hop +# define hop_opts xlockmore_opts +# define DEFAULTS "*count: 1000 \n" \ + "*cycles: 2500 \n" \ + "*delay: 10000 \n" \ + "*ncolors: 200 \n" +# define SMOOTH_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +static Bool jong; +static Bool sine; + +#define DEF_JONG "False" +#define DEF_SINE "False" + +static XrmOptionDescRec opts[] = +{ + {"-jong", ".hop.jong", XrmoptionNoArg, (caddr_t) "on"}, + {"+jong", ".hop.jong", XrmoptionNoArg, (caddr_t) "off"}, + {"-sine", ".hop.sine", XrmoptionNoArg, (caddr_t) "on"}, + {"+sine", ".hop.sine", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & jong, "jong", "Jong", DEF_JONG, t_Bool}, + {(caddr_t *) & sine, "sine", "Sine", DEF_SINE, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+jong", "turn on/off jong format"}, + {"-/+sine", "turn on/off sine format"} +}; + +ModeSpecOpt hop_opts = { 4, opts, 2, vars, desc }; + + +#define SQRT 0 +#define JONG 1 +#define SINE 2 +#ifdef OFFENDING +#define OPS 2 /* Sine might be too close to a Swastika for some... */ +#else +#define OPS 3 +#endif + +typedef struct { + int centerx; + int centery; /* center of the screen */ + double a; + double b; + double c; + double d; + double i; + double j; /* hopalong parameters */ + int inc; + int pix; + int op; + int count; + int bufsize; +} hopstruct; + +static hopstruct *hops = NULL; +static XPoint *pointBuffer = 0; /* pointer for XDrawPoints */ + +void +init_hop(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + hopstruct *hp; + double range; + + if (hops == NULL) { + if ((hops = (hopstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (hopstruct))) == NULL) + return; + } + hp = &hops[MI_SCREEN(mi)]; + + hp->centerx = MI_WIN_WIDTH(mi) / 2; + hp->centery = MI_WIN_HEIGHT(mi) / 2; + /* Make the other operations less common since they are less interesting */ + if (MI_WIN_IS_FULLRANDOM(mi)) { + hp->op = NRAND(OPS+2); /* jwz: make the others a bit more likely. */ + if (hp->op >= OPS) + hp->op = SQRT; + } else { + hp->op = SQRT; + if (jong) + hp->op = JONG; + else if (sine) + hp->op = SINE; + } + switch (hp->op) { + case SQRT: + range = sqrt((double) hp->centerx * hp->centerx + + (double) hp->centery * hp->centery) / (10.0 + NRAND(10)); + + hp->a = (LRAND() / MAXRAND) * range - range / 2.0; + hp->b = (LRAND() / MAXRAND) * range - range / 2.0; + hp->c = (LRAND() / MAXRAND) * range - range / 2.0; + if (LRAND() & 1) + hp->c = 0.0; + break; + case JONG: + hp->a = (LRAND() / MAXRAND) * 2.0 * M_PI - M_PI; + hp->b = (LRAND() / MAXRAND) * 2.0 * M_PI - M_PI; + hp->c = (LRAND() / MAXRAND) * 2.0 * M_PI - M_PI; + hp->d = (LRAND() / MAXRAND) * 2.0 * M_PI - M_PI; + break; + case SINE: + hp->a = M_PI + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.7; + break; + } + if (MI_NPIXELS(mi) > 2) + hp->pix = NRAND(MI_NPIXELS(mi)); + hp->i = hp->j = 0.0; + hp->inc = (int) ((LRAND() / MAXRAND) * 200) - 100; + hp->bufsize = MI_BATCHCOUNT(mi); + + if (!pointBuffer) + pointBuffer = (XPoint *) malloc(hp->bufsize * sizeof (XPoint)); + + XClearWindow(display, MI_WINDOW(mi)); + + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + hp->count = 0; +} + + +void +draw_hop(ModeInfo * mi) +{ + hopstruct *hp = &hops[MI_SCREEN(mi)]; + double oldj, oldi; + XPoint *xp = pointBuffer; + int k = hp->bufsize; + + hp->inc++; + if (MI_NPIXELS(mi) > 2) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_PIXEL(mi, hp->pix)); + if (++hp->pix >= MI_NPIXELS(mi)) + hp->pix = 0; + } + while (k--) { + oldj = hp->j; + switch (hp->op) { + case SQRT: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj + ((hp->i < 0) + ? sqrt(fabs(hp->b * oldi - hp->c)) + : -sqrt(fabs(hp->b * oldi - hp->c))); + xp->x = hp->centerx + (int) (hp->i + hp->j); + xp->y = hp->centery - (int) (hp->i - hp->j); + break; + case JONG: + if (hp->centerx > 0) + oldi = hp->i + 4 * hp->inc / hp->centerx; + else + oldi = hp->i; + hp->j = sin(hp->c * hp->i) - cos(hp->d * hp->j); + hp->i = sin(hp->a * oldj) - cos(hp->b * oldi); + xp->x = hp->centerx + (int) (hp->centerx * (hp->i + hp->j) / 4.0); + xp->y = hp->centery - (int) (hp->centery * (hp->i - hp->j) / 4.0); + break; + case SINE: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - sin(oldi); + xp->x = hp->centerx + (int) (hp->i + hp->j); + xp->y = hp->centery - (int) (hp->i - hp->j); + break; + } + xp++; + } + XDrawPoints(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + pointBuffer, hp->bufsize, CoordModeOrigin); + if (++hp->count > MI_CYCLES(mi)) + init_hop(mi); +} + +void +release_hop(ModeInfo * mi) +{ + if (hops != NULL) { + (void) free((void *) hops); + hops = NULL; + } + if (pointBuffer) { + (void) free((void *) pointBuffer); + pointBuffer = NULL; + } +} + +void +refresh_hop(ModeInfo * mi) +{ + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); +} diff --git a/hacks/hopalong.man b/hacks/hopalong.man new file mode 100644 index 00000000..bbb15be0 --- /dev/null +++ b/hacks/hopalong.man @@ -0,0 +1,78 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +hopalong - draw real plane fractals +.SH SYNOPSIS +.B hopalong +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-jong] [\-no\-jong] [\-jong] [\-no\-sine] + +.SH DESCRIPTION +The \fIhopalong\fP program generates real plane fractals as described in +the September 1986 issue of Scientific American. +.SH OPTIONS +.I hopalong +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 used cycle through the hue, making N stops around +the color wheel. +.TP 8 +.B \-cycles \fIinteger\fP +How long to run each batch. Default 2500 pixels. +.TP 8 +.B \-count \fIinteger\fP +How many pixels should be drawn before a color change. Default 1000. +.TP 8 +.B \-jong \fIinteger\fP +.TP 8 +.B \-no\-jong \fIinteger\fP +Whether to use the Jong format (default is to choose randomly.) + +.TP 8 +.B \-sine \fIinteger\fP +.TP 8 +.B \-no\-sine \fIinteger\fP +Whether to use the Sine format (default is to choose 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 1988-91 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. +.SH AUTHOR +Patrick J. Naughton , 23-mar-88. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 13-aug-92, and again on 10-May-97. diff --git a/hacks/hypercube.c b/hacks/hypercube.c new file mode 100644 index 00000000..9c0def91 --- /dev/null +++ b/hacks/hypercube.c @@ -0,0 +1,328 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996 + * 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. + * + * This code derived from TI Explorer Lisp code by Joe Keane, Fritz Mueller, + * and Jamie Zawinski. + */ + +#include +#include "screenhack.h" + +static Display *dpy; +static Window window; +static GC color0, color1, color2, color3, color4, color5, color6, color7; +static GC black; + +static int delay; + +static int observer_z; +static int x_offset, y_offset; +static int unit_pixels; + +struct point_state { + int old_x, old_y; + int new_x, new_y; + Bool same_p; +}; + +static void +move_line (struct point_state *state0, struct point_state *state1, GC gc) +{ + if (state0->same_p && state1->same_p) + return; + if (mono_p) + { + XDrawLine (dpy, window, black, + state0->old_x, state0->old_y, state1->old_x, state1->old_y); + XDrawLine (dpy, window, gc, + state0->new_x, state0->new_y, state1->new_x, state1->new_y); + } + else + { + XSegment segments [2]; + segments [0].x1 = state0->old_x; segments [0].y1 = state0->old_y; + segments [0].x2 = state1->old_x; segments [0].y2 = state1->old_y; + segments [1].x1 = state0->new_x; segments [1].y1 = state0->new_y; + segments [1].x2 = state1->new_x; segments [1].y2 = state1->new_y; + XDrawSegments (dpy, window, gc, segments, 2); + } +} + +static void +hyper (double xy, double xz, double yz, double xw, double yw, double zw) +{ + double cos_xy = cos (xy), sin_xy = sin (xy); + double cos_xz = cos (xz), sin_xz = sin (xz); + double cos_yz = cos (yz), sin_yz = sin (yz); + double cos_xw = cos (xw), sin_xw = sin (xw); + double cos_yw = cos (yw), sin_yw = sin (yw); + double cos_zw = cos (zw), sin_zw = sin (zw); + + double ax = 1.0, ay = 0.0, az = 0.0, aw = 0.0; + double bx = 0.0, by = 1.0, bz = 0.0, bw = 0.0; + double cx = 0.0, cy = 0.0, cz = 1.0, cw = 0.0; + double dx = 0.0, dy = 0.0, dz = 0.0, dw = 1.0; + + double _tmp0_, _tmp1_; + + struct point_state points [16]; + memset (points, 0, sizeof (points)); + +#define mmmm (&points[0]) +#define mmmp (&points[1]) +#define mmpm (&points[2]) +#define mmpp (&points[3]) +#define mpmm (&points[4]) +#define mpmp (&points[5]) +#define mppm (&points[6]) +#define mppp (&points[7]) +#define pmmm (&points[8]) +#define pmmp (&points[9]) +#define pmpm (&points[10]) +#define pmpp (&points[11]) +#define ppmm (&points[12]) +#define ppmp (&points[13]) +#define pppm (&points[14]) +#define pppp (&points[15]) + + while (1) + { + double temp_mult; + +#define compute(a,b,c,d,point_state) \ + temp_mult = (unit_pixels / (((a*az) + (b*bz) + (c*cz) + (d*dz) + \ + (a*aw) + (b*bw) + (c*cw) + (d*dw)) \ + - observer_z)); \ + point_state->old_x = point_state->new_x; \ + point_state->old_y = point_state->new_y; \ + point_state->new_x = ((((a*ax) + (b*bx) + (c*cx) + (d*dx)) * temp_mult) \ + + x_offset); \ + point_state->new_y = ((((a*ay) + (b*by) + (c*cy) + (d*dy)) * temp_mult) \ + + y_offset); \ + point_state->same_p = (point_state->old_x == point_state->new_x && \ + point_state->old_y == point_state->new_y); + + compute (-1, -1, -1, -1, mmmm); + compute (-1, -1, -1, 1, mmmp); + compute (-1, -1, 1, -1, mmpm); + compute (-1, -1, 1, 1, mmpp); + compute (-1, 1, -1, -1, mpmm); + compute (-1, 1, -1, 1, mpmp); + compute (-1, 1, 1, -1, mppm); + compute (-1, 1, 1, 1, mppp); + compute ( 1, -1, -1, -1, pmmm); + compute ( 1, -1, -1, 1, pmmp); + compute ( 1, -1, 1, -1, pmpm); + compute ( 1, -1, 1, 1, pmpp); + compute ( 1, 1, -1, -1, ppmm); + compute ( 1, 1, -1, 1, ppmp); + compute ( 1, 1, 1, -1, pppm); + compute ( 1, 1, 1, 1, pppp); + + move_line (mmmm, mmmp, color0); + move_line (mmmm, mmpm, color0); + move_line (mmpm, mmpp, color0); + move_line (mmmp, mmpp, color0); + + move_line (pmmm, pmmp, color1); + move_line (pmmm, pmpm, color1); + move_line (pmpm, pmpp, color1); + move_line (pmmp, pmpp, color1); + + move_line (mpmm, mpmp, color2); + move_line (mpmm, mppm, color2); + move_line (mppm, mppp, color2); + move_line (mpmp, mppp, color2); + + move_line (mmpp, mppp, color3); + move_line (mmpp, pmpp, color3); + move_line (pmpp, pppp, color3); + move_line (mppp, pppp, color3); + + move_line (mmmm, mpmm, color4); + move_line (mmmm, pmmm, color4); + move_line (mpmm, ppmm, color4); + move_line (pmmm, ppmm, color4); + + move_line (mmmp, mpmp, color5); + move_line (mmmp, pmmp, color5); + move_line (pmmp, ppmp, color5); + move_line (mpmp, ppmp, color5); + + move_line (mmpm, mppm, color6); + move_line (mmpm, pmpm, color6); + move_line (pmpm, pppm, color6); + move_line (mppm, pppm, color6); + + move_line (ppmm, ppmp, color7); + move_line (ppmm, pppm, color7); + move_line (pppm, pppp, color7); + move_line (ppmp, pppp, color7); + + /* If you get error messages about the following forms, and you think you're + using an ANSI C conforming compiler, then you're mistaken. Possibly you're + mixing an ANSI compiler with a non-ANSI preprocessor, or vice versa. + Regardless, your system is broken; it's not a bug in this program. + */ +#if defined(__STDC__) || defined(__ANSI_CPP__) +# define rotate(name,dim0,dim1,cos,sin) \ + _tmp0_ = ((name##dim0 * cos) + (name##dim1 * sin)); \ + _tmp1_ = ((name##dim1 * cos) - (name##dim0 * sin)); \ + name##dim0 = _tmp0_; \ + name##dim1 = _tmp1_; + +# define rotates(dim0,dim1) \ + if (sin_##dim0##dim1 != 0) { \ + rotate(a, dim0, dim1, cos_##dim0##dim1, sin_##dim0##dim1); \ + rotate(b, dim0, dim1, cos_##dim0##dim1, sin_##dim0##dim1); \ + rotate(c, dim0, dim1, cos_##dim0##dim1, sin_##dim0##dim1); \ + rotate(d, dim0, dim1, cos_##dim0##dim1, sin_##dim0##dim1); \ + } + +#else /* !__STDC__, courtesy of Andreas Luik */ +# define rotate(name,dim0,dim1,cos,sin) \ + _tmp0_ = ((name/**/dim0 * cos) + (name/**/dim1 * sin)); \ + _tmp1_ = ((name/**/dim1 * cos) - (name/**/dim0 * sin)); \ + name/**/dim0 = _tmp0_; \ + name/**/dim1 = _tmp1_; + +# define rotates(dim0,dim1) \ + if (sin_/**/dim0/**/dim1 != 0) { \ + rotate(a,dim0,dim1,cos_/**/dim0/**/dim1,sin_/**/dim0/**/dim1); \ + rotate(b,dim0,dim1,cos_/**/dim0/**/dim1,sin_/**/dim0/**/dim1); \ + rotate(c,dim0,dim1,cos_/**/dim0/**/dim1,sin_/**/dim0/**/dim1); \ + rotate(d,dim0,dim1,cos_/**/dim0/**/dim1,sin_/**/dim0/**/dim1); \ + } +#endif /* !__STDC__ */ + + rotates (x,y); + rotates (x,z); + rotates (y,z); + rotates (x,w); + rotates (y,w); + rotates (z,w); + + XSync (dpy, True); + if (delay) usleep (delay); + } +} + + +char *progclass = "Hypercube"; + +char *defaults [] = { + "Hypercube.background: black", /* to placate SGI */ + "Hypercube.foreground: white", + "*color0: red", + "*color1: orange", + "*color2: yellow", + "*color3: white", + "*color4: green", + "*color5: cyan", + "*color6: dodgerblue", + "*color7: magenta", + + "*xw: 0.000", + "*xy: 0.010", + "*xz: 0.005", + "*yw: 0.010", + "*yz: 0.000", + "*zw: 0.000", + + "*observer-z: 5", + "*delay: 100000", + 0 +}; + +XrmOptionDescRec options [] = { + { "-color0", ".color0", XrmoptionSepArg, 0 }, + { "-color1", ".color1", XrmoptionSepArg, 0 }, + { "-color2", ".color2", XrmoptionSepArg, 0 }, + { "-color3", ".color3", XrmoptionSepArg, 0 }, + { "-color4", ".color4", XrmoptionSepArg, 0 }, + { "-color5", ".color5", XrmoptionSepArg, 0 }, + { "-color6", ".color6", XrmoptionSepArg, 0 }, + { "-color7", ".color7", XrmoptionSepArg, 0 }, + + { "-xw", ".xw", XrmoptionSepArg, 0 }, + { "-xy", ".xy", XrmoptionSepArg, 0 }, + { "-xz", ".xz", XrmoptionSepArg, 0 }, + { "-yw", ".yw", XrmoptionSepArg, 0 }, + { "-yz", ".yz", XrmoptionSepArg, 0 }, + { "-zw", ".zw", XrmoptionSepArg, 0 }, + + { "-observer-z", ".observer-z", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *d, Window w) +{ + XGCValues gcv; + XWindowAttributes xgwa; + Colormap cmap; + double xy, xz, yz, xw, yw, zw; + unsigned long bg; + + dpy = d; + window = w; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + + x_offset = xgwa.width / 2; + y_offset = xgwa.height / 2; + unit_pixels = xgwa.width < xgwa.height ? xgwa.width : xgwa.height; + + xy = get_float_resource ("xy", "Float"); + xz = get_float_resource ("xz", "Float"); + yz = get_float_resource ("yz", "Float"); + xw = get_float_resource ("xw", "Float"); + yw = get_float_resource ("yw", "Float"); + zw = get_float_resource ("zw", "Float"); + + observer_z = get_integer_resource ("observer-z", "Integer"); + + delay = get_integer_resource ("delay", "Integer"); + + bg = get_pixel_resource ("background", "Background", dpy, cmap); + + if (mono_p) + { + gcv.function = GXcopy; + gcv.foreground = bg; + black = XCreateGC (dpy, window, GCForeground|GCFunction, &gcv); + gcv.foreground = get_pixel_resource ("foreground", "Foreground", + dpy, cmap); + color0 = color1 = color2 = color3 = color4 = color5 = color6 = color7 = + XCreateGC (dpy, window, GCForeground|GCFunction, &gcv); + } + else + { + black = 0; + gcv.function = GXxor; +#define make_gc(color,name) \ + gcv.foreground = bg ^ get_pixel_resource ((name), "Foreground", \ + dpy, cmap); \ + color = XCreateGC (dpy, window, GCForeground|GCFunction, &gcv) + + make_gc (color0,"color0"); + make_gc (color1,"color1"); + make_gc (color2,"color2"); + make_gc (color3,"color3"); + make_gc (color4,"color4"); + make_gc (color5,"color5"); + make_gc (color6,"color6"); + make_gc (color7,"color7"); + } + + hyper (xy, xz, yz, xw, yw, zw); +} diff --git a/hacks/hypercube.man b/hacks/hypercube.man new file mode 100644 index 00000000..daa66899 --- /dev/null +++ b/hacks/hypercube.man @@ -0,0 +1,93 @@ +.TH XScreenSaver 1 "6-dec-92" "X Version 11" +.SH NAME +hypercube - 2d projection of a 4d object +.SH SYNOPSIS +.B hypercube +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-color[0-7] \fIcolor\fP] [\-xy \fIfloat\fP] [\-xz \fIfloat\fP] [\-yz \fIfloat\fP] [\-xw \fIfloat\fP] [\-yw \fIfloat\fP] [\-zw \fIfloat\fP] [\-observer-z \fIint\fP] [\-delay \fIusecs\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] +.SH DESCRIPTION +The \fIhypercube\fP program displays a wireframe projection of a hypercube +which is rotating at user-specified rates around any or all of its four axes. +.SH OPTIONS +.I hypercube +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 \-delay \fImicroseconds\fP +How much of a delay should be introduced between steps of the animation. +Default 100000, or about 1/10th second. +.TP 8 +.B \-observer-z \fIint\fP +How far away the observer is from the center of the cube (the cube is one +unit per side.) Default 5. +.TP 8 +.B \-color0 \fIcolor\fP +.TP 8 +.B \-color1 \fIcolor\fP +.TP 8 +.B \-color2 \fIcolor\fP +.TP 8 +.B \-color3 \fIcolor\fP +.TP 8 +.B \-color4 \fIcolor\fP +.TP 8 +.B \-color5 \fIcolor\fP +.TP 8 +.B \-color6 \fIcolor\fP +.TP 8 +.B \-color7 \fIcolor\fP +The colors used to draw the line segments bordering the eight faces of +the cube. Some of the faces have only two of their border-lines drawn in +the specified color, and some have all four. +.TP 8 +.B \-xw \fIfloat\fP +.TP 8 +.B \-xy \fIfloat\fP +.TP 8 +.B \-xz \fIfloat\fP +.TP 8 +.B \-yw \fIfloat\fP +.TP 8 +.B \-yz \fIfloat\fP +.TP 8 +.B \-zw \fIfloat\fP +The amount that the cube should be rotated around the specified axis at +each frame of the animation, expressed in radians. These should be small +floating-point values (less than 0.05 works best.) Default: xy=0.01, +xz=0.005, yw=0.01. +.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 1992 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 , 6-dec-92. diff --git a/hacks/ifs.c b/hacks/ifs.c new file mode 100644 index 00000000..7e55af51 --- /dev/null +++ b/hacks/ifs.c @@ -0,0 +1,478 @@ +/* -*- Mode: C; tab-width: 4 -*- + * ifs --- Modified iterated functions system. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)ifs.c 4.02 97/04/01 xlockmore"; +#endif + +/* Copyright (c) 1997 by Massimino Pascal (Pascal.Massimon@ens.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: jwz@netscape.com: turned into a standalone program. + * Made it render into an offscreen bitmap and then copy + * that onto the screen, to reduce flicker. + */ + +#ifdef STANDALONE +# define PROGCLASS "IFS" +# define HACK_INIT init_ifs +# define HACK_DRAW draw_ifs +# define ifs_opts xlockmore_opts +# define DEFAULTS "*delay: 20000 \n" \ + "*ncolors: 100 \n" +# define SMOOTH_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt ifs_opts = { + 0, NULL, 0, NULL, NULL }; + +/*****************************************************/ +/*****************************************************/ + +typedef float DBL; +typedef short int F_PT; + +/* typedef float F_PT; */ + +/*****************************************************/ + +#define FIX 12 +#define UNIT ( 1<c_x = Gauss_Rand(0.0, .8, 4.0); + Cur->c_y = Gauss_Rand(0.0, .8, 4.0); + Cur->r = Gauss_Rand(F->r_mean, F->dr_mean, 3.0); + Cur->r2 = Half_Gauss_Rand(0.0, F->dr2_mean, 2.0); + Cur->A = Gauss_Rand(0.0, 360.0, 4.0) * (M_PI / 180.0); + Cur->A2 = Gauss_Rand(0.0, 360.0, 4.0) * (M_PI / 180.0); + Cur++; + } +} + +/***************************************************************/ + +void +init_ifs(ModeInfo * mi) +{ + int i; + FRACTAL *Fractal; + + if (Root == NULL) { + Root = (FRACTAL *) calloc( + MI_NUM_SCREENS(mi), sizeof (FRACTAL)); + if (Root == NULL) + return; + } + Fractal = &Root[MI_SCREEN(mi)]; + + if (Fractal->Max_Pt) { + free(Fractal->Buffer1); + free(Fractal->Buffer2); + } + i = (NRAND(4)) + 2; /* Number of centers */ + switch (i) { + case 3: + Fractal->Depth = MAX_DEPTH_3; + Fractal->r_mean = .6; + Fractal->dr_mean = .4; + Fractal->dr2_mean = .3; + break; + + case 4: + Fractal->Depth = MAX_DEPTH_4; + Fractal->r_mean = .5; + Fractal->dr_mean = .4; + Fractal->dr2_mean = .3; + break; + + case 5: + Fractal->Depth = MAX_DEPTH_5; + Fractal->r_mean = .5; + Fractal->dr_mean = .4; + Fractal->dr2_mean = .3; + break; + + default: + case 2: + Fractal->Depth = MAX_DEPTH_2; + Fractal->r_mean = .7; + Fractal->dr_mean = .3; + Fractal->dr2_mean = .4; + break; + } + /* (void) fprintf( stderr, "N=%d\n", i ); */ + Fractal->Nb_Simi = i; + Fractal->Max_Pt = Fractal->Nb_Simi - 1; + for (i = 0; i <= Fractal->Depth + 2; ++i) + Fractal->Max_Pt *= Fractal->Nb_Simi; + + Fractal->Buffer1 = (XPoint *) calloc(Fractal->Max_Pt, sizeof (XPoint)); + if (Fractal->Buffer1 == NULL) + goto Abort; + Fractal->Buffer2 = (XPoint *) calloc(Fractal->Max_Pt, sizeof (XPoint)); + if (Fractal->Buffer2 == NULL) + goto Abort; + + Fractal->Speed = 6; + Fractal->Width = MI_WIN_WIDTH(mi); + Fractal->Height = MI_WIN_HEIGHT(mi); + Fractal->Cur_Pt = 0; + Fractal->Count = 0; + Fractal->Lx = (Fractal->Width - 1) / 2; + Fractal->Ly = (Fractal->Height - 1) / 2; + Fractal->Col = NRAND(MI_NPIXELS(mi) - 1) + 1; + + Random_Simis(Fractal, Fractal->Components, 5 * MAX_SIMI); + + Fractal->dbuf = XCreatePixmap(MI_DISPLAY(mi), MI_WINDOW(mi), + Fractal->Width, Fractal->Height, 1); + if (Fractal->dbuf) + { + XGCValues gcv; + gcv.foreground = 0; + gcv.background = 0; + gcv.function = GXcopy; + Fractal->dbuf_gc = XCreateGC(MI_DISPLAY(mi), Fractal->dbuf, + GCForeground|GCBackground|GCFunction, + &gcv); + XFillRectangle(MI_DISPLAY(mi), Fractal->dbuf, + Fractal->dbuf_gc, 0,0, Fractal->Width, Fractal->Height); + + XSetBackground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi)); + XSetFunction(MI_DISPLAY(mi), MI_GC(mi), GXcopy); + } + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + return; + + Abort: + if (Fractal->Buffer1 != NULL) + free(Fractal->Buffer1); + if (Fractal->Buffer2 != NULL) + free(Fractal->Buffer2); + Fractal->Buffer1 = NULL; + Fractal->Buffer2 = NULL; + Fractal->Max_Pt = 0; + return; +} + + +/***************************************************************/ + +#ifndef __GNUC__ +# define inline /* */ +#endif + +static inline void +Transform(SIMI * Simi, F_PT xo, F_PT yo, F_PT * x, F_PT * y) +{ + F_PT xx, yy; + + xo = xo - Simi->Cx; + xo = (xo * Simi->R) / UNIT; + yo = yo - Simi->Cy; + yo = (yo * Simi->R) / UNIT; + + xx = xo - Simi->Cx; + xx = (xx * Simi->R2) / UNIT; + yy = -yo - Simi->Cy; + yy = (yy * Simi->R2) / UNIT; + + *x = ((xo * Simi->Ct - yo * Simi->St + xx * Simi->Ct2 - yy * Simi->St2) / UNIT) + Simi->Cx; + *y = ((xo * Simi->St + yo * Simi->Ct + xx * Simi->St2 + yy * Simi->Ct2) / UNIT) + Simi->Cy; +} + +/***************************************************************/ + +static void +Trace(F_PT xo, F_PT yo) +{ + F_PT x, y, i; + SIMI *Cur; + + Cur = Cur_F->Components; + for (i = Cur_F->Nb_Simi; i; --i, Cur++) { + Transform(Cur, xo, yo, &x, &y); + Buf->x = Lx + (x * Lx / (UNIT * 2)); + Buf->y = Ly - (y * Ly / (UNIT * 2)); + Buf++; + Cur_Pt++; + + if (D && ((x - xo) >> 4) && ((y - yo) >> 4)) { + D--; + Trace(x, y); + D++; + } + } +} + +static void +Draw_Fractal(FRACTAL * F) +{ + int i, j; + F_PT x, y, xo, yo; + SIMI *Cur, *Simi; + + for (Cur = F->Components, i = F->Nb_Simi; i; --i, Cur++) { + Cur->Cx = DBL_To_F_PT(Cur->c_x); + Cur->Cy = DBL_To_F_PT(Cur->c_y); + + Cur->Ct = DBL_To_F_PT(cos(Cur->A)); + Cur->St = DBL_To_F_PT(sin(Cur->A)); + Cur->Ct2 = DBL_To_F_PT(cos(Cur->A2)); + Cur->St2 = DBL_To_F_PT(sin(Cur->A2)); + + Cur->R = DBL_To_F_PT(Cur->r); + Cur->R2 = DBL_To_F_PT(Cur->r2); + } + + + Cur_Pt = 0; + Cur_F = F; + Buf = F->Buffer2; + Lx = F->Lx; + Ly = F->Ly; + D = F->Depth; + for (Cur = F->Components, i = F->Nb_Simi; i; --i, Cur++) { + xo = Cur->Cx; + yo = Cur->Cy; + for (Simi = F->Components, j = F->Nb_Simi; j; --j, Simi++) { + if (Simi == Cur) + continue; + Transform(Simi, xo, yo, &x, &y); + Trace(x, y); + } + } + + /* Erase previous */ + + if (F->Cur_Pt) { + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(The_MI)); + if (F->dbuf) /* jwz */ + { + XSetForeground(display, F->dbuf_gc, 0); +/* XDrawPoints(display, F->dbuf, F->dbuf_gc, F->Buffer1, F->Cur_Pt, + CoordModeOrigin); */ + XFillRectangle(display, F->dbuf, F->dbuf_gc, 0, 0, + F->Width, F->Height); + } + else + XDrawPoints(display, window, gc, F->Buffer1, F->Cur_Pt, + CoordModeOrigin); + } + if (Max_Colors < 2) + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(The_MI)); + else + XSetForeground(display, gc, MI_PIXEL(The_MI, F->Col % Max_Colors)); + if (Cur_Pt) { + if (F->dbuf) + { + XSetForeground(display, F->dbuf_gc, 1); + XDrawPoints(display, F->dbuf, F->dbuf_gc, F->Buffer2, Cur_Pt, + CoordModeOrigin); + } + else + XDrawPoints(display, window, gc, F->Buffer2, Cur_Pt, CoordModeOrigin); + } + + if (F->dbuf) + XCopyPlane(display, F->dbuf, window, gc, 0,0,F->Width,F->Height,0,0, 1); + + F->Cur_Pt = Cur_Pt; + Buf = F->Buffer1; + F->Buffer1 = F->Buffer2; + F->Buffer2 = Buf; +} + + +void +draw_ifs(ModeInfo * mi) +{ + int i; + FRACTAL *F; + DBL u, uu, v, vv, u0, u1, u2, u3; + SIMI *S, *S1, *S2, *S3, *S4; + + The_MI = mi; + display = MI_DISPLAY(mi); + window = MI_WINDOW(mi); + gc = MI_GC(mi); + Max_Colors = MI_NPIXELS(mi); + + F = &Root[MI_SCREEN(mi)]; + + u = (DBL) (F->Count) * (DBL) (F->Speed) / 1000.0; + uu = u * u; + v = 1.0 - u; + vv = v * v; + u0 = vv * v; + u1 = 3.0 * vv * u; + u2 = 3.0 * v * uu; + u3 = u * uu; + + S = F->Components; + S1 = S + F->Nb_Simi; + S2 = S1 + F->Nb_Simi; + S3 = S2 + F->Nb_Simi; + S4 = S3 + F->Nb_Simi; + + for (i = F->Nb_Simi; i; --i, S++, S1++, S2++, S3++, S4++) { + S->c_x = u0 * S1->c_x + u1 * S2->c_x + u2 * S3->c_x + u3 * S4->c_x; + S->c_y = u0 * S1->c_y + u1 * S2->c_y + u2 * S3->c_y + u3 * S4->c_y; + S->r = u0 * S1->r + u1 * S2->r + u2 * S3->r + u3 * S4->r; + S->r2 = u0 * S1->r2 + u1 * S2->r2 + u2 * S3->r2 + u3 * S4->r2; + S->A = u0 * S1->A + u1 * S2->A + u2 * S3->A + u3 * S4->A; + S->A2 = u0 * S1->A2 + u1 * S2->A2 + u2 * S3->A2 + u3 * S4->A2; + } + + Draw_Fractal(F); + + if (F->Count >= 1000 / F->Speed) { + S = F->Components; + S1 = S + F->Nb_Simi; + S2 = S1 + F->Nb_Simi; + S3 = S2 + F->Nb_Simi; + S4 = S3 + F->Nb_Simi; + + for (i = F->Nb_Simi; i; --i, S++, S1++, S2++, S3++, S4++) { + S2->c_x = 2.0 * S4->c_x - S3->c_x; + S2->c_y = 2.0 * S4->c_y - S3->c_y; + S2->r = 2.0 * S4->r - S3->r; + S2->r2 = 2.0 * S4->r2 - S3->r2; + S2->A = 2.0 * S4->A - S3->A; + S2->A2 = 2.0 * S4->A2 - S3->A2; + + *S1 = *S4; + } + Random_Simis(F, F->Components + 3 * F->Nb_Simi, F->Nb_Simi); + + Random_Simis(F, F->Components + 4 * F->Nb_Simi, F->Nb_Simi); + + F->Count = 0; + } else + F->Count++; + + F->Col++; +} + + +/***************************************************************/ + +void +release_ifs(ModeInfo * mi) +{ + int i; + + if (Root == NULL) + return; + + for (i = 0; i < MI_NUM_SCREENS(mi); ++i) { + if (Root[i].Buffer1 != NULL) + free(Root[i].Buffer1); + if (Root[i].Buffer2 != NULL) + free(Root[i].Buffer2); + if (Root[i].dbuf) + XFreePixmap(MI_DISPLAY(mi), Root[i].dbuf); + if (Root[i].dbuf_gc) + XFreeGC(MI_DISPLAY(mi), Root[i].dbuf_gc); + } + free(Root); + Root = NULL; +} diff --git a/hacks/ifs.man b/hacks/ifs.man new file mode 100644 index 00000000..39e12d15 --- /dev/null +++ b/hacks/ifs.man @@ -0,0 +1,59 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +ifs - draws spinning, colliding iterated-function-system images +.SH SYNOPSIS +.B ifs +[\-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 \fIifs\fP program draws spinning, colliding iterated-function-system images. +.SH OPTIONS +.I ifs +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 used cycle through the hue, making N stops around +the color wheel. +.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 Massimino Pascal. + +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 +Massimino Pascal , 1997. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/imsmap.c b/hacks/imsmap.c new file mode 100644 index 00000000..54e8a774 --- /dev/null +++ b/hacks/imsmap.c @@ -0,0 +1,502 @@ +/* imsmap, Copyright (c) 1992 Juergen Nickelsen + * Derived from code by Markus Schirmer, TU Berlin. + * + * 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. + * + * Revision History: + * 24-aug-92: jwz: hacked. + * 17-May-97: jwz: hacked more. + */ + +#include +#include +#include /* for gettimeofday() */ + +#include +#include + +#include "screenhack.h" + +#define NSTEPS 7 +#define COUNT (1 << NSTEPS) +#define CELL(c, r) cell[((unsigned int)(c)) + ((unsigned int) (r)) * xmax] + +static enum mode_t { MODE_H, MODE_S, MODE_V, MODE_RANDOM } mode; + +static GC gc, gc2; +static XWindowAttributes xgwa; + +#if defined(sun) && !__STDC__ /* sun cc doesn't know "signed char" */ +#define signed /**/ +#endif + +static Colormap cmap; +static int ncolors; +static XColor *colors; +static Bool cycle_p; +static int cycle_direction; +static Bool extra_krinkly_p; + +static int delay, cycle_delay; +static signed char *cell = NULL; +static int xmax, ymax; +static int iterations; + +static void +init_map (Display *dpy, Window window) +{ + unsigned long fg_pixel = 0, bg_pixel = 0; + int fg_h, bg_h; + double fg_s, fg_v, bg_s, bg_v; + + enum mode_t this_mode; + static Bool rv_p; + + XGCValues gcv; + + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + + if (!ncolors) + { + char *mode_str = get_string_resource ("mode", "Mode"); + rv_p = get_boolean_resource ("reverseVideo", "ReverseVideo"); + cycle_p = get_boolean_resource ("cycle", "Cycle"); + ncolors = get_integer_resource ("ncolors", "Integer"); + delay = get_integer_resource ("delay", "Integer"); + cycle_delay = get_integer_resource ("cycleDelay", "Integer"); + iterations = get_integer_resource ("iterations", "Integer"); + if (iterations < 0) iterations = 0; + else if (iterations > 7) iterations = 7; + + if (ncolors <= 2) ncolors = 0; + if (ncolors == 0) mono_p = True; + + fg_pixel = get_pixel_resource ("background", "Background", dpy, cmap); + bg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + + if (fg_pixel == bg_pixel) + { + XColor black, white; + black.red = black.green = black.blue = 0; + white.red = white.green = white.blue = 0xFFFF; + black.flags = white.flags = DoRed|DoGreen|DoBlue; + XAllocColor(dpy, cmap, &black); + XAllocColor(dpy, cmap, &white); + if (bg_pixel == black.pixel) + fg_pixel = white.pixel; + else + fg_pixel = black.pixel; + } + + if (mono_p) cycle_p = False; + + gcv.foreground = fg_pixel; + gcv.background = bg_pixel; + gc = XCreateGC (dpy, window, GCForeground|GCBackground, &gcv); + gcv.foreground = bg_pixel; + gc2 = XCreateGC (dpy, window, GCForeground, &gcv); + + if (!mode_str || !strcmp (mode_str, "random")) + mode = MODE_RANDOM; + else if (!strcmp (mode_str, "h") || !strcmp (mode_str, "hue")) + mode = MODE_H; + else if (!strcmp (mode_str, "s") || !strcmp (mode_str, "saturation")) + mode = MODE_S; + else if (!strcmp (mode_str, "v") || !strcmp (mode_str, "value")) + mode = MODE_V; + else + { + fprintf (stderr, + "%s: mode must be hue, saturation, value, or random, not \"%s\"\n", + progname, mode_str); + mode = MODE_RANDOM; + } + } + + this_mode = mode; + if (!mono_p && mode == MODE_RANDOM) + switch (random () % 6) { + case 0: this_mode = MODE_H; break; + case 1: this_mode = MODE_S; break; + case 2: this_mode = MODE_V; break; + default: break; + } + + if (mono_p) + extra_krinkly_p = !(random() % 15); + else + extra_krinkly_p = !(random() % 5); + + if (!mono_p) + { + double distance, fg_H, bg_H, dh; + + RETRY: + fg_h = random() % 360; + fg_s = frand(1.0); + fg_v = frand(1.0); + + bg_h = fg_h; + bg_s = fg_s; + bg_v = fg_v; + + switch (this_mode) + { + case MODE_H: + bg_h = random() % 360; + if (fg_v < 0.4) + goto RETRY; + distance = fg_h - bg_h; + if (distance < 0) + distance = -distance; + if (distance > 360) + distance = 180 - (distance - 180); + if (distance < 30) + goto RETRY; + break; + + case MODE_S: + bg_s = frand(1.0); + if (fg_v < 0.4) + goto RETRY; + distance = fg_s - bg_s; + if (distance < 0) + distance = -distance; + if (distance < 0.2) + goto RETRY; + break; + + case MODE_V: + bg_v = frand(1.0); + distance = fg_v - bg_v; + if (distance < 0) + distance = -distance; + if (distance < 0.4) + goto RETRY; + break; + + default: + bg_h = random() % 360; + bg_s = frand(1.0); + bg_v = frand(1.0); + + fg_H = ((double) fg_h) / 360; + bg_H = ((double) bg_h) / 360; + dh = fg_H - bg_H; + if (dh < 0) dh = -dh; + if (dh > 0.5) dh = 0.5 - (dh - 0.5); + distance = sqrt ((dh * dh) + + ((fg_s - bg_s) * (fg_s - bg_s)) + + ((fg_v - bg_v) * (fg_v - bg_v))); + if (distance < 0.2) + goto RETRY; + } + + cycle_p = True; + if (colors) + free_colors (dpy, cmap, colors, ncolors); + else + colors = (XColor *) malloc (ncolors * sizeof(*colors)); + + cycle_direction = (random() & 1 ? 1 : -1); + + RETRY_NON_WRITABLE: + { + int n = ncolors; + make_color_ramp (dpy, cmap, + fg_h, fg_s, fg_v, + bg_h, bg_s, bg_v, + colors, &n, + True, True, cycle_p); + if (n == 0 && cycle_p) + { + cycle_p = False; + goto RETRY_NON_WRITABLE; + } + ncolors = n; + } + + if (ncolors <= 0) + mono_p = 1; + } + + if (mono_p) + { + static Bool done = False; + static XColor c[50]; + colors = c; + cycle_p = False; + ncolors = sizeof(c)/sizeof(*c); + if (!done) + { + int i; + done = True; + colors[0].pixel = fg_pixel; + for (i = 1; i < ncolors; i++) + colors[i].pixel = bg_pixel; + } + } + + XSetForeground (dpy, gc, colors[1].pixel); + XFillRectangle (dpy, window, gc, 0, 0, xgwa.width, xgwa.height); +} + + +#define HEIGHT_TO_PIXEL(height) \ + ((height) < 0 \ + ? (extra_krinkly_p \ + ? ncolors - ((-(height)) % ncolors) \ + : 0) \ + : ((height) >= ncolors \ + ? (extra_krinkly_p \ + ? (height) % ncolors \ + : ncolors-1) \ + : (height))) + + +static unsigned int +set (unsigned int l, + unsigned int c, + unsigned int size, + int height) +{ + int rang = 1 << (NSTEPS - size); + height = height + (random () % rang) - rang / 2; + height = HEIGHT_TO_PIXEL(height); + CELL (l, c) = height; + return colors[height].pixel; +} + +static void +floyd_steinberg (Display *dpy, Window window) +{ + int x, y, err; + + /* Instead of repeatedly calling XPutPixel(), we make an Image and then + send its bits over all at once. This consumes much less network + bandwidth. The image we create is Wx1 intead of WxH, so that we + don't use enormous amounts of memory. + */ + XImage *image = + XCreateImage (dpy, xgwa.visual, + 1, XYBitmap, 0, /* depth, format, offset */ + (char *) calloc ((xmax + 8) / 8, 1), /* data */ + xmax, 1, 8, 0); /* w, h, pad, bpl */ + + XSetForeground (dpy, gc, colors[0].pixel); + XSetBackground (dpy, gc, colors[1].pixel); + + for (y = 0; y < ymax - 1; y++) + { + for (x = 0; x < xmax - 1; x++) + { + if (CELL(x, y) < 0) + { + err = CELL (x, y); + XPutPixel (image, x, 0, 1); + } + else + { + err = CELL (x, y) - 1; + XPutPixel (image, x, 0, 0); + } + /* distribute error */ + CELL (x, y+1) += (int) (((float) err) * 3.0/8.0); + CELL (x+1, y) += (int) (((float) err) * 3.0/8.0); + CELL (x+1, y+1) += (int) (((float) err) * 1.0/4.0); + } + XPutImage (dpy, window, gc, image, 0, 0, 0, y, xmax, 1); + } + XDestroyImage (image); +} + +static void +draw (Display *dpy, Window window, + int x, int y, unsigned long pixel, int grid_size) +{ + static unsigned int last_pixel, last_valid = 0; + if (! (last_valid && pixel == last_pixel)) + XSetForeground (dpy, gc, pixel); + last_valid = 1, last_pixel = pixel; + if (grid_size == 1) + XDrawPoint (dpy, window, gc, x, y); + else + XFillRectangle (dpy, window, gc, x, y, grid_size, grid_size); +} + + +static void +draw_map (Display *dpy, Window window) +{ + int xstep, ystep, xnextStep, ynextStep; + int x, y, i, x1, x2, y1, y2; + unsigned int pixel, qpixels [4]; + + int backwards = random() & 1; + + xmax = xgwa.width; + ymax = xgwa.height; + + cell = (signed char *) calloc (xmax * ymax, 1); + if (cell == NULL) + exit (1); + + CELL (0, 0) = 0; + xstep = (backwards ? -COUNT : COUNT); + ystep = COUNT; + for (i = 0; i < iterations; i++) + { + xnextStep = xstep / 2; + ynextStep = ystep / 2; + for (x = (backwards ? xmax-1 : 0); + (backwards ? x >= 0 : x < xmax); + x += xstep) + { + x1 = x + xnextStep; + if (x1 < 0) + x1 = xmax-1; + else if (x1 >= xmax) + x1 = 0; + + x2 = x + xstep; + if (x2 < 0) + x2 = xmax-1; + else if (x2 >= xmax) + x2 = 0; + + for (y = 0; y < ymax; y += ystep) + { + y1 = y + ynextStep; + if (y1 < 0) + y1 = ymax-1; + else if (y1 >= ymax) + y1 = 0; + + y2 = y + ystep; + if (y2 < 0) + y2 = ymax-1; + else if (y2 >= ymax) + y2 = 0; + + qpixels [0] = colors [HEIGHT_TO_PIXEL (CELL (x, y))].pixel; + qpixels [1] = colors [HEIGHT_TO_PIXEL (CELL (x, y2))].pixel; + qpixels [2] = colors [HEIGHT_TO_PIXEL (CELL (x2, y))].pixel; + qpixels [3] = colors [HEIGHT_TO_PIXEL (CELL (x2, y2))].pixel; + + pixel = set (x, y1, i, + ((int) CELL (x, y) + (int) CELL (x, y2) + 1) / 2); + if (! mono_p && + (pixel != qpixels[0] || pixel != qpixels[1] || + pixel != qpixels[2] || pixel != qpixels[3])) + draw (dpy, window, x, y1, pixel, ynextStep); + + pixel = set (x1, y, i, + ((int) CELL (x, y) + (int) CELL (x2, y) + 1) / 2); + if (! mono_p && + (pixel != qpixels[0] || pixel != qpixels[1] || + pixel != qpixels[2] || pixel != qpixels[3])) + draw (dpy, window, x1, y, pixel, ynextStep); + + pixel = set (x1, y1, i, + ((int) CELL (x, y) + (int) CELL (x, y2) + + (int) CELL (x2, y) + (int) CELL (x2, y2) + 2) + / 4); + if (! mono_p && + (pixel != qpixels[0] || pixel != qpixels[1] || + pixel != qpixels[2] || pixel != qpixels[3])) + draw (dpy, window, x1, y1, pixel, ynextStep); + + + if (cycle_p) + { + struct timeval now; + static struct timeval then = { 0, }; + unsigned long diff; +#ifdef GETTIMEOFDAY_TWO_ARGS + struct timezone tzp; + gettimeofday(&now, &tzp); +#else + gettimeofday(&now); +#endif + diff = (((now.tv_sec - then.tv_sec) * 1000000) + + (now.tv_usec - then.tv_usec)); + if (diff > cycle_delay) + { + rotate_colors (dpy, cmap, colors, ncolors, + cycle_direction); + then = now; + } + } + } + } + xstep = xnextStep; + ystep = ynextStep; + if (!mono_p) + XSync (dpy, True); + } + if (mono_p) + /* in mono-mode, we do all the drawing at the end */ + floyd_steinberg (dpy, window); + + free (cell); + XSync (dpy, True); +} + + +char *progclass = "Imsmap"; + +char *defaults [] = { + "Imsmap.background: black", /* to placate SGI */ + "Imsmap.foreground: black", + "*mode: random", + "*ncolors: 50", + "*iterations: 7", + "*delay: 10", + "*cycleDelay: 100000", + "*cycle: true", + 0 +}; + +XrmOptionDescRec options [] = { + { "-ncolors", ".ncolors", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-cycle-delay", ".cycleDelay", XrmoptionSepArg, 0 }, + { "-mode", ".mode", XrmoptionSepArg, 0 }, + { "-iterations", ".iterations", XrmoptionSepArg, 0 }, + { "-cycle", ".cycle", XrmoptionNoArg, "True" }, + { "-no-cycle", ".cycle", XrmoptionNoArg, "False" }, + { 0, 0, 0, 0 } +}; + + +void +screenhack (Display *dpy, Window window) +{ + while (1) + { + init_map (dpy, window); + draw_map (dpy, window); + if (delay) + { + if (cycle_p) + { + time_t start = time((time_t) 0); + while (start + delay > time((time_t) 0)) + { + rotate_colors (dpy, cmap, colors, ncolors, + cycle_direction); + if (cycle_delay) usleep(cycle_delay); + } + } + else + sleep (delay); + } + } +} diff --git a/hacks/imsmap.man b/hacks/imsmap.man new file mode 100644 index 00000000..d0ea4183 --- /dev/null +++ b/hacks/imsmap.man @@ -0,0 +1,66 @@ +.TH XScreenSaver 1 "17-May-97" "X Version 11" +.SH NAME +imsmap - generate fractal maps +.SH SYNOPSIS +.B imsmap +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIint\fP] [\-delay \fIseconds\fP] [\-iterations \fIint\fP] [\-mode h|s|v|random] [\-cycle] [\-no\-cycle] +.SH DESCRIPTION +The \fIimsmap\fP program generates map or cloud-like patterns. It looks +quite different in monochrome and color. +.SH OPTIONS +.I imsmap +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 to use. Default 50. +.TP 8 +.B \-delay \fIinteger\fP +How long to delay between images. Default 10 seconds. +.TP 8 +.B \-iterations \fIinteger\fP +A measure of the resolution of the resultant image, from 0 to 7. Default 7. +.TP 8 +.B \-mode [ hue | saturation | value | random ] +The axis upon which colors should be interpolated between the foreground +and background color. Default random. +.TP 8 +.B \-cycle +.TP 8 +.B \-no\-cycle +Whether to do colormap cycling. Default is to cycle. +.TP 8 +.B \-cycle\-delay +Number of microseconds between shifts of the colormap; default 100000, +or 1/10th second. +.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 AUTHOR +Juergen Nickelsen , 23-aug-92. + +Hacked on by Jamie Zawinski , 24-aug-92, 17-May-97. diff --git a/hacks/julia.c b/hacks/julia.c new file mode 100644 index 00000000..680a5b19 --- /dev/null +++ b/hacks/julia.c @@ -0,0 +1,420 @@ +/* -*- Mode: C; tab-width: 4 -*- + * julia --- continuously varying Julia set. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)julia.c 4.03 97/04/10 xlockmore"; +#endif + +/* Copyright (c) 1995 Sean McCullough . + * + * 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: + * 28-May-97: jwz@netscape.com: added interactive frobbing with the mouse. + * 10-May-97: jwz@netscape.com: turned into a standalone program. + * 02-Dec-95: snagged boilerplate from hop.c + * used ifs {w0 = sqrt(x-c), w1 = -sqrt(x-c)} with random iteration + * to plot the julia set, and sinusoidially varied parameter for set + * and plotted parameter with a circle. + */ + +/*- + * One thing to note is that batchcount is the *depth* of the search tree, + * so the number of points computed is 2^batchcount - 1. I use 8 or 9 + * on a dx266 and it looks okay. The sinusoidal variation of the parameter + * might not be as interesting as it could, but it still gives an idea of + * the effect of the parameter. + */ + +#ifdef STANDALONE +# define PROGCLASS "Julia" +# define HACK_INIT init_julia +# define HACK_DRAW draw_julia +# define julia_opts xlockmore_opts +# define DEFAULTS "*count: 1000 \n" \ + "*cycles: 20 \n" \ + "*delay: 10000 \n" \ + "*ncolors: 200 \n" +# define UNIFORM_COLORS +# include "xlockmore.h" /* in xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* in xlockmore distribution */ +#endif /* !STANDALONE */ + + +static Bool track_p; + +#define DEF_MOUSE "False" + +static XrmOptionDescRec opts[] = +{ + {"-mouse", ".julia.mouse", XrmoptionNoArg, (caddr_t) "on"}, + {"+mouse", ".julia.mouse", XrmoptionNoArg, (caddr_t) "off"}, +}; +static argtype vars[] = +{ + {(caddr_t *) & track_p, "mouse", "Mouse", DEF_MOUSE, t_Bool}, +}; +static OptionStruct desc[] = +{ + {"-/+mouse", "turn on/off mouse tracking"}, +}; + +ModeSpecOpt julia_opts = { 2, opts, 1, vars, desc }; + + +#define numpoints ((0x2<depth)-1) + +typedef struct { + int centerx; + int centery; /* center of the screen */ + double cr; + double ci; /* julia params */ + int depth; + int inc; + int circsize; + int erase; + int pix; + long itree; + int buffer; + int nbuffers; + int redrawing, redrawpos; + Pixmap pixmap; + Cursor cursor; + GC stippledGC; + XPoint **pointBuffer; /* pointer for XDrawPoints */ + +} juliastruct; + +static juliastruct *julias = NULL; + +/* How many segments to draw per cycle when redrawing */ +#define REDRAWSTEP 3 + +static void +apply(juliastruct * jp, register double xr, register double xi, int d) +{ + double theta, r; + + jp->pointBuffer[jp->buffer][jp->itree].x = + (int) (0.5 * xr * jp->centerx + jp->centerx); + jp->pointBuffer[jp->buffer][jp->itree].y = + (int) (0.5 * xi * jp->centery + jp->centery); + jp->itree++; + + if (d > 0) { + xi -= jp->ci; + xr -= jp->cr; + +/* Avoid atan2: DOMAIN error message */ + if (xi == 0.0 && xr == 0.0) + theta = 0.0; + else + theta = atan2(xi, xr) / 2.0; + + /*r = pow(xi * xi + xr * xr, 0.25); */ + r = sqrt(sqrt(xi * xi + xr * xr)); /* 3 times faster */ + + xr = r * cos(theta); + xi = r * sin(theta); + + d--; + apply(jp, xr, xi, d); + apply(jp, -xr, -xi, d); + } +} + +static void +incr(ModeInfo * mi, juliastruct * jp) +{ + int cx, cy; + + if (track_p) + { + Window r, c; + int rx, ry; + unsigned int m; + XQueryPointer(MI_DISPLAY(mi), MI_WINDOW(mi), + &r, &c, &rx, &ry, &cx, &cy, &m); + if (cx <= 0 || cy <= 0 || + cx >= MI_WIN_WIDTH(mi) || cy >= MI_WIN_HEIGHT(mi)) + goto NOTRACK; + } + + if (track_p) + { + jp->cr = ((double) (cx + 2 - jp->centerx)) * 2 / jp->centerx; + jp->ci = ((double) (cy + 2 - jp->centery)) * 2 / jp->centery; + } + else + { + NOTRACK: + jp->cr = 1.5 * (sin(M_PI * (jp->inc / 300.0)) * + sin(jp->inc * M_PI / 200.0)); + jp->ci = 1.5 * (cos(M_PI * (jp->inc / 300.0)) * + cos(jp->inc * M_PI / 200.0)); + + jp->cr += 0.5 * cos(M_PI * jp->inc / 400.0); + jp->ci += 0.5 * sin(M_PI * jp->inc / 400.0); + } +} + +void +init_julia(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + juliastruct *jp; + XGCValues gcv; + int i; + + if (julias == NULL) { + if ((julias = (juliastruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (juliastruct))) == NULL) + return; + } + jp = &julias[MI_SCREEN(mi)]; + + jp->centerx = MI_WIN_WIDTH(mi) / 2; + jp->centery = MI_WIN_HEIGHT(mi) / 2; + + jp->depth = MI_BATCHCOUNT(mi); + if (jp->depth > 10) + jp->depth = 10; + + + if (track_p && !jp->cursor) + { + Pixmap bit; + XColor black; + black.red = black.green = black.blue = 0; + black.flags = DoRed|DoGreen|DoBlue; + bit = XCreatePixmapFromBitmapData (display, window, "\000", 1, 1, + MI_WIN_BLACK_PIXEL(mi), + MI_WIN_BLACK_PIXEL(mi), 1); + jp->cursor = XCreatePixmapCursor (display, bit, bit, &black, &black, + 0, 0); + XFreePixmap (display, bit); + } + + if (jp->pixmap != None && + jp->circsize != (MIN(jp->centerx, jp->centery) / 60) * 2 + 1) { + XFreePixmap(display, jp->pixmap); + jp->pixmap = None; + } + if (jp->pixmap == None) { + GC fg_gc = None, bg_gc = None; + + jp->circsize = (MIN(jp->centerx, jp->centery) / 96) * 2 + 1; + jp->pixmap = XCreatePixmap(display, window, jp->circsize, jp->circsize, 1); + gcv.foreground = 1; + fg_gc = XCreateGC(display, jp->pixmap, GCForeground, &gcv); + gcv.foreground = 0; + bg_gc = XCreateGC(display, jp->pixmap, GCForeground, &gcv); + XFillRectangle(display, jp->pixmap, bg_gc, + 0, 0, jp->circsize, jp->circsize); + if (jp->circsize < 2) + XDrawPoint(display, jp->pixmap, fg_gc, 0, 0); + else + XFillArc(display, jp->pixmap, fg_gc, + 0, 0, jp->circsize, jp->circsize, 0, 23040); + if (fg_gc != None) + XFreeGC(display, fg_gc); + if (bg_gc != None) + XFreeGC(display, bg_gc); + } + + if (MI_WIN_IS_INROOT(mi)) + ; + else if (jp->circsize > 0) + XDefineCursor (display, window, jp->cursor); + else + XUndefineCursor (display, window); + + if (!jp->stippledGC) { + gcv.foreground = MI_WIN_BLACK_PIXEL(mi); + gcv.background = MI_WIN_BLACK_PIXEL(mi); + if ((jp->stippledGC = XCreateGC(display, window, + GCForeground | GCBackground, &gcv)) == None) + return; + } + if (MI_NPIXELS(mi) > 2) + jp->pix = NRAND(MI_NPIXELS(mi)); + jp->inc = ((LRAND() & 1) * 2 - 1) * NRAND(200); + jp->nbuffers = (MI_CYCLES(mi) + 1); + if (!jp->pointBuffer) + jp->pointBuffer = (XPoint **) calloc(jp->nbuffers, sizeof (XPoint *)); + for (i = 0; i < jp->nbuffers; ++i) + if (jp->pointBuffer[i]) + (void) memset((char *) jp->pointBuffer[i], 0, + numpoints * sizeof (XPoint)); + else + jp->pointBuffer[i] = (XPoint *) calloc(numpoints, sizeof (XPoint)); + jp->buffer = 0; + jp->redrawing = 0; + jp->erase = 0; + XClearWindow(display, window); +} + + +/* hack: moved here by jwz. */ +#define ERASE_IMAGE(d,w,g,x,y,xl,yl,xs,ys) \ +if (yly) \ +(y>yl-ys)?XFillRectangle(d,w,g,xl,y+ys,xs,yl-y): \ +XFillRectangle(d,w,g,xl,yl,xs,ys); \ +if (xlx) \ +(x>xl-xs)?XFillRectangle(d,w,g,x+xs,yl,xl-x,ys): \ +XFillRectangle(d,w,g,xl,yl,xs,ys) + + +void +draw_julia(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + juliastruct *jp = &julias[MI_SCREEN(mi)]; + double r, theta; + register double xr = 0.0, xi = 0.0; + int k = 64, rnd = 0, i, j; + XPoint *xp = jp->pointBuffer[jp->buffer], old_circle, new_circle; + + old_circle.x = (int) (jp->centerx * jp->cr / 2) + jp->centerx - 2; + old_circle.y = (int) (jp->centery * jp->ci / 2) + jp->centery - 2; + incr(mi, jp); + new_circle.x = (int) (jp->centerx * jp->cr / 2) + jp->centerx - 2; + new_circle.y = (int) (jp->centery * jp->ci / 2) + jp->centery - 2; + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + ERASE_IMAGE(display, window, gc, new_circle.x, new_circle.y, + old_circle.x, old_circle.y, jp->circsize, jp->circsize); + /* draw a circle at the c-parameter so you can see it's effect on the + structure of the julia set */ + XSetTSOrigin(display, jp->stippledGC, new_circle.x, new_circle.y); + XSetForeground(display, jp->stippledGC, MI_WIN_WHITE_PIXEL(mi)); + XSetStipple(display, jp->stippledGC, jp->pixmap); + XSetFillStyle(display, jp->stippledGC, FillOpaqueStippled); + XFillRectangle(display, window, jp->stippledGC, new_circle.x, new_circle.y, + jp->circsize, jp->circsize); + XFlush(display); + if (jp->erase == 1) { + XDrawPoints(display, window, gc, + jp->pointBuffer[jp->buffer], numpoints, CoordModeOrigin); + } + jp->inc++; + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, jp->pix)); + if (++jp->pix >= MI_NPIXELS(mi)) + jp->pix = 0; + } else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + while (k--) { + + /* save calls to LRAND by using bit shifts over and over on the same + int for 32 iterations, then get a new random int */ + if (!(k % 32)) + rnd = LRAND(); + + /* complex sqrt: x^0.5 = radius^0.5*(cos(theta/2) + i*sin(theta/2)) */ + + xi -= jp->ci; + xr -= jp->cr; + + /* Avoid atan2: DOMAIN error message */ + if (xi == 0.0 && xr == 0.0) + theta = 0.0; + else + theta = atan2(xi, xr) / 2.0; + + /*r = pow(xi * xi + xr * xr, 0.25); */ + r = sqrt(sqrt(xi * xi + xr * xr)); /* 3 times faster */ + + xr = r * cos(theta); + xi = r * sin(theta); + + if ((rnd >> (k % 32)) & 0x1) { + xi = -xi; + xr = -xr; + } + xp->x = jp->centerx + (int) ((jp->centerx >> 1) * xr); + xp->y = jp->centery + (int) ((jp->centery >> 1) * xi); + xp++; + } + + jp->itree = 0; + apply(jp, xr, xi, jp->depth); + + XDrawPoints(display, window, gc, + jp->pointBuffer[jp->buffer], numpoints, CoordModeOrigin); + + jp->buffer++; + if (jp->buffer > jp->nbuffers - 1) { + jp->buffer -= jp->nbuffers; + jp->erase = 1; + } + if (jp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + j = (jp->buffer - jp->redrawpos + jp->nbuffers) % jp->nbuffers; + XDrawPoints(display, window, gc, + jp->pointBuffer[j], numpoints, CoordModeOrigin); + + if (++(jp->redrawpos) >= jp->nbuffers) { + jp->redrawing = 0; + break; + } + } + } +} + +void +release_julia(ModeInfo * mi) +{ + if (julias != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + Display *display = MI_DISPLAY(mi); + juliastruct *jp = &julias[screen]; + int buffer; + + if (jp->pointBuffer) { + for (buffer = 0; buffer < jp->nbuffers; buffer++) + if (jp->pointBuffer[buffer]) + (void) free((void *) jp->pointBuffer[buffer]); + (void) free((void *) jp->pointBuffer); + } + if (jp->stippledGC != None) + XFreeGC(display, jp->stippledGC); + if (jp->pixmap != None) + XFreePixmap(display, jp->pixmap); + if (jp->cursor) + XFreeCursor (display, jp->cursor); + } + (void) free((void *) julias); + julias = NULL; + } +} + +void +refresh_julia(ModeInfo * mi) +{ + juliastruct *jp = &julias[MI_SCREEN(mi)]; + + jp->redrawing = 1; + jp->redrawpos = 0; +} diff --git a/hacks/julia.man b/hacks/julia.man new file mode 100644 index 00000000..8b40e487 --- /dev/null +++ b/hacks/julia.man @@ -0,0 +1,83 @@ +.TH XScreenSaver 1 "28-May-97" "X Version 11" +.SH NAME +julia - draws spinning, animating julia-set fractals +.SH SYNOPSIS +.B julia +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-mouse] [\-nomouse] + +.SH DESCRIPTION +The \fIjulia\fP program draws spinning, animating julia-set fractals. + +It uses ifs {w0 = sqrt(x-c), w1 = -sqrt(x-c)} with random iteration +to plot the julia set, and sinusoidially varied parameters for the set, +and plots parameters with a circle. + +One thing to note is that count is the \fIdepth\fP of the search tree, +so the number of points computed is (2^count)-1. I use 8 or 9 on a +dx266 and it looks okay. The sinusoidal variation of the parameter +might not be as interesting as it could, but it still gives an idea +of the effect of the parameter. + +.SH OPTIONS +.I julia +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 used cycle through the hue, making N stops around +the color wheel. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.TP 8 +.B \-mouse +.TP 8 +.B \-nomouse +If \fI\-mouse\fP is specified, the control point of the Julia set will +be derived from the position of the mouse in the window. When the mouse +is not in the window, the control point is chosen the normal way. +.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 1995 by Sean McCullough. + +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 +Sean McCullough , 1995. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/kaleidescope.c b/hacks/kaleidescope.c new file mode 100644 index 00000000..c6d7a981 --- /dev/null +++ b/hacks/kaleidescope.c @@ -0,0 +1,464 @@ +/* kaleidescope, Copyright (c) 1997 Ron Tapia + * + * 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. + */ + +/* + * The above, for lack of a better copyright statement in easy reach + * was just lifted from the xscreensaver source. + * + * One of the odd things about this hack is that the radial motion of the + * segments depends on roundoff error alone. + * + * I tried to make the source easy to add other shapes. So far, I've + * only messed with elipses and I couldn't do much with them that looked + * cool. A nice addition would be to add some sort of spline based shapes. + * Maybe rectangles would look nice. + * + */ + + +#include +#include +#include +#include +#include "spline.h" +#include "screenhack.h" + +#define NEWX(x,y) ((x*g.costheta) + (y*g.sintheta)) +#define NEWY(x,y) ((y*g.costheta) - (x*g.sintheta)) + + +typedef struct { + int xoff, yoff; /* offset of origin xmax/2, ymax/2 */ + int xmax, ymax; /* width, height of window */ + float costheta, sintheta; + int symmetry; + int ntrails; + int nsegments; + int narcs; + int nobjects; + int local_rotation; + int global_rotation; + int spring_constant; + Colormap cmap; + GC draw_gc; + GC erase_gc; + unsigned int default_fg_pixel; + Display *dpy; + Window window; + unsigned long delay; + unsigned short redmin,redrange,greenmin,greenrange,bluemin,bluerange; + int color_mode; +} GLOBAL; + +typedef struct Obj OBJECT; +struct Obj { + int type; + int time; + void (*propogate) (OBJECT *); + void (*draw) (OBJECT *); + void (*init) (OBJECT *); + void *cur; +}; + +typedef struct KSEGMENT { + struct KSEGMENT *next; + XColor color; + int drawn; + short int x1,y1,x2,y2; /* these are in the natural coordinate system */ + XSegment *xsegments; /* these are in the X coordinate system */ +} Ksegment; + +/* BEGIN global variables */ + +GLOBAL g; +OBJECT *objects; + +char *progclass = "Kaleidescope"; +char *defaults [] = { + "Kaleidescope.background: black", /* to placate SGI */ + "Kaleidescope.foreground: white", + "*color_mode: nice", + "*symmetry: 11", + "*ntrails: 100", + "*nsegments: 7", + "*local_rotation: -59", + "*global_rotation: 1", + "*spring_constant: 5", + "*delay: 20000", + "*redmin: 30000", + "*redrange: 20000", + "*greenmin: 30000", + "*greenrange: 20000", + "*bluemin: 30000", + "*bluerange: 20000", + 0 +}; + +XrmOptionDescRec options [] = { + { "-color_mode", ".color_mode", XrmoptionSepArg, 0 }, + { "-symmetry", ".symmetry", XrmoptionSepArg, 0 }, + { "-nsegments", ".nsegments", XrmoptionSepArg, 0 }, + { "-ntrails", ".ntrails", XrmoptionSepArg, 0 }, + { "-local_rotation", ".local_rotation", XrmoptionSepArg, 0 }, + { "-global_rotation", ".global_rotation", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-spring_constant", ".spring_constant", XrmoptionSepArg, 0 }, + { "-redmin", ".redmin", XrmoptionSepArg, 0 }, + { "-redrange", ".redmin", XrmoptionSepArg, 0 }, + { "-bluemin", ".bluemin", XrmoptionSepArg, 0 }, + { "-bluerange", ".bluerange", XrmoptionSepArg, 0 }, + { "-greenmin", ".greenmin", XrmoptionSepArg, 0 }, + { "-greenrange", ".greenrange", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +/* END global variables */ + +static void +krandom_color(XColor *color) +{ + int r; + r = ya_random() % 3; + + if((g.color_mode == 0) || (g.color_mode == 1)) { + + color->blue = ((r = ya_random()) % g.bluerange) + g.bluemin; + color->green = ((r = ya_random()) % g.greenrange) + g.greenmin; + color->red = ((r = ya_random()) % g.redrange) + g.redmin; + + if(!XAllocColor(g.dpy, g.cmap, color)) { + color->pixel = g.default_fg_pixel; + } + return; + } else { + color->pixel = g.default_fg_pixel; + return; + } +} + + +static void +kcopy_color(XColor *to, XColor *from) +{ + to->red = from->red; + to->green = from->green; + to->blue = from->blue; + to->pixel = from->pixel; +} + +static void +kcycle_color(XColor *color, + unsigned short redstep, + unsigned short greenstep, + unsigned short bluestep) +{ + unsigned short red,green,blue; + + if (! g.color_mode) { + XColor copy; + color->flags = DoRed|DoGreen|DoBlue; + color->red = (red = color->red) - redstep; + color->green = (green = color->green) - greenstep; + color->blue = (blue = color->blue) - bluestep; + copy = *color; + + if(!XAllocColor(g.dpy, g.cmap, color)) { + /* printf("couldn't alloc color...\n"); */ + color->pixel = g.default_fg_pixel; + } + copy.pixel = color->pixel; + *color = copy; + + color->red = red - redstep; + color->green = green- greenstep; + color->blue = blue - bluestep; + return; + } +} + + +static Ksegment * +create_ksegment (void) +{ + Ksegment *seg, *prev; + XColor new_color; + int i; + unsigned short redstep,bluestep,greenstep; + + krandom_color(&new_color); + + redstep = new_color.red/(2 * g.ntrails); + greenstep = new_color.green/(2 * g.ntrails); + bluestep = new_color.blue/(2 * g.ntrails); + + seg = (Ksegment *) malloc(sizeof(Ksegment)); + seg->xsegments = (XSegment *) malloc(g.symmetry * sizeof(XSegment)); + + prev = seg; + for(i=0; i< (g.ntrails - 1); i++) { + + kcycle_color(&new_color,redstep,greenstep,bluestep); + + kcopy_color(&(prev->color), &new_color); + + prev->next = (Ksegment*)malloc(sizeof(Ksegment)); + (prev->next)->xsegments = (XSegment*)malloc(g.symmetry * sizeof(XSegment)); + prev->drawn = 0; + prev = (prev->next); + } + + prev->drawn = 0; + prev->next = seg; + kcopy_color(&(prev->color), &new_color); + + return seg; +} + +static void +init_ksegment (OBJECT *obj) +{ + + /* Give the segment some random values */ + ((Ksegment *)obj->cur)->x1 = ya_random() % g.xoff; + ((Ksegment *)obj->cur)->y1 = ya_random() % g.yoff; + ((Ksegment *)obj->cur)->x2 = ya_random() % g.xoff; + ((Ksegment *)obj->cur)->y2 = ya_random() % g.yoff; +} + + +static void +draw_ksegment (OBJECT *obj) +{ + register short x1, y1, x2, y2; + int dx, dy; + int i; + static int counter=0; + + counter++; + + x1 = ((Ksegment *)obj->cur)->x1; /* in the natural coordinate system */ + y1 = ((Ksegment *)obj->cur)->y1; + x2 = ((Ksegment *)obj->cur)->x2; + y2 = ((Ksegment *)obj->cur)->y2; + + dx = x2 - x1; + dy = y2 - y1; + + /* maybe throw away values and start over */ + if( ((dx*dx) + (dy * dy)) < 100) { + init_ksegment (obj); + x1 = ((Ksegment *)obj->cur)->x1; /* in the natural coordinate system */ + y1 = ((Ksegment *)obj->cur)->y1; + x2 = ((Ksegment *)obj->cur)->x2; + y2 = ((Ksegment *)obj->cur)->y2; + } + + for (i=0; icur)->xsegments)[i].x1 = NEWX(x1,y1); + (((Ksegment *)obj->cur)->xsegments)[i].y1 = NEWY(x1,y1); + (((Ksegment *)obj->cur)->xsegments)[i].x2 = NEWX(x2,y2); + (((Ksegment *)obj->cur)->xsegments)[i].y2 = NEWY(x2,y2); + + (((Ksegment *)obj->cur)->xsegments)[i].x1 = (x1 = (((Ksegment *)obj->cur)->xsegments)[i].x1) + g.xoff; + (((Ksegment *)obj->cur)->xsegments)[i].y1 = (y1 = (((Ksegment *)obj->cur)->xsegments)[i].y1) + g.yoff; + (((Ksegment *)obj->cur)->xsegments)[i].x2 = (x2 = (((Ksegment *)obj->cur)->xsegments)[i].x2) + g.xoff; + (((Ksegment *)obj->cur)->xsegments)[i].y2 = (y2 = (((Ksegment *)obj->cur)->xsegments)[i].y2) + g.yoff; + } + + XSetForeground(g.dpy, g.draw_gc, (((Ksegment *)obj->cur)->color).pixel); + + XDrawSegments(g.dpy, g.window, g.draw_gc, ((Ksegment *)obj->cur)->xsegments, g.symmetry); + ((Ksegment *)obj->cur)->drawn = 1; + + if (((((Ksegment *)obj->cur)->next)->drawn) != 0) { + XDrawSegments(g.dpy, g.window, g.erase_gc, ((Ksegment *)obj->cur)->next->xsegments, g.symmetry); + } +} + +static void +propogate_ksegment(OBJECT *obj) +{ + int t; + short int x1,y1,x2,y2; + short int midx,midy,nmidx,nmidy; + float lsin, lcos, gsin, gcos; + + lsin = sin((2*M_PI/10000)*g.local_rotation); + lcos = cos((2*M_PI/10000)*g.local_rotation); + gsin = sin((2*M_PI/10000)*g.global_rotation); + gcos = cos((2*M_PI/10000)*g.global_rotation); + + t=obj->time; + obj->time = t + 1; + + x1 = ((Ksegment *) obj->cur)->x1; + y1 = ((Ksegment *) obj->cur)->y1; + x2 = ((Ksegment *) obj->cur)->x2; + y2 = ((Ksegment *) obj->cur)->y2; + + midx = (x1 + x2)/2; + midy = (y1 + y2)/2; + + nmidx = midx*gcos + midy*gsin; + nmidy = midy*gcos - midx*gsin; + + x1 = x1 - midx; + x2 = x2 - midx; + y1 = y1 - midy; + y2 = y2 - midy; + + + /* This is where we move to the next ksegment... */ + obj->cur = ((Ksegment *)obj->cur)->next; + + ((Ksegment *)obj->cur)->x1 = ((x1*lcos) + (y1*lsin)) + nmidx; + ((Ksegment *)obj->cur)->y1 = ((y1*lcos) - (x1*lsin)) + nmidy; + ((Ksegment *)obj->cur)->x2 = ((x2*lcos) + (y2*lsin)) + nmidx; + ((Ksegment *)obj->cur)->y2 = ((y2*lcos) - (x2*lsin)) + nmidy; + + return ; +} + +static void +init_objects (void) +{ + int i; + for (i=0; i, 20-Mar-97. + diff --git a/hacks/laser.c b/hacks/laser.c new file mode 100644 index 00000000..a0080932 --- /dev/null +++ b/hacks/laser.c @@ -0,0 +1,319 @@ +/* -*- Mode: C; tab-width: 4 -*- + * laser --- draws swinging laser beams. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)laser.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1995 Pascal Pensa + * + * 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. + * + * Revision History: + * 10-May-97: jwz@netscape.com: turned into a standalone program. + */ + +#ifdef STANDALONE +# define PROGCLASS "Laser" +# define HACK_INIT init_laser +# define HACK_DRAW draw_laser +# define laser_opts xlockmore_opts +# define DEFAULTS "*count: 10 \n" \ + "*cycles: 200 \n" \ + "*delay: 40000 \n" \ + "*ncolors: 64 \n" +# define SMOOTH_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt laser_opts = { + 0, NULL, 0, NULL, NULL }; + +#define MINREDRAW 3 /* Number of redrawn on each frame */ +#define MAXREDRAW 8 + +#define MINLASER 1 /* Laser number */ + +#define MINWIDTH 2 /* Laser ray width range */ +#define MAXWIDTH 40 + +#define MINSPEED 2 /* Speed range */ +#define MAXSPEED 17 + +#define MINDIST 10 /* Minimal distance from edges */ + +#define COLORSTEP 2 /* Laser color step */ + +#define RANGE_RAND(min,max) ((min) + LRAND() % ((max) - (min))) + +typedef enum { + TOP, RIGHT, BOTTOM, LEFT +} border; + +typedef struct { + int bx; /* border x */ + int by; /* border y */ + border bn; /* active border */ + int dir; /* direction */ + int speed; /* laser velocity from MINSPEED to MAXSPEED */ + int sx[MAXWIDTH]; /* x stack */ + int sy[MAXWIDTH]; /* x stack */ + XGCValues gcv; /* for color */ +} laserstruct; + +typedef struct { + int width; + int height; + int cx; /* center x */ + int cy; /* center y */ + int lw; /* laser width */ + int ln; /* laser number */ + int lr; /* laser redraw */ + int sw; /* stack width */ + int so; /* stack offset */ + int time; /* up time */ + GC stippledGC; + XGCValues gcv_black; /* for black color */ + laserstruct *laser; +} lasersstruct; + +static lasersstruct *lasers = NULL; + + +void +init_laser(ModeInfo * mi) +{ + int i, c = 0; + lasersstruct *lp; + + if (lasers == NULL) { + if ((lasers = (lasersstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (lasersstruct))) == NULL) + return; + } + lp = &lasers[MI_SCREEN(mi)]; + + lp->width = MI_WIN_WIDTH(mi); + lp->height = MI_WIN_HEIGHT(mi); + lp->time = 0; + + lp->ln = MI_BATCHCOUNT(mi); + if (lp->ln < -MINLASER) { + /* if lp->ln is random ... the size can change */ + if (lp->laser != NULL) { + (void) free((void *) lp->laser); + lp->laser = NULL; + } + lp->ln = NRAND(-lp->ln - MINLASER + 1) + MINLASER; + } else if (lp->ln < MINLASER) + lp->ln = MINLASER; + + if (!lp->laser) { + lp->laser = (laserstruct *) malloc(lp->ln * sizeof (laserstruct)); + } + if (lp->stippledGC == NULL) { + XGCValues gcv; + + gcv.foreground = MI_WIN_WHITE_PIXEL(mi); + gcv.background = MI_WIN_BLACK_PIXEL(mi); + lp->gcv_black.foreground = MI_WIN_BLACK_PIXEL(mi); + lp->stippledGC = XCreateGC(MI_DISPLAY(mi), MI_WINDOW(mi), + GCForeground | GCBackground, &gcv); + } + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + + if (MINDIST < lp->width - MINDIST) + lp->cx = RANGE_RAND(MINDIST, lp->width - MINDIST); + else + lp->cx = RANGE_RAND(0, lp->width); + if (MINDIST < lp->height - MINDIST) + lp->cy = RANGE_RAND(MINDIST, lp->height - MINDIST); + else + lp->cy = RANGE_RAND(0, lp->height); + lp->lw = RANGE_RAND(MINWIDTH, MAXWIDTH); + lp->lr = RANGE_RAND(MINREDRAW, MAXREDRAW); + lp->sw = 0; + lp->so = 0; + + if (MI_NPIXELS(mi) > 2) + c = NRAND(MI_NPIXELS(mi)); + + for (i = 0; i < lp->ln; i++) { + laserstruct *l = &lp->laser[i]; + + l->bn = (border) NRAND(4); + + switch (l->bn) { + case TOP: + l->bx = NRAND(lp->width); + l->by = 0; + break; + case RIGHT: + l->bx = lp->width; + l->by = NRAND(lp->height); + break; + case BOTTOM: + l->bx = NRAND(lp->width); + l->by = lp->height; + break; + case LEFT: + l->bx = 0; + l->by = NRAND(lp->height); + } + + l->dir = LRAND() & 1; + l->speed = ((RANGE_RAND(MINSPEED, MAXSPEED) * lp->width) / 1000) + 1; + if (MI_NPIXELS(mi) > 2) { + l->gcv.foreground = MI_PIXEL(mi, c); + c = (c + COLORSTEP) % MI_NPIXELS(mi); + } else + l->gcv.foreground = MI_WIN_WHITE_PIXEL(mi); + } +} + +static void +draw_laser_once(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + lasersstruct *lp = &lasers[MI_SCREEN(mi)]; + int i; + + for (i = 0; i < lp->ln; i++) { + laserstruct *l = &lp->laser[i]; + + if (lp->sw >= lp->lw) { + XChangeGC(display, lp->stippledGC, GCForeground, &(lp->gcv_black)); + XDrawLine(display, MI_WINDOW(mi), lp->stippledGC, + lp->cx, lp->cy, + l->sx[lp->so], l->sy[lp->so]); + } + if (l->dir) { + switch (l->bn) { + case TOP: + l->bx -= l->speed; + if (l->bx < 0) { + l->by = -l->bx; + l->bx = 0; + l->bn = LEFT; + } + break; + case RIGHT: + l->by -= l->speed; + if (l->by < 0) { + l->bx = lp->width + l->by; + l->by = 0; + l->bn = TOP; + } + break; + case BOTTOM: + l->bx += l->speed; + if (l->bx >= lp->width) { + l->by = lp->height - l->bx % lp->width; + l->bx = lp->width; + l->bn = RIGHT; + } + break; + case LEFT: + l->by += l->speed; + if (l->by >= lp->height) { + l->bx = l->by % lp->height; + l->by = lp->height; + l->bn = BOTTOM; + } + } + } else { + switch (l->bn) { + case TOP: + l->bx += l->speed; + if (l->bx >= lp->width) { + l->by = l->bx % lp->width; + l->bx = lp->width; + l->bn = RIGHT; + } + break; + case RIGHT: + l->by += l->speed; + if (l->by >= lp->height) { + l->bx = lp->width - l->by % lp->height; + l->by = lp->height; + l->bn = BOTTOM; + } + break; + case BOTTOM: + l->bx -= l->speed; + if (l->bx < 0) { + l->by = lp->height + l->bx; + l->bx = 0; + l->bn = LEFT; + } + break; + case LEFT: + l->by -= l->speed; + if (l->by < 0) { + l->bx = -l->bx; + l->by = 0; + l->bn = TOP; + } + } + } + + XChangeGC(display, lp->stippledGC, GCForeground, &l->gcv); + XDrawLine(display, MI_WINDOW(mi), lp->stippledGC, + lp->cx, lp->cy, l->bx, l->by); + + l->sx[lp->so] = l->bx; + l->sy[lp->so] = l->by; + + } + + if (lp->sw < lp->lw) + ++lp->sw; + + lp->so = (lp->so + 1) % lp->lw; +} + +void +draw_laser(ModeInfo * mi) +{ + lasersstruct *lp = &lasers[MI_SCREEN(mi)]; + int i; + + for (i = 0; i < lp->lr; i++) + draw_laser_once(mi); + + if (++lp->time > MI_CYCLES(mi)) + init_laser(mi); +} + +void +release_laser(ModeInfo * mi) +{ + if (lasers != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + lasersstruct *lp = &lasers[screen]; + + if (lp->laser != NULL) + (void) free((void *) lp->laser); + if (lp->stippledGC != NULL) + XFreeGC(MI_DISPLAY(mi), lp->stippledGC); + } + (void) free((void *) lasers); + lasers = NULL; + } +} + +void +refresh_laser(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/laser.man b/hacks/laser.man new file mode 100644 index 00000000..c219bfc7 --- /dev/null +++ b/hacks/laser.man @@ -0,0 +1,64 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +laser - draws vaguely laser-like moving lines +.SH SYNOPSIS +.B laser +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] + +.SH DESCRIPTION +The \fIlaser\fP program draws vaguely laser-like moving lines +.SH OPTIONS +.I laser +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 64. +The colors used cycle through the hue, making N stops around the color wheel. +.TP 8 +.B \-cycles \fIinteger\fP +Default 200. +.TP 8 +.B \-count \fIinteger\fP +Default 10. +.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 1995 by Pascal Pensa. + +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 +Pascal Pensa , 1995. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/lightning.c b/hacks/lightning.c new file mode 100644 index 00000000..baa255dd --- /dev/null +++ b/hacks/lightning.c @@ -0,0 +1,580 @@ +/* -*- Mode: C; tab-width: 4 -*- + * lightning --- fractal lightning bolts. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)lightning.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1996 by Keith Romberg . + * + * 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: jwz@netscape.com: turned into a standalone program. + * 14-Jul-96: Cleaned up code. + * 27-Jun-96: Written and submitted by Keith Romberg . + */ + +#ifdef STANDALONE +# define PROGCLASS "Lightning" +# define HACK_INIT init_lightning +# define HACK_DRAW draw_lightning +# define lightning_opts xlockmore_opts +# define DEFAULTS "*delay: 10000 \n" \ + "*ncolors: 200 \n" +# define BRIGHT_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt lightning_opts = { + 0, NULL, 0, NULL, NULL }; + +/*---------------------------- defines -------------------------------*/ + +#define BOLT_NUMBER 4 +#define BOLT_ITERATION 4 +#define LONG_FORK_ITERATION 3 +#define MEDIUM_FORK_ITERATION 2 +#define SMALL_FORK_ITERATION 1 + +#define WIDTH_VARIATION 30 +#define HEIGHT_VARIATION 15 + +#define DELAY_TIME_AMOUNT 15 +#define MULTI_DELAY_TIME_BASE 5 + +#define MAX_WIGGLES 16 +#define WIGGLE_BASE 8 +#define WIGGLE_AMOUNT 14 + +#define RANDOM_FORK_PROBILITY 4 + +#define FIRST_LEVEL_STRIKE 0 +#define LEVEL_ONE_STRIKE 1 +#define LEVEL_TWO_STRIKE 2 + +#define BOLT_VERTICIES ((1<= 51) && (multi_prob < 75)) + result = 2; + else if ((multi_prob >= 76) && (multi_prob < 92)) + result = 3; + else + result = BOLT_NUMBER; /* 4 */ + + return (result); +} + +/*-------------------------------------------------------------------------*/ + +static int +flashing_strike(void) +{ + int tmp = NRAND(FLASH_PROBILITY); + + if (tmp <= FLASH_PROBILITY) + return (1); + return (0); +} + +/*-------------------------------------------------------------------------*/ + +static void +flash_duration(int *start, int *end, int total_duration) +{ + int mid, d; + + mid = total_duration / MAX_FLASH_AMOUNT; + d = NRAND(total_duration / MAX_FLASH_AMOUNT) / 2; + *start = mid - d; + *end = mid + d; +} + +/*-------------------------------------------------------------------------*/ + +static void +random_storm(Storm * st) +{ + int i, j, tmp; + XPoint p; + + for (i = 0; i < st->multi_strike; i++) { + st->bolts[i].end1.x = NRAND(st->scr_width); + st->bolts[i].end1.y = 0; + st->bolts[i].end2.x = NRAND(st->scr_width); + st->bolts[i].end2.y = st->scr_height; + st->bolts[i].wiggle_number = WIGGLE_BASE + NRAND(MAX_WIGGLES); + if ((st->bolts[i].flash = flashing_strike())) + flash_duration(&(st->bolts[i].flash_begin), &(st->bolts[i].flash_stop), + st->bolts[i].wiggle_number); + else + st->bolts[i].flash_begin = st->bolts[i].flash_stop = 0; + st->bolts[i].wiggle_amount = WIGGLE_AMOUNT; + if (i == 0) + st->bolts[i].delay_time = NRAND(DELAY_TIME_AMOUNT); + else + st->bolts[i].delay_time = NRAND(DELAY_TIME_AMOUNT) + + (MULTI_DELAY_TIME_BASE * i); + st->bolts[i].strike_level = FIRST_LEVEL_STRIKE; + tmp = 0; + generate(st->bolts[i].end1, st->bolts[i].end2, BOLT_ITERATION, + st->bolts[i].middle, &tmp); + st->bolts[i].fork_number = 0; + st->bolts[i].visible = 0; + for (j = 0; j < BOLT_VERTICIES; j++) { + if (st->bolts[i].fork_number >= 2) + break; + if (NRAND(100) < RANDOM_FORK_PROBILITY) { + p.x = NRAND(st->scr_width); + p.y = st->scr_height; + st->bolts[i].forks_start[st->bolts[i].fork_number] = j; + create_fork(&(st->bolts[i].branch[st->bolts[i].fork_number]), + st->bolts[i].middle[j], p, j); + st->bolts[i].fork_number++; + } + } + } +} + +static void +generate(XPoint A, XPoint B, int iter, XPoint * verts, int *index) +{ + XPoint mid; + + mid.x = (A.x + B.x) / 2 + NRAND(WIDTH_VARIATION) - WIDTH_VARIATION / 2; + mid.y = (A.y + B.y) / 2 + NRAND(HEIGHT_VARIATION) - HEIGHT_VARIATION / 2; + + if (!iter) { + verts[*index].x = mid.x; + verts[*index].y = mid.y; + (*index)++; + return; + } + generate(A, mid, iter - 1, verts, index); + generate(mid, B, iter - 1, verts, index); +} + +/*------------------------------------------------------------------------*/ + +static void +create_fork(Fork * f, XPoint start, XPoint end, int level) +{ + int tmp = 1; + + f->ForkVerticies[0].x = start.x; + f->ForkVerticies[0].y = start.y; + + if (level <= 6) { + generate(start, end, LONG_FORK_ITERATION, f->ForkVerticies, &tmp); + f->num_used = 9; + } else if ((level > 6) && (level <= 11)) { + generate(start, end, MEDIUM_FORK_ITERATION, f->ForkVerticies, &tmp); + f->num_used = 5; + } else { + if (distance(start, end) > 100) { + generate(start, end, MEDIUM_FORK_ITERATION, f->ForkVerticies, &tmp); + f->num_used = 5; + } else { + generate(start, end, SMALL_FORK_ITERATION, f->ForkVerticies, &tmp); + f->num_used = 3; + } + } + + f->ForkVerticies[f->num_used - 1].x = end.x; + f->ForkVerticies[f->num_used - 1].y = end.y; +} + +/*------------------------------------------------------------------------*/ + +static void +update_bolt(Lightning * bolt, int time) +{ + wiggle_bolt(bolt); + if ((bolt->wiggle_amount == 0) && (bolt->wiggle_number > 2)) + bolt->wiggle_number = 0; + if (((time % 3) == 0)) + bolt->wiggle_amount++; + + if (((time >= bolt->delay_time) && (time < bolt->flash_begin)) || + (time > bolt->flash_stop)) + bolt->visible = 1; + else + bolt->visible = 0; + + if (time == bolt->delay_time) + bolt->strike_level = FIRST_LEVEL_STRIKE; + else if (time == (bolt->delay_time + 1)) + bolt->strike_level = LEVEL_ONE_STRIKE; + else if ((time > (bolt->delay_time + 1)) && + (time <= (bolt->delay_time + bolt->flash_begin - 2))) + bolt->strike_level = LEVEL_TWO_STRIKE; + else if (time == (bolt->delay_time + bolt->flash_begin - 1)) + bolt->strike_level = LEVEL_ONE_STRIKE; + else if (time == (bolt->delay_time + bolt->flash_stop + 1)) + bolt->strike_level = LEVEL_ONE_STRIKE; + else + bolt->strike_level = LEVEL_TWO_STRIKE; +} + +/*------------------------------------------------------------------------*/ + +static void +draw_bolt(Lightning * bolt, ModeInfo * mi) +{ + if (bolt->visible) { + if (bolt->strike_level == FIRST_LEVEL_STRIKE) + first_strike(*bolt, mi); + else if (bolt->strike_level == LEVEL_ONE_STRIKE) + level1_strike(*bolt, mi); + else + level2_strike(*bolt, mi); + } +} + +/*------------------------------------------------------------------------*/ + +static void +first_strike(Lightning bolt, ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + int i; + + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + XDrawLine(display, window, gc, + bolt.end1.x, bolt.end1.y, bolt.middle[0].x, bolt.middle[0].y); + draw_line(mi, bolt.middle, BOLT_VERTICIES, gc, 0); + XDrawLine(display, window, gc, + bolt.middle[BOLT_VERTICIES - 1].x, bolt.middle[BOLT_VERTICIES - 1].y, + bolt.end2.x, bolt.end2.y); + + for (i = 0; i < bolt.fork_number; i++) + draw_line(mi, bolt.branch[i].ForkVerticies, bolt.branch[i].num_used, + gc, 0); +} + +/*------------------------------------------------------------------------*/ + +static void +draw_line(ModeInfo * mi, XPoint * points, int number, GC to_use, int offset) +{ + int i; + + for (i = 0; i < number - 1; i++) { + if (points[i].y <= points[i + 1].y) + XDrawLine(MI_DISPLAY(mi), MI_WINDOW(mi), to_use, points[i].x + offset, + points[i].y, points[i + 1].x + offset, points[i + 1].y); + else { + if (points[i].x < points[i + 1].x) + XDrawLine(MI_DISPLAY(mi), MI_WINDOW(mi), to_use, points[i].x + + offset, points[i].y + offset, points[i + 1].x + offset, + points[i + 1].y + offset); + else + XDrawLine(MI_DISPLAY(mi), MI_WINDOW(mi), to_use, points[i].x - + offset, points[i].y + offset, points[i + 1].x - offset, + points[i + 1].y + offset); + } + } +} + +/*------------------------------------------------------------------------*/ + +static void +level1_strike(Lightning bolt, ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + Storm *st = &Helga[MI_SCREEN(mi)]; + GC gc = MI_GC(mi); + int i; + + if (MI_NPIXELS(mi) > 2) /* color */ + XSetForeground(display, gc, MI_PIXEL(mi, st->color)); + else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + XDrawLine(display, window, gc, + bolt.end1.x - 1, bolt.end1.y, bolt.middle[0].x - 1, bolt.middle[0].y); + draw_line(mi, bolt.middle, BOLT_VERTICIES, gc, -1); + XDrawLine(display, window, gc, + bolt.middle[BOLT_VERTICIES - 1].x - 1, + bolt.middle[BOLT_VERTICIES - 1].y, bolt.end2.x - 1, bolt.end2.y); + XDrawLine(display, window, gc, + bolt.end1.x + 1, bolt.end1.y, bolt.middle[0].x + 1, bolt.middle[0].y); + draw_line(mi, bolt.middle, BOLT_VERTICIES, gc, 1); + XDrawLine(display, window, gc, + bolt.middle[BOLT_VERTICIES - 1].x + 1, + bolt.middle[BOLT_VERTICIES - 1].y, bolt.end2.x + 1, bolt.end2.y); + + for (i = 0; i < bolt.fork_number; i++) { + draw_line(mi, bolt.branch[i].ForkVerticies, bolt.branch[i].num_used, + gc, -1); + draw_line(mi, bolt.branch[i].ForkVerticies, bolt.branch[i].num_used, + gc, 1); + } + first_strike(bolt, mi); +} + +/*------------------------------------------------------------------------*/ + +static int +distance(XPoint a, XPoint b) +{ + return ((int) sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y))); +} + +/*------------------------------------------------------------------------*/ + +static void +level2_strike(Lightning bolt, ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + Storm *st = &Helga[MI_SCREEN(mi)]; + GC gc = MI_GC(mi); + int i; + + /* This was originally designed to be a little darker then the + level1 strike. This was changed to get it to work on + multiscreens and to add more color variety. I tried + stippling but it did not look good. */ + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, st->color)); + else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + XDrawLine(display, window, gc, + bolt.end1.x - 2, bolt.end1.y, bolt.middle[0].x - 2, bolt.middle[0].y); + draw_line(mi, bolt.middle, BOLT_VERTICIES, gc, -2); + XDrawLine(display, window, gc, + bolt.middle[BOLT_VERTICIES - 1].x - 2, + bolt.middle[BOLT_VERTICIES - 1].y, bolt.end2.x - 2, bolt.end2.y); + + XDrawLine(display, window, gc, + bolt.end1.x + 2, bolt.end1.y, bolt.middle[0].x + 2, bolt.middle[0].y); + draw_line(mi, bolt.middle, BOLT_VERTICIES, gc, 2); + XDrawLine(display, window, gc, + bolt.middle[BOLT_VERTICIES - 1].x + 2, + bolt.middle[BOLT_VERTICIES - 1].y, bolt.end2.x + 2, bolt.end2.y); + + for (i = 0; i < bolt.fork_number; i++) { + draw_line(mi, bolt.branch[i].ForkVerticies, bolt.branch[i].num_used, + gc, -2); + draw_line(mi, bolt.branch[i].ForkVerticies, bolt.branch[i].num_used, + gc, 2); + } + level1_strike(bolt, mi); +} + +/*------------------------------------------------------------------------*/ + +static int +storm_active(Storm * st) +{ + int i, atleast_1 = 0; + + for (i = 0; i < st->multi_strike; i++) + if (st->bolts[i].wiggle_number > 0) + atleast_1++; + + return (atleast_1); +} + +/*------------------------------------------------------------------------*/ + +static void +wiggle_bolt(Lightning * bolt) +{ + int i; + + wiggle_line(bolt->middle, BOLT_VERTICIES, bolt->wiggle_amount); + bolt->end2.x += NRAND(bolt->wiggle_amount) - bolt->wiggle_amount / 2; + bolt->end2.y += NRAND(bolt->wiggle_amount) - bolt->wiggle_amount / 2; + + for (i = 0; i < bolt->fork_number; i++) { + wiggle_line(bolt->branch[i].ForkVerticies, bolt->branch[i].num_used, + bolt->wiggle_amount); + bolt->branch[i].ForkVerticies[0].x = bolt->middle[bolt->forks_start[i]].x; + bolt->branch[i].ForkVerticies[0].y = bolt->middle[bolt->forks_start[i]].y; + } + + if (bolt->wiggle_amount > 1) + bolt->wiggle_amount -= 1; + else + bolt->wiggle_amount = 0; +} + +/*------------------------------------------------------------------------*/ + +static void +wiggle_line(XPoint * p, int number, int amount) +{ + int i; + + for (i = 0; i < number; i++) { + p[i].x += NRAND(amount) - amount / 2; + p[i].y += NRAND(amount) - amount / 2; + } +} + +/*------------------------------------------------------------------------*/ + +void +init_lightning(ModeInfo * mi) +{ + Storm *st; + + if (Helga == NULL) { + if ((Helga = (Storm *) calloc(MI_NUM_SCREENS(mi), + sizeof (Storm))) == NULL) + return; + } + st = &Helga[MI_SCREEN(mi)]; + + st->scr_width = MI_WIN_WIDTH(mi); + st->scr_height = MI_WIN_HEIGHT(mi); + + st->multi_strike = setup_multi_strike(); + random_storm(st); + st->stage = 0; +} + +/*------------------------------------------------------------------------*/ + +void +draw_lightning(ModeInfo * mi) +{ + Storm *st = &Helga[MI_SCREEN(mi)]; + int i; + + switch (st->stage) { + case 0: + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + st->color = NRAND(MI_NPIXELS(mi)); + st->draw_time = 0; + if (storm_active(st)) + st->stage++; + else + st->stage = 3; + break; + case 1: + for (i = 0; i < st->multi_strike; i++) { + if (st->bolts[i].visible) + draw_bolt(&(st->bolts[i]), mi); + update_bolt(&(st->bolts[i]), st->draw_time); + } + st->draw_time++; + XFlush(MI_DISPLAY(mi)); + MI_PAUSE(mi) = 60000; + st->stage++; + break; + case 2: + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + if (storm_active(st)) + st->stage = 1; + else + st->stage++; + break; + case 3: + MI_PAUSE(mi) = 1000000; + init_lightning(mi); + break; + } +} + +void +release_lightning(ModeInfo * mi) +{ + if (Helga != NULL) { + (void) free((void *) Helga); + Helga = NULL; + } +} + +void +refresh_lightning(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/lightning.man b/hacks/lightning.man new file mode 100644 index 00000000..7e602bfb --- /dev/null +++ b/hacks/lightning.man @@ -0,0 +1,58 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +lightning - draws fractal lightning bolts +.SH SYNOPSIS +.B lightning +[\-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 \fIlightning\fP program draws fractal lightning bolts +.SH OPTIONS +.I lightning +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 64. +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 1996 by Keith Romberg. + +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 +Keith Romberg , 27-Jun-96. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/link_axp.com b/hacks/link_axp.com new file mode 100644 index 00000000..942dd7ae --- /dev/null +++ b/hacks/link_axp.com @@ -0,0 +1,103 @@ +$! We fisrt test the version of DECW/Motif ; if 1.2 we need to link with new +$! X11R5 libraries +$@sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version +$ if f$extract(4,3,decw$version).eqs."1.2" +$ then +$! DECW/Motif 1.2 : link with X11R5 libraries +$ link/exe=attraction.exe screenhack,attraction,vms_axp_12.opt/opt +$ 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=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 +$ 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=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 +$ link/exe=halo.exe screenhack,halo,vms_axp_12.opt/opt +$ link/exe=helix.exe screenhack,helix,vms_axp_12.opt/opt +$ link/exe=hopalong.exe screenhack-xlock,hopalong,xlockmore,vms_axp_12.opt/opt +$ link/exe=hypercube.exe screenhack,hypercube,vms_axp_12.opt/opt +$ link/exe=ifs.exe screenhack-xlock,ifs,xlockmore,vms_axp_12.opt/opt +$ link/exe=imsmap.exe screenhack,imsmap,vms_axp_12.opt/opt +$ link/exe=julia.exe screenhack-xlock,julia,xlockmore,vms_axp_12.opt/opt +$ link/exe=kaleidescope.exe screenhack,kaleidescope,vms_axp_12.opt/opt +$ link/exe=laser.exe screenhack-xlock,laser,xlockmore,vms_axp_12.opt/opt +$ link/exe=lightning.exe screenhack-xlock,lightning,xlockmore,vms_axp_12.opt/opt +$ link/exe=lisa.exe screenhack-xlock,lisa,xlockmore,vms_axp_12.opt/opt +$ link/exe=lmorph.exe screenhack,lmorph,vms_axp_12.opt/opt +$ link/exe=maze.exe screenhack,maze,vms_axp_12.opt/opt +$ link/exe=moire.exe screenhack,moire,vms_axp_12.opt/opt +$ link/exe=noseguy.exe screenhack,noseguy,vms_axp_12.opt/opt +$ 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=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 +$ link/exe=slidescreen.exe screenhack,slidescreen,vms_axp_12.opt/opt +$ link/exe=slip.exe screenhack-xlock,slip,xlockmore,vms_axp_12.opt/opt +$ link/exe=sphere.exe screenhack-xlock,sphere,xlockmore,vms_axp_12.opt/opt +$ link/exe=spiral.exe screenhack-xlock,spiral,xlockmore,vms_axp_12.opt/opt +$ link/exe=strange.exe screenhack-xlock,strange,xlockmore,vms_axp_12.opt/opt +$ link/exe=swirl.exe screenhack-xlock,swirl,xlockmore,vms_axp_12.opt/opt +$ link/exe=xroger.exe screenhack,xroger-hack,vms_axp_12.opt/opt +$ link/exe=goop.exe screenhack,goop,vms_axp_12.opt/opt +$ link/exe=starfish.exe screenhack,starfish,vms_axp_12.opt/opt +$ link/exe=munch.exe screenhack,munch,vms_axp_12.opt/opt +$ else +$! Else, link with X11R4 libraries +$ link/exe=attraction.exe screenhack,attraction,vms_axp.opt/opt +$ 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=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 +$ 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=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 +$ link/exe=halo.exe screenhack,halo,vms_axp.opt/opt +$ link/exe=helix.exe screenhack,helix,vms_axp.opt/opt +$ link/exe=hopalong.exe screenhack-xlock,hopalong,xlockmore,vms_axp.opt/opt +$ link/exe=hypercube.exe screenhack,hypercube,vms_axp.opt/opt +$ link/exe=ifs.exe screenhack-xlock,ifs,xlockmore,vms_axp.opt/opt +$ link/exe=imsmap.exe screenhack,imsmap,vms_axp.opt/opt +$ link/exe=julia.exe screenhack-xlock,julia,xlockmore,vms_axp.opt/opt +$ link/exe=kaleidescope.exe screenhack,kaleidescope,vms_axp.opt/opt +$ link/exe=laser.exe screenhack-xlock,laser,xlockmore,vms_axp.opt/opt +$ link/exe=lightning.exe screenhack-xlock,lightning,xlockmore,vms_axp.opt/opt +$ link/exe=lisa.exe screenhack-xlock,lisa,xlockmore,vms_axp.opt/opt +$ link/exe=lmorph.exe screenhack,lmorph,vms_axp.opt/opt +$ link/exe=maze.exe screenhack,maze,vms_axp.opt/opt +$ link/exe=moire.exe screenhack,moire,vms_axp.opt/opt +$ link/exe=noseguy.exe screenhack,noseguy,vms_axp.opt/opt +$ 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=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 +$ link/exe=slidescreen.exe screenhack,slidescreen,vms_axp.opt/opt +$ link/exe=slip.exe screenhack-xlock,slip,xlockmore,vms_axp.opt/opt +$ link/exe=sphere.exe screenhack-xlock,sphere,xlockmore,vms_axp.opt/opt +$ link/exe=spiral.exe screenhack-xlock,spiral,xlockmore,vms_axp.opt/opt +$ link/exe=strange.exe screenhack-xlock,strange,xlockmore,vms_axp.opt/opt +$ link/exe=swirl.exe screenhack-xlock,swirl,xlockmore,vms_axp.opt/opt +$ link/exe=xroger.exe screenhack,xroger-hack,vms_axp.opt/opt +$ link/exe=goop.exe screenhack,goop,vms_axp.opt/opt +$ link/exe=starfish.exe screenhack,starfish,vms_axp.opt/opt +$ link/exe=munch.exe screenhack,munch,vms_axp.opt/opt +$ endif diff --git a/hacks/link_decc.com b/hacks/link_decc.com new file mode 100644 index 00000000..daf6a3b5 --- /dev/null +++ b/hacks/link_decc.com @@ -0,0 +1,103 @@ +$! We fisrt test the version of DECW/Motif ; if 1.2 we need to link with new +$! X11R5 libraries +$@sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version +$ if f$extract(4,3,decw$version).eqs."1.2" +$ then +$! DECW/Motif 1.2 : link with X11R5 libraries +$ link/exe=attraction.exe screenhack,attraction,vms_decc_12.opt/opt +$ 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=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 +$ 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=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 +$ link/exe=halo.exe screenhack,halo,vms_decc_12.opt/opt +$ link/exe=helix.exe screenhack,helix,vms_decc_12.opt/opt +$ link/exe=hopalong.exe screenhack-xlock,hopalong,xlockmore,vms_decc_12.opt/opt +$ link/exe=hypercube.exe screenhack,hypercube,vms_decc_12.opt/opt +$ link/exe=ifs.exe screenhack-xlock,ifs,xlockmore,vms_decc_12.opt/opt +$ link/exe=imsmap.exe screenhack,imsmap,vms_decc_12.opt/opt +$ link/exe=julia.exe screenhack-xlock,julia,xlockmore,vms_decc_12.opt/opt +$ link/exe=kaleidescope.exe screenhack,kaleidescope,vms_decc_12.opt/opt +$ link/exe=laser.exe screenhack-xlock,laser,xlockmore,vms_decc_12.opt/opt +$ link/exe=lightning.exe screenhack-xlock,lightning,xlockmore,vms_decc_12.opt/opt +$ link/exe=lisa.exe screenhack-xlock,lisa,xlockmore,vms_decc_12.opt/opt +$ link/exe=lmorph.exe screenhack,lmorph,vms_decc_12.opt/opt +$ link/exe=maze.exe screenhack,maze,vms_decc_12.opt/opt +$ link/exe=moire.exe screenhack,moire,vms_decc_12.opt/opt +$ link/exe=noseguy.exe screenhack,noseguy,vms_decc_12.opt/opt +$ 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=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 +$ link/exe=slidescreen.exe screenhack,slidescreen,vms_decc_12.opt/opt +$ link/exe=slip.exe screenhack-xlock,slip,xlockmore,vms_decc_12.opt/opt +$ link/exe=sphere.exe screenhack-xlock,sphere,xlockmore,vms_decc_12.opt/opt +$ link/exe=spiral.exe screenhack-xlock,spiral,xlockmore,vms_decc_12.opt/opt +$ link/exe=strange.exe screenhack-xlock,strange,xlockmore,vms_decc_12.opt/opt +$ link/exe=swirl.exe screenhack-xlock,swirl,xlockmore,vms_decc_12.opt/opt +$ link/exe=xroger.exe screenhack,xroger-hack,vms_decc_12.opt/opt +$ link/exe=goop.exe screenhack,goop,vms_decc_12.opt/opt +$ link/exe=starfish.exe screenhack,starfish,vms_decc_12.opt/opt +$ link/exe=munch.exe screenhack,munch,vms_decc_12.opt/opt +$ else +$! Else, link with X11R4 libraries +$ link/exe=attraction.exe screenhack,attraction,vms_decc.opt/opt +$ 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=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 +$ 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=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 +$ link/exe=halo.exe screenhack,halo,vms_decc.opt/opt +$ link/exe=helix.exe screenhack,helix,vms_decc.opt/opt +$ link/exe=hopalong.exe screenhack-xlock,hopalong,xlockmore,vms_decc.opt/opt +$ link/exe=hypercube.exe screenhack,hypercube,vms_decc.opt/opt +$ link/exe=ifs.exe screenhack-xlock,ifs,xlockmore,vms_decc.opt/opt +$ link/exe=imsmap.exe screenhack,imsmap,vms_decc.opt/opt +$ link/exe=julia.exe screenhack-xlock,julia,xlockmore,vms_decc.opt/opt +$ link/exe=kaleidescope.exe screenhack,kaleidescope,vms_decc.opt/opt +$ link/exe=laser.exe screenhack-xlock,laser,xlockmore,vms_decc.opt/opt +$ link/exe=lightning.exe screenhack-xlock,lightning,xlockmore,vms_decc.opt/opt +$ link/exe=lisa.exe screenhack-xlock,lisa,xlockmore,vms_decc.opt/opt +$ link/exe=lmorph.exe screenhack,lmorph,vms_decc.opt/opt +$ link/exe=maze.exe screenhack,maze,vms_decc.opt/opt +$ link/exe=moire.exe screenhack,moire,vms_decc.opt/opt +$ link/exe=noseguy.exe screenhack,noseguy,vms_decc.opt/opt +$ 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=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 +$ link/exe=slidescreen.exe screenhack,slidescreen,vms_decc.opt/opt +$ link/exe=slip.exe screenhack-xlock,slip,xlockmore,vms_decc.opt/opt +$ link/exe=sphere.exe screenhack-xlock,sphere,xlockmore,vms_decc.opt/opt +$ link/exe=spiral.exe screenhack-xlock,spiral,xlockmore,vms_decc.opt/opt +$ link/exe=strange.exe screenhack-xlock,strange,xlockmore,vms_decc.opt/opt +$ link/exe=swirl.exe screenhack-xlock,swirl,xlockmore,vms_decc.opt/opt +$ link/exe=xroger.exe screenhack,xroger-hack,vms_decc.opt/opt +$ link/exe=goop.exe screenhack,goop,vms_decc.opt/opt +$ link/exe=starfish.exe screenhack,starfish,vms_decc.opt/opt +$ link/exe=munch.exe screenhack,munch,vms_decc.opt/opt +$ endif diff --git a/hacks/lisa.c b/hacks/lisa.c new file mode 100644 index 00000000..5859b77e --- /dev/null +++ b/hacks/lisa.c @@ -0,0 +1,477 @@ +/* -*- Mode: C; tab-width: 4 -*- + * lisa.c --- animated full-loop lisajous figures + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)lisa.c 4.03 97/05/10 xlockmore"; +#endif + +/* Copyright (c) 1997 by Caleb Cullen. + * + * 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 + * + * The inspiration for this program, Lasp, was written by Adam B. Roach + * in 1990, assisted by me, Caleb Cullen. It was written first in C, then + * in assembly, and used pre-calculated data tables to graph lisajous + * figures on 386 machines and lower. This version bears only superficial + * resemblances to the original Lasp. + * + * The `lissie' module's source code was studied as an example of how + * to incorporate a new module into xlock. Resemblances to it are + * expected, but not intended to be plaigiaristic. + */ + +#ifdef STANDALONE +# define PROGCLASS "Lisa" +# define HACK_INIT init_lisa +# define HACK_DRAW draw_lisa +# define lisa_opts xlockmore_opts +# define DEFAULTS "*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 */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt lisa_opts = { + 0, NULL, 0, NULL, NULL }; + +#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 lisasetcolor() \ +if (MI_NPIXELS(mi) > 2) { \ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_PIXEL(mi, loop->color)); \ + if (++(loop->color) >= MI_NPIXELS(mi)) { loop->color=0; } \ + } else { XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_WHITE_PIXEL(mi)); } +#define getRadius(context) \ + ((context->width > context->height)?context->height:context->width) * 3 / 8 +#define checkRadius(loop, context) \ + if ((context->height / 2 > MI_SIZE(mi)) && (context->width / 2 > MI_SIZE(mi))) \ + loop->radius = MI_SIZE(mi); \ + if ((loop->radius < 0) || \ + (loop->radius > loop->center.x) || \ + (loop->radius > loop->center.y)) loop->radius = getRadius(context) + + +typedef struct lisafunc_struct { + double xcoeff[2], ycoeff[2]; + int nx, ny; + int index; +} lisafuncs; + +typedef struct lisa_struct { + int radius, color, dx, dy, nsteps, nfuncs, melting; + double pistep, phi, theta; + XPoint center, *lastpoint; + lisafuncs *function[LISAMAXFUNCS]; +} lisas; + +typedef struct lisacontext_struct { + lisas *lisajous; + int width, height, nlisajous, loopcount; + int maxcycles; +} 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] = +{ + { + {1.0, 2.0}, + {1.0, 2.0}, 2, 2, 0}, + { + {1.0, 2.0}, + {1.0, 1.0}, 2, 2, 1}, + { + {1.0, 3.0}, + {1.0, 2.0}, 2, 2, 2}, + { + {1.0, 3.0}, + {1.0, 3.0}, 2, 2, 3}, + { + {2.0, 4.0}, + {1.0, 2.0}, 2, 2, 4}, + { + {1.0, 4.0}, + {1.0, 3.0}, 2, 2, 5}, + { + {1.0, 4.0}, + {1.0, 4.0}, 2, 2, 6}, + { + {1.0, 5.0}, + {1.0, 5.0}, 2, 2, 7}, + { + {2.0, 5.0}, + {2.0, 5.0}, 2, 2, 8}, + { + {1.0, 0.0}, + {1.0, 0.0}, 1, 1, 9} +}; + +static void +drawlisa(ModeInfo * mi, lisas * loop) +{ + XPoint *np; + XPoint *lp = loop->lastpoint; + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + lisafuncs **lf = loop->function; + int phase = lc->loopcount % loop->nsteps; + int pctr, fctr, xctr, yctr; + double xprod, yprod, xsum, ysum; + + /* Allocate the np array */ + np = (XPoint *) calloc(loop->nsteps, sizeof (XPoint)); + + /* Update the center */ + loop->center.x += loop->dx; + loop->center.y += loop->dy; + checkRadius(loop, lc); + if ((loop->center.x - loop->radius) <= 0) { + loop->center.x = loop->radius; + loop->dx = NRAND(XVMAX); + } else if ((loop->center.x + loop->radius) >= lc->width) { + loop->center.x = lc->width - loop->radius; + loop->dx = -NRAND(XVMAX); + }; + if ((loop->center.y - loop->radius) <= 0) { + loop->center.y = loop->radius; + loop->dy = NRAND(YVMAX); + } else if ((loop->center.y + loop->radius) >= lc->height) { + loop->center.y = lc->height - loop->radius; + loop->dy = -NRAND(YVMAX); + }; + + /* Now draw the points, and erase the ones from the last cycle */ + + for (pctr = 0; pctr < loop->nsteps; pctr++) { + fctr = loop->nfuncs; + loop->phi = (double) (pctr - phase) * loop->pistep; + loop->theta = (double) (pctr + phase) * loop->pistep; + xsum = ysum = 0; + while (fctr--) { + xctr = lf[fctr]->nx; + yctr = lf[fctr]->ny; + if (additive) { + xprod = yprod = 0.0; + while (xctr--) + xprod += sin(lf[fctr]->xcoeff[xctr] * loop->theta); + while (yctr--) + yprod += sin(lf[fctr]->ycoeff[yctr] * loop->phi); + if (loop->melting) { + if (fctr) { + xsum += xprod \ + *(double) (loop->nsteps - loop->melting) \ + /(double) loop->nsteps; + ysum += yprod \ + *(double) (loop->nsteps - loop->melting) \ + /(double) loop->nsteps; + } else { + xsum += xprod \ + *(double) loop->melting \ + /(double) loop->nsteps; + ysum += yprod \ + *(double) loop->melting \ + /(double) loop->nsteps; + } + } else { + xsum = xprod; + ysum = yprod; + } + if (!fctr) { + xsum = xsum \ + *(double) loop->radius \ + /(double) lf[fctr]->nx; + ysum = ysum \ + *(double) loop->radius \ + /(double) lf[fctr]->ny; + } + } else { + if (loop->melting) { + if (fctr) { + yprod = xprod = (double) loop->radius \ + *(double) (loop->nsteps - loop->melting) \ + /(double) (loop->nsteps); + } else { + yprod = xprod = (double) loop->radius \ + *(double) (loop->melting) \ + /(double) (loop->nsteps); + } + } else { + xprod = yprod = (double) loop->radius; + } + while (xctr--) + xprod *= sin(lf[fctr]->xcoeff[xctr] * loop->theta); + while (yctr--) + yprod *= sin(lf[fctr]->ycoeff[yctr] * loop->phi); + xsum += xprod; + ysum += yprod; + } + } + if ((loop->nfuncs > 1) && (!loop->melting)) { + xsum /= (double) loop->nfuncs; + ysum /= (double) loop->nfuncs; + } + xsum += (double) loop->center.x; + ysum += (double) loop->center.y; + + np[pctr].x = (int) ceil(xsum); + np[pctr].y = (int) ceil(ysum); + } + if (loop->melting) { + if (!--loop->melting) { + loop->nfuncs = 1; + loop->function[0] = loop->function[1]; + } + } + for (pctr = 0; pctr < loop->nsteps; pctr++) { + +#if defined DRAWLINES + /* erase the last cycle's point */ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi)); + XDrawLine(MI_DISPLAY(mi), MI_WINDOW(mi), \ + MI_GC(mi), lp[pctr].x, lp[pctr].y, \ + lp[(pctr + 1) % loop->nsteps].x, \ + lp[(pctr + 1) % loop->nsteps].y); + + /* Set the new color */ + lisasetcolor(); + + /* plot this cycle's point */ + XDrawLine(MI_DISPLAY(mi), MI_WINDOW(mi), \ + MI_GC(mi), np[pctr].x, np[pctr].y, \ + np[(pctr + 1) % loop->nsteps].x, \ + np[(pctr + 1) % loop->nsteps].y); +#else + /* erase the last cycle's point */ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi)); + XDrawPoint(MI_DISPLAY(mi), MI_WINDOW(mi), \ + MI_GC(mi), lp[pctr].x, lp[pctr].y); + + /* Set the new color */ + lisasetcolor(); + + /* plot this cycle's point */ + XDrawPoint(MI_DISPLAY(mi), MI_WINDOW(mi), \ + MI_GC(mi), np[pctr].x, np[pctr].y); +#endif + } + (void) free((void *) lp); + loop->lastpoint = np; +} + +static void +initlisa(ModeInfo * mi, lisas * loop) +{ + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + lisafuncs **lf = loop->function; + XPoint *lp; + int phase, pctr, fctr, xctr, yctr; + double xprod, yprod, xsum, ysum; + + if (MI_NPIXELS(mi) > 2) { + loop->color = 0; + } else + loop->color = MI_WIN_WHITE_PIXEL(mi); + loop->nsteps = MI_CYCLES(mi); + if (loop->nsteps == 0) + loop->nsteps = 1; + lc->maxcycles = (MAXCYCLES * loop->nsteps) - 1; + loop->melting = 0; + loop->nfuncs = 1; + loop->pistep = 2.0 * M_PI / (double) loop->nsteps; + loop->center.x = lc->width / 2; + loop->center.y = lc->height / 2; + loop->radius = MI_SIZE(mi); + checkRadius(loop, lc); + loop->dx = NRAND(XVMAX); + loop->dy = NRAND(YVMAX); + loop->dx++; + loop->dy++; + lf[0] = &Function[lc->loopcount % NUMSTDFUNCS]; + if ((lp = loop->lastpoint = (XPoint *) + calloc(loop->nsteps, sizeof (XPoint))) == NULL) + return; + phase = lc->loopcount % loop->nsteps; + + for (pctr = 0; pctr < loop->nsteps; pctr++) { + loop->phi = (double) (pctr - phase) * loop->pistep; + loop->theta = (double) (pctr + phase) * loop->pistep; + fctr = loop->nfuncs; + xsum = ysum = 0.0; + while (fctr--) { + xprod = yprod = (double) loop->radius; + xctr = lf[fctr]->nx; + yctr = lf[fctr]->ny; + while (xctr--) + xprod *= sin(lf[fctr]->xcoeff[xctr] * loop->theta); + while (yctr--) + yprod *= sin(lf[fctr]->ycoeff[yctr] * loop->phi); + xsum += xprod; + ysum += yprod; + } + if (loop->nfuncs > 1) { + xsum /= 2.0; + ysum /= 2.0; + } + xsum += (double) loop->center.x; + ysum += (double) loop->center.y; + + lp[pctr].x = (int) ceil(xsum); + lp[pctr].y = (int) ceil(ysum); + } + for (pctr = 0; pctr < loop->nsteps; pctr++) { + /* Set the color */ + lisasetcolor(); +#if defined DRAWLINES + XDrawLine(MI_DISPLAY(mi), MI_WINDOW(mi), \ + MI_GC(mi), lp[pctr].x, lp[pctr].y, \ + lp[(pctr + 1) % loop->nsteps].x, \ + lp[(pctr + 1) % loop->nsteps].y); +#else + XDrawPoint(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), \ + lp[pctr].x, lp[pctr].y); +#endif + } +} + +void +init_lisa(ModeInfo * mi) +{ + lisacons *lc; + int lctr; + + if (Lisa == NULL) { + if ((Lisa = (lisacons *) calloc(MI_NUM_SCREENS(mi), sizeof (lisacons))) \ + == NULL) + return; + } + 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; + + if (lc->lisajous == NULL) { + if ((lc->lisajous = (lisas *) calloc(lc->nlisajous, sizeof (lisas))) \ + == NULL) + return; + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + for (lctr = 0; lctr < lc->nlisajous; lctr++) { + initlisa(mi, &lc->lisajous[lctr]); + lc->loopcount++; + } + } else { + refresh_lisa(mi); + } + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); +} + +void +draw_lisa(ModeInfo * mi) +{ + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + + if (++lc->loopcount > lc->maxcycles) { + change_lisa(mi); + } + refresh_lisa(mi); +} + +void +refresh_lisa(ModeInfo * mi) +{ + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + int lctr; + + for (lctr = 0; lctr < lc->nlisajous; lctr++) { + drawlisa(mi, &lc->lisajous[lctr]); + } +} + +void +release_lisa(ModeInfo * mi) +{ + lisacons *lc; + int lctr, sctr; + + if (Lisa) { + for (sctr = 0; sctr < MI_NUM_SCREENS(mi); sctr++) { + lc = &Lisa[sctr]; + while (lc->lisajous) { + for (lctr = 0; lctr < lc->nlisajous; lctr++) { + (void) free(lc->lisajous[lctr].lastpoint); + } + (void) free(lc->lisajous); + lc->lisajous = NULL; + } + } + (void) free(Lisa); + Lisa = NULL; + } +} + +void +change_lisa(ModeInfo * mi) +{ + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + lisas *loop; + int lctr; + + lc->loopcount = 0; + for (lctr = 0; lctr < lc->nlisajous; lctr++) { + loop = &lc->lisajous[lctr]; + loop->function[1] = &Function[(loop->function[0]->index + 1) % + NUMSTDFUNCS]; + loop->melting = loop->nsteps - 1; + loop->nfuncs = 2; + } +} diff --git a/hacks/lisa.man b/hacks/lisa.man new file mode 100644 index 00000000..0e9aeeba --- /dev/null +++ b/hacks/lisa.man @@ -0,0 +1,67 @@ +.TH XScreenSaver 1 "27-May-97" "X Version 11" +.SH NAME +lisa - draws animated full-loop lisajous figures +.SH SYNOPSIS +.B lisa +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-size \fIinteger\fP] + +.SH DESCRIPTION +The \fIlisa\fP program draws animated full-loop lisajous figures. +.SH OPTIONS +.I lisa +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. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.TP 8 +.B \-size \fIinteger\fP + +.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 Caleb Cullen. + +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 +Caleb Cullen, 1997. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 27-May-97. diff --git a/hacks/lmorph.c b/hacks/lmorph.c new file mode 100644 index 00000000..0c7571ac --- /dev/null +++ b/hacks/lmorph.c @@ -0,0 +1,498 @@ + +/************************************************************************** + * + * FILE lmorph.c + * MODULE OF xscreensaver + * + * DESCRIPTION Bilinear interpolation for morphing line shapes. + * + * WRITTEN BY Sverre H. Huseby Glenn T. Lines + * Maridalsvn. 122, leil 101 Frysjavn. 3, 5. etg. + * N-0461 Oslo N-0883 Oslo + * Norway Norway + * + * Phone: +47 22 71 99 08 Phone: +47 22 23 71 99 + * E-mail: sverrehu@ifi.uio.no E-mail: gtl@si.sintef.no + * + * The original idea, and the bilinear interpolation + * mathematics used, emerged in the head of the wise + * Glenn Terje Lines. + * + * MODIFICATIONS march 1995 + * * Converted from an MS-Windows program to X Window. + * + **************************************************************************/ + +#include +#include +#include +#include +#include "screenhack.h" + +/************************************************************************** + * * + * P R I V A T E D A T A * + * * + **************************************************************************/ + +/* Define MARGINS to make some space around the figure */ +#define MARGINS /**/ + +#define MAXFIGS 20 +#define TWO_PI (2.0 * M_PI) +#define RND(x) (random() % (x)) +static int + cFig = 0, /* Number of figure arrays. */ + cPoint, /* Number of points in each array. */ + nWork, /* Current work array number. */ + nFrom, /* Current from array number. */ + nTo; /* Current to array number. */ +static long + delay; /* usecs to wait between updates. */ +static XPoint + *aWork[2], /* Working arrays. */ + *a[MAXFIGS], /* The figure arrays. */ + *aTmp, /* Used as source when interrupting morph */ + *aPrev, /* Previous points displayed. */ + *aCurr, /* The current points displayed. */ + *aFrom, /* Figure converting from. */ + *aTo; /* Figure converting to. */ +static double + gam, + maxGamma = 1.0, + delta_gam; +static GC + gcDraw, gcClear; +static Display + *dpy; +static Window + window; + + + +/************************************************************************** + * * + * P U B L I C D A T A * + * * + **************************************************************************/ + +char *progclass = "LMorph"; + +char *defaults [] = { + "LMorph.background: black", + "LMorph.foreground: green", + "*points: 150", + "*steps: 0", + "*delay: 50000", + 0 +}; + +XrmOptionDescRec options [] = { + { "-points", ".points", XrmoptionSepArg, 0 }, + { "-steps", ".steps", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + + +/************************************************************************** + * * + * P R I V A T E F U N C T I O N S * + * * + **************************************************************************/ + +static void * +xmalloc(size_t size) +{ + void *ret; + + if ((ret = malloc(size)) == NULL) { + fprintf(stderr, "lmorph: out of memory\n"); + exit(1); + } + return ret; +} + + + +static double frnd (void) +{ + /* + * Hm. for some reason the second line (using RAND_MAX) didn't + * work on some machines, so I always use the first. + */ +#ifndef dont_use_RAND_MAX + return (double) (random() & 0x7FFF) / 0x7FFF; +#else /* RAND_MAX */ + return ((double) random()) / RAND_MAX; +#endif /* RAND_MAX */ +} + + + +static void initPointArrays (void) +{ + XWindowAttributes wa; + int q, w, + mx, my, /* Max screen coordinates. */ + mp, /* Max point number. */ + s, rx, ry, + marginx, marginy; + double scalex, scaley; + + XGetWindowAttributes(dpy, window, &wa); + mx = wa.width - 1; + my = wa.height - 1; + mp = cPoint - 1; + + aWork[0] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + aWork[1] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + aTmp = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + + + /* + * Figure 0 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + s = cPoint / 4; + for (q = 0; q < s; q++) { + a[cFig][q].x = ((double) q / s) * mx; + a[cFig][q].y = 0; + a[cFig][s + q].x = mx; + a[cFig][s + q].y = ((double) q / s) * my; + a[cFig][2 * s + q].x = mx - ((double) q / s) * mx; + a[cFig][2 * s + q].y = my; + a[cFig][3 * s + q].x = 0; + a[cFig][3 * s + q].y = my - ((double) q / s) * my; + } + for (q = 4 * s; q < cPoint; q++) + a[cFig][q].x = a[cFig][q].y = 0; + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 1 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = ((double) q / cPoint) * mx; + a[cFig][q].y = (1.0 - sin(((double) q / mp) * TWO_PI)) * my / 2.0; + } + ++cFig; + + /* + * Figure 2 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + rx * sin(1 * TWO_PI * (double) q / mp); + a[cFig][q].y = my / 2 + ry * cos(3 * TWO_PI * (double) q / mp); + } + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 3 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + ry * sin(3 * TWO_PI * (double) q / mp); + a[cFig][q].y = my / 2 + ry * cos(1 * TWO_PI * (double) q / mp); + } + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 4 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + ry * (1 - 0.1 * frnd()) + * sin(TWO_PI * (double) q / mp); + a[cFig][q].y = my / 2 + ry * (1 - 0.1 * frnd()) + * cos(TWO_PI * (double) q / mp); + } + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 5 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + ry * (0.8 - 0.2 * sin(30 * TWO_PI * q / mp)) + * sin(TWO_PI * (double) q / mp); + a[cFig][q].y = my / 2 + ry * (0.8 - 0.2 * sin(30 * TWO_PI * q / mp)) + * cos(TWO_PI * (double) q / mp); + } + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 6 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + ry * sin(TWO_PI * (double) q / mp); + a[cFig][q].y = my / 2 + ry * cos(TWO_PI * (double) q / mp); + } + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 7 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + rx * cos(TWO_PI * (double) q / mp); + a[cFig][q].y = my / 2 + ry * sin(TWO_PI * (double) q / mp); + } + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 8 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = ((double) q / mp) * mx; + a[cFig][q].y = (1.0 - cos(((double) q / mp) * 3 * TWO_PI)) * my / 2.0; + } + ++cFig; + + /* + * Figure 9 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + rx * sin(2 * TWO_PI * (double) q / mp); + a[cFig][q].y = my / 2 + ry * cos(3 * TWO_PI * (double) q / mp); + } + a[cFig][mp].x = a[cFig][0].x; + a[cFig][mp].y = a[cFig][0].y; + ++cFig; + + /* + * Figure 10 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + ry * sin(5 * TWO_PI * (double) q / mp) + * ((double) q / mp); + a[cFig][q].y = my / 2 + ry * cos(5 * TWO_PI * (double) q / mp) + * ((double) q / mp); + } + ++cFig; + + /* + * Figure 11 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + rx = mx / 2; + ry = my / 2; + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = mx / 2 + ry * sin(6 * TWO_PI * (double) q / mp) + * ((double) q / mp); + a[cFig][q].y = my / 2 - ry * cos(6 * TWO_PI * (double) q / mp) + * ((double) q / mp); + } + ++cFig; + + /* + * Figure 12 + */ + a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint)); + for (q = 0; q < cPoint; q++) { + a[cFig][q].x = ((double) q / mp) * mx; + a[cFig][q].y = (1.0 - sin(((double) q / mp) * 5 * TWO_PI)) * my / 2.0; + } + ++cFig; + +#ifdef MARGINS + /* + * Make some space around the figures. + */ + marginx = (mx + 1) / 10; + marginy = (my + 1) / 10; + scalex = (double) ((mx + 1) - 2.0 * marginx) / (mx + 1.0); + scaley = (double) ((my + 1) - 2.0 * marginy) / (my + 1.0); + for (q = 0; q < cFig; q++) + for (w = 0; w < cPoint; w++) { + a[q][w].x = marginx + a[q][w].x * scalex; + a[q][w].y = marginy + a[q][w].y * scaley; + } +#endif +} + + + +static void createPoints (void) +{ + int q; + XPoint *pa = aCurr, *pa1 = aFrom, *pa2 = aTo; + long lg, l1g; + + + lg = 8192L * gam, l1g = 8192L * (1.0 - gam); + for (q = 0; q < cPoint; q++) { + pa->x = (short) ((l1g * pa1->x + lg * pa2->x) / 8192L); + pa->y = (short) ((l1g * pa1->y + lg * pa2->y) / 8192L); + ++pa; + ++pa1; + ++pa2; + } +} + + +static void drawImage (void) +{ + register int q; + XPoint *old0, *old1, *new0, *new1; + + /* + * Problem: update the window without too much flickering. I do + * this by handling each linesegment separately. First remove a + * line, then draw the new line. The problem is that this leaves + * small black pixels on the figure. To fix this, I draw the + * entire figure using XDrawLines() afterwards. + */ + if (aPrev) { + old0 = aPrev; + old1 = aPrev + 1; + new0 = aCurr; + new1 = aCurr + 1; + for (q = cPoint - 1; q; q--) { + XDrawLine(dpy, window, gcClear, + old0->x, old0->y, old1->x, old1->y); + XDrawLine(dpy, window, gcDraw, + new0->x, new0->y, new1->x, new1->y); + ++old0; + ++old1; + ++new0; + ++new1; + } + } + XDrawLines(dpy, window, gcDraw, aCurr, cPoint, CoordModeOrigin); + XFlush(dpy); +} + +static void initLMorph (void) +{ + int steps; + XGCValues gcv; + XWindowAttributes wa; + Colormap cmap; + + cPoint = get_integer_resource("points", "Integer"); + steps = get_integer_resource("steps", "Integer"); + delay = get_integer_resource("delay", "Integer"); + + if (steps <= 0) + steps = (random() % 400) + 100; + + delta_gam = 1.0 / steps; + XGetWindowAttributes(dpy, window, &wa); + cmap = wa.colormap; + gcv.foreground = get_pixel_resource("foreground", "Foreground", dpy, cmap); + gcDraw = XCreateGC(dpy, window, GCForeground, &gcv); + XSetForeground(dpy, gcDraw, gcv.foreground); + gcv.foreground = get_pixel_resource("background", "Background", dpy, cmap); + 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); +} + +static void animateLMorph (void) +{ + if (gam > maxGamma) { + gam = 0.0; + if (maxGamma == 1.0) { + nFrom = nTo; + aFrom = a[nFrom]; + } else { + memcpy(aTmp, aCurr, cPoint * sizeof(XPoint)); + aFrom = aTmp; + nFrom = -1; + } + do { + nTo = RND(cFig); + } while (nTo == nFrom); + aTo = a[nTo]; + if (RND(2)) { + /* + * Reverse the array to get more variation. + */ + int i1, i2; + XPoint p; + + for (i1 = 0, i2 = cPoint - 1; i1 < cPoint / 2; i1++, i2--) { + p = aTo[i1]; + aTo[i1] = aTo[i2]; + aTo[i2] = p; + } + } + /* + * It may be nice to interrupt the next run. + */ + if (RND(3) > 0) + maxGamma = 0.1 + 0.7 * (RND(1001) / 1000.0); + else + maxGamma = 1.0; + } + + createPoints(); + drawImage(); + aPrev = aCurr; + aCurr = aWork[nWork ^= 1]; + + gam += delta_gam; +} + + + +/************************************************************************** + * * + * P U B L I C F U N C T I O N S * + * * + **************************************************************************/ + +void +screenhack(Display *disp, Window win) +{ + dpy = disp; + window = win; + initLMorph(); + for (;;) { + animateLMorph(); + screenhack_usleep(delay); + } +} diff --git a/hacks/lmorph.man b/hacks/lmorph.man new file mode 100644 index 00000000..a631f24c --- /dev/null +++ b/hacks/lmorph.man @@ -0,0 +1,54 @@ +.TH LMORPH 1 "xscreensaver hack" +.SH NAME +lmorph \- morphing lines +.SH SYNOPSIS +.B lmorph +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-steps \fIint\fP] [\-delay \fIusecs\fP] +.SH DESCRIPTION +The \fIlmorph\fP program morphs between simple linedrawings using bilinear +interpolation. +.SH OPTIONS +.I lmorph +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 \-points \fIinteger\fP +Number of points in each line drawing. Default is 150 points. +.TP 8 +.B \-steps \fIinteger\fP +Interpolation steps from one drawing to the next. Default is 0, which +means a random number between 100 and 500. +.TP 8 +.B \-delay \fImicroseconds\fP +How much of a delay should be introduced between steps of the animation. +Default 50000. +.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 AUTHOR +Sverre H. Huseby and Glenn T. Lines , +built on top of the screen saver routines by Jamie Zawinski . diff --git a/hacks/maze.c b/hacks/maze.c new file mode 100644 index 00000000..22af1d6a --- /dev/null +++ b/hacks/maze.c @@ -0,0 +1,791 @@ +/****************************************************************************** + * [ maze ] ... + * + * modified: [ 8-11-95 ] Ed James + * added fill of dead-end box to solve_maze while loop. + * modified: [ 3-7-93 ] Jamie Zawinski + * added the XRoger logo, cleaned up resources, made + * grid size a parameter. + * modified: [ 3-3-93 ] Jim Randell + * Added the colour stuff and integrated it with jwz's + * screenhack stuff. There's still some work that could + * be done on this, particularly allowing a resource to + * specify how big the squares are. + * modified: [ 10-4-88 ] Richard Hess ...!uunet!cimshop!rhess + * [ Revised primary execution loop within main()... + * [ Extended X event handler, check_events()... + * modified: [ 1-29-88 ] Dave Lemke lemke@sun.com + * [ Hacked for X11... + * [ Note the word "hacked" -- this is extremely ugly, but at + * [ least it does the job. NOT a good programming example + * [ for X. + * original: [ 6/21/85 ] Martin Weiss Sun Microsystems [ SunView ] + * + ****************************************************************************** + Copyright 1988 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + + 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, and that the names of Sun or MIT not be + used in advertising or publicity pertaining to distribution of the + software without specific prior written permission. Sun and M.I.T. + make no representations about the suitability of this software for + any purpose. It is provided "as is" without any express or implied warranty. + + SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT + OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE + OR PERFORMANCE OF THIS SOFTWARE. + *****************************************************************************/ + +#include "screenhack.h" + +#define XROGER + +static int solve_delay, pre_solve_delay, post_solve_delay; + +#include +#include +#include +#ifndef VMS +# include +#else /* VMS */ +# include "sys$common:[decw$include.bitmaps]gray1.xbm" +#endif /* VMS */ + +#define MAX_MAZE_SIZE_X 500 +#define MAX_MAZE_SIZE_Y 500 + +#define MOVE_LIST_SIZE (MAX_MAZE_SIZE_X * MAX_MAZE_SIZE_Y) + +#define WALL_TOP 0x8000 +#define WALL_RIGHT 0x4000 +#define WALL_BOTTOM 0x2000 +#define WALL_LEFT 0x1000 + +#define DOOR_IN_TOP 0x800 +#define DOOR_IN_RIGHT 0x400 +#define DOOR_IN_BOTTOM 0x200 +#define DOOR_IN_LEFT 0x100 +#define DOOR_IN_ANY 0xF00 + +#define DOOR_OUT_TOP 0x80 +#define DOOR_OUT_RIGHT 0x40 +#define DOOR_OUT_BOTTOM 0x20 +#define DOOR_OUT_LEFT 0x10 + +#define START_SQUARE 0x2 +#define END_SQUARE 0x1 + +#define border_x (0) +#define border_y (0) + +#define get_random(x) (random() % (x)) + +static int logo_x, logo_y; + +#ifdef XROGER +# define logo_width 128 +# define logo_height 128 +#else +# include +# define logo_width xlogo64_width +# define logo_height xlogo64_height +# define logo_bits xlogo64_bits +#endif + +static unsigned short maze[MAX_MAZE_SIZE_X][MAX_MAZE_SIZE_Y]; + +static struct { + unsigned char x; + unsigned char y; + unsigned char dir; +} move_list[MOVE_LIST_SIZE], save_path[MOVE_LIST_SIZE], path[MOVE_LIST_SIZE]; + +static int maze_size_x, maze_size_y; +static int sqnum, cur_sq_x, cur_sq_y, path_length; +static int start_x, start_y, start_dir, end_x, end_y, end_dir; +static int grid_width, grid_height; + +static Display *dpy; +static Window win; +static GC gc, cgc, tgc, logo_gc; +static Pixmap logo_map; + +static int x = 0, y = 0, restart = 0, stop = 1, state = 1; + +static int +check_events (void) /* X event handler [ rhess ] */ +{ + XEvent e; + + if (XPending(dpy)) { + XNextEvent(dpy, &e); + switch (e.type) { + + case ButtonPress: + switch (e.xbutton.button) { + case 3: + exit (0); + break; + case 2: + stop = !stop ; + if (state == 5) state = 4 ; + else { + restart = 1; + stop = 0; + } + break; + default: + restart = 1 ; + stop = 0 ; + break; + } + break; + + case ConfigureNotify: + restart = 1; + break; + case UnmapNotify: + stop = 1; + XClearWindow (dpy, win); + XSync (dpy, False); + break; + case Expose: + restart = 1; + break; + } + return(1); + } + return(0); +} + + +static void +set_maze_sizes (int width, int height) +{ + maze_size_x = width / grid_width; + maze_size_y = height / grid_height; +} + + +static void +initialize_maze (void) /* draw the surrounding wall and start/end squares */ +{ + register int i, j, wall; + + /* initialize all squares */ + for ( i=0; i> wall ); + maze[i][j] &= ~( WALL_TOP >> wall ); + cur_sq_x = i; + cur_sq_y = j; + start_x = i; + start_y = j; + start_dir = wall; + sqnum = 0; + + /* set end square */ + wall = (wall + 2)%4; + switch (wall) { + case 0: + i = get_random(maze_size_x); + j = 0; + break; + case 1: + i = maze_size_x - 1; + j = get_random(maze_size_y); + break; + case 2: + i = get_random(maze_size_x); + j = maze_size_y - 1; + break; + case 3: + i = 0; + j = get_random(maze_size_y); + break; + } + maze[i][j] |= END_SQUARE; + maze[i][j] |= ( DOOR_OUT_TOP >> wall ); + maze[i][j] &= ~( WALL_TOP >> wall ); + end_x = i; + end_y = j; + end_dir = wall; + + /* set logo */ + if ((maze_size_x > 15) && (maze_size_y > 15)) + { + int logow = 1 + logo_width / grid_width; + int logoh = 1 + logo_height / grid_height; + /* not closer than 3 grid units from a wall */ + logo_x = get_random (maze_size_x - logow - 6) + 3; + logo_y = get_random (maze_size_y - logoh - 6) + 3; + for (i=0; i> newdoor ); + + switch (newdoor) { + case 0: cur_sq_y--; + break; + case 1: cur_sq_x++; + break; + case 2: cur_sq_y++; + break; + case 3: cur_sq_x--; + break; + } + sqnum++; + + /* mark the in door */ + maze[cur_sq_x][cur_sq_y] |= ( DOOR_IN_TOP >> ((newdoor+2)%4) ); + + /* if end square set path length and save path */ + if ( maze[cur_sq_x][cur_sq_y] & END_SQUARE ) { + path_length = sqnum; + for ( i=0; i> start_dir); + maze[end_x][end_y] |= (WALL_TOP >> end_dir); + + /* initialize search path */ + i = 0; + path[i].x = end_x; + path[i].y = end_y; + path[i].dir = -1; + + /* do it */ + while (1) { + if ( ++path[i].dir >= 4 ) { + XFillRectangle(dpy, win, cgc, + border_x + bw + grid_width * (int)(path[i].x), + border_y + bw + grid_height * (int)(path[i].y), + grid_width - (bw+bw), grid_height - (bw+bw)); + i--; + draw_solid_square( (int)(path[i].x), (int)(path[i].y), + (int)(path[i].dir), cgc); + } + else if ( ! (maze[path[i].x][path[i].y] & + (WALL_TOP >> path[i].dir)) && + ( (i == 0) || ( (path[i].dir != + (int)(path[i-1].dir+2)%4) ) ) ) { + enter_square(i); + i++; + if ( maze[path[i].x][path[i].y] & START_SQUARE ) { + return; + } + } + if (check_events()) return; + /* Abort solve on expose - cheapo repaint strategy */ + if (solve_delay) usleep (solve_delay); + } +} + + +static void +enter_square (int n) /* move into a neighboring square */ +{ + draw_solid_square( (int)path[n].x, (int)path[n].y, + (int)path[n].dir, tgc); + + path[n+1].dir = -1; + switch (path[n].dir) { + case 0: path[n+1].x = path[n].x; + path[n+1].y = path[n].y - 1; + break; + case 1: path[n+1].x = path[n].x + 1; + path[n+1].y = path[n].y; + break; + case 2: path[n+1].x = path[n].x; + path[n+1].y = path[n].y + 1; + break; + case 3: path[n+1].x = path[n].x - 1; + path[n+1].y = path[n].y; + break; + } +} + + +/* + * jmr additions for Jamie Zawinski's screensaver stuff, + * note that the code above this has probably been hacked about in some + * arbitrary way. + */ + +char *progclass = "Maze"; + +char *defaults[] = { + "Maze.background: black", /* to placate SGI */ + "Maze.foreground: white", /* to placate SGI */ + "*gridSize: 0", + "*solveDelay: 5000", + "*preDelay: 2000000", + "*postDelay: 4000000", + "*liveColor: green", + "*deadColor: red", +#ifdef XROGER + "*logoColor: red3", +#endif + 0 +}; + +XrmOptionDescRec options[] = { + { "-grid-size", ".gridSize", XrmoptionSepArg, 0 }, + { "-solve-delay", ".solveDelay", XrmoptionSepArg, 0 }, + { "-pre-delay", ".preDelay", XrmoptionSepArg, 0 }, + { "-post-delay", ".postDelay", XrmoptionSepArg, 0 }, + { "-live-color", ".liveColor", XrmoptionSepArg, 0 }, + { "-dead-color", ".deadColor", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +#ifdef XROGER +extern void skull (Display *, Window, GC, GC, int, int, int, int); +#endif + +void +screenhack(Display *display, Window window) +{ + Pixmap gray; + int size, root; + XWindowAttributes xgwa; + unsigned long bg, fg, pfg, pbg, lfg; + + size = get_integer_resource ("gridSize", "Dimension"); + root = get_boolean_resource("root", "Boolean"); + solve_delay = get_integer_resource ("solveDelay", "Integer"); + pre_solve_delay = get_integer_resource ("preDelay", "Integer"); + post_solve_delay = get_integer_resource ("postDelay", "Integer"); + + if (size < 2) size = 7 + (random () % 30); + grid_width = grid_height = size; + bw = (size > 6 ? 3 : (size-1)/2); + + dpy = display; win = window; /* the maze stuff uses global variables */ + + XGetWindowAttributes (dpy, win, &xgwa); + + x = 0; + y = 0; + + set_maze_sizes (xgwa.width, xgwa.height); + + if (! root) + XSelectInput (dpy, win, ExposureMask|ButtonPressMask|StructureNotifyMask); + + gc = XCreateGC(dpy, win, 0, 0); + cgc = XCreateGC(dpy, win, 0, 0); + tgc = XCreateGC(dpy,win,0,0); + logo_gc = XCreateGC(dpy, win, 0, 0); + + gray = XCreateBitmapFromData (dpy,win,gray1_bits,gray1_width,gray1_height); + + bg = get_pixel_resource ("background","Background", dpy, xgwa.colormap); + fg = get_pixel_resource ("foreground","Foreground", dpy, xgwa.colormap); + lfg = get_pixel_resource ("logoColor", "Foreground", dpy, xgwa.colormap); + pfg = get_pixel_resource ("liveColor", "Foreground", dpy, xgwa.colormap); + pbg = get_pixel_resource ("deadColor", "Foreground", dpy, xgwa.colormap); + if (mono_p) lfg = pfg = fg; + + if (lfg == bg) + lfg = ((bg == WhitePixel (dpy, DefaultScreen (dpy))) + ? BlackPixel (dpy, DefaultScreen (dpy)) + : WhitePixel (dpy, DefaultScreen (dpy))); + + XSetForeground (dpy, gc, fg); + XSetBackground (dpy, gc, bg); + XSetForeground (dpy, cgc, pbg); + XSetBackground (dpy, cgc, bg); + XSetForeground (dpy, tgc, pfg); + XSetBackground (dpy, tgc, bg); + XSetForeground (dpy, logo_gc, lfg); + XSetBackground (dpy, logo_gc, bg); + + XSetStipple (dpy, cgc, gray); + XSetFillStyle (dpy, cgc, FillOpaqueStippled); + +#ifdef XROGER + { + int w, h; + XGCValues gcv; + GC draw_gc, erase_gc; + /* round up to grid size */ + w = ((logo_width / grid_width) + 1) * grid_width; + h = ((logo_height / grid_height) + 1) * grid_height; + logo_map = XCreatePixmap (dpy, win, w, h, 1); + gcv.foreground = 1L; + draw_gc = XCreateGC (dpy, logo_map, GCForeground, &gcv); + gcv.foreground = 0L; + erase_gc= XCreateGC (dpy, logo_map, GCForeground, &gcv); + XFillRectangle (dpy, logo_map, erase_gc, 0, 0, w, h); + skull (dpy, logo_map, draw_gc, erase_gc, 5, 0, w-10, h-10); + XFreeGC (dpy, draw_gc); + XFreeGC (dpy, erase_gc); + } +#else + if (!(logo_map = XCreateBitmapFromData (dpy, win, logo_bits, + logo_width, logo_height))) + { + fprintf (stderr, "Can't create logo pixmap\n"); + exit (1); + } +#endif + XMapRaised(dpy, win); + srandom(getpid()); + + restart = root; + + while (1) { /* primary execution loop [ rhess ] */ + if (check_events()) continue ; + if (restart || stop) goto pop; + switch (state) { + case 1: + initialize_maze(); + break; + case 2: + XClearWindow(dpy, win); + draw_maze_border(); + break; + case 3: + create_maze(); + break; + case 4: + XSync (dpy, False); + usleep (pre_solve_delay); + break; + case 5: + solve_maze(); + break; + case 6: + XSync (dpy, False); + usleep (post_solve_delay); + state = 0 ; + break; + default: + abort (); + } + ++state; + pop: + if (restart) + { + static XWindowAttributes wattr; + restart = 0; + stop = 0; + state = 1; + XGetWindowAttributes (dpy, win, &wattr); + set_maze_sizes (wattr.width, wattr.height); + XClearWindow (dpy, win); + XSync (dpy, False); + } + } +} diff --git a/hacks/maze.man b/hacks/maze.man new file mode 100644 index 00000000..f93a70f4 --- /dev/null +++ b/hacks/maze.man @@ -0,0 +1,107 @@ +.TH XScreenSaver 1 "7-mar-93" "X Version 11" +.SH NAME +maze \- an automated X11 demo repeatedly creating and solving a random maze +.SH SYNOPSIS +.B maze +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-grid\-size \fIpixels\fP] [\-live\-color \fIcolor\fP] [\-dead\-color \fIcolor\fP] [\-solve\-delay \fIusecs\fP] [\-pre\-delay \fIusecs\fP] [\-post\-delay \fIusecs\fP] +.SH DESCRIPTION +The \fImaze\fP program creates a "random" maze and then solves it with +graphical feedback. +.SH OPTIONS +.I maze +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 \-grid\-size \fIpixels\fP +The size of each block of the maze, in pixels; default is 0, meaning +pick a random grid size. +.TP 8 +.B \-live\-color \fIcolor\fP +The color of the path. +.TP 8 +.B \-dead\-color \fIcolor\fP +The color of the failed path (it is also stippled with a 50% pattern.) +.TP 8 +.B \-solve\-delay \fIinteger\fP +Delay (in microseconds) between each step of the solution path. +Default 5000, or about 1/200th second. +.TP 8 +.B \-pre\-delay \fIinteger\fP +Delay (in microseconds) between generating a maze and starting to solve it. +Default 2000000 (2 seconds.) +.TP 8 +.B \-post\-delay \fIinteger\fP +Delay (in microseconds) after solving a maze and before generating a new one. +Default 4000000 (4 seconds.) +.PP +Clicking the mouse in the maze window controls it. +.TP 16 +.B "LeftButton +Clears the window and restarts maze. +.TP 16 +.B MiddleButton +Pause or unpause the program. +.TP 16 +.B RightButton +Exit. +.SH BUGS +Expose events force a restart of maze. + +Mouse actions are based on "raw" values (Button1, Button2 and Button3) +instead of using the pointer map. +.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 +.PP +Copyright \(co 1988 by Sun Microsystems, Inc. Mountain View, CA. +.PP +All Rights Reserved +.PP +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, and that +the names of Sun or MIT not be used in advertising or publicity pertaining to +distribution of the software without specific prior written permission. Sun +and M.I.T. make no representations about the suitability of this software for +any purpose. It is provided "as is" without any express or implied warranty. +.PP +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN +NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.SH AUTHOR(s) +.nf +Jim Randell [ XScreenSaver version ] jmr@mddjmr.fc.hp.com + HPLabs, Bristol +Richard Hess [ X11 extensions ] {...}!uunet!cimshop!rhess + Consilium, Mountain View, CA +Dave Lemke [ X11 version ] lemke@sun.COM + Sun MicroSystems, Mountain View, CA +Martin Weiss [ SunView version ] + Sun MicroSystems, Mountain View, CA +.fi diff --git a/hacks/moire.c b/hacks/moire.c new file mode 100644 index 00000000..7d9798c2 --- /dev/null +++ b/hacks/moire.c @@ -0,0 +1,193 @@ +/* xscreensaver, Copyright (c) 1997 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. + * + * Concept snarfed from Michael D. Bayne in + * http://www.go2net.com/internet/deep/1997/04/16/body.html + */ + +#include "screenhack.h" +#include +#include + +int offset = 0; +XColor *colors = 0; +int ncolors = 0; +GC gc = 0; +unsigned long fg_pixel = 0; +unsigned long bg_pixel = 0; + +static void +init_moire (Display *dpy, Window window) +{ + int oncolors; + int i; + int fgh, bgh; + double fgs, fgv, bgs, bgv; + XWindowAttributes xgwa; + XColor fgc, bgc; + XGCValues gcv; + XGetWindowAttributes (dpy, window, &xgwa); + + offset = get_integer_resource ("offset", "Integer"); + if (offset < 2) offset = 2; + + MONO: + if (colors) + { + for (i = 0; i < ncolors; i++) + XFreeColors (dpy, xgwa.colormap, &colors[i].pixel, 1, 0); + free(colors); + colors = 0; + } + + if (mono_p) + { + fg_pixel = WhitePixelOfScreen (DefaultScreenOfDisplay(dpy)); + bg_pixel = BlackPixelOfScreen (DefaultScreenOfDisplay(dpy)); + } + else + { + fg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, + xgwa.colormap); + bg_pixel = get_pixel_resource ("background", "Background", dpy, + xgwa.colormap); + } + + if (mono_p) + { + offset *= 20; /* compensate for lack of shading */ + gcv.foreground = fg_pixel; + } + else + { + ncolors = get_integer_resource ("ncolors", "Integer"); + if (ncolors < 2) ncolors = 2; + oncolors = ncolors; + + fgc.flags = bgc.flags = DoRed|DoGreen|DoBlue; + if (get_boolean_resource("random","Boolean")) + { + fgc.red = random() & 0xFFFF; + fgc.green = random() & 0xFFFF; + fgc.blue = random() & 0xFFFF; + bgc.red = random() & 0xFFFF; + bgc.green = random() & 0xFFFF; + bgc.blue = random() & 0xFFFF; + } + else + { + fgc.pixel = fg_pixel; + bgc.pixel = bg_pixel; + XQueryColor (dpy, xgwa.colormap, &fgc); + XQueryColor (dpy, xgwa.colormap, &bgc); + } + rgb_to_hsv (fgc.red, fgc.green, fgc.blue, &fgh, &fgs, &fgv); + rgb_to_hsv (bgc.red, bgc.green, bgc.blue, &bgh, &bgs, &bgv); + + colors = (XColor *) malloc (sizeof (XColor) * (ncolors+2)); + memset(colors, 0, (sizeof (XColor) * (ncolors+2))); + make_color_ramp (dpy, xgwa.colormap, + fgh, fgs, fgv, bgh, bgs, bgv, + colors, &ncolors, + True, True, False); + if (ncolors != oncolors) + fprintf(stderr, "%s: got %d of %d requested colors.\n", + progname, ncolors, oncolors); + + if (ncolors <= 2) + { + mono_p = True; + goto MONO; + } + + gcv.foreground = colors[0].pixel; + } + gc = XCreateGC (dpy, window, GCForeground, &gcv); +} + + +static void +moire (Display *dpy, Window window, int offset, XColor *colors, int ncolors) +{ + long x, y, xo, yo; + int factor = (random() % offset) + 1; + XGCValues gcv; + XWindowAttributes xgwa; + XImage *image; + int depth; + XGetWindowAttributes (dpy, window, &xgwa); + + xo = (random() % xgwa.width) - xgwa.width/2; + yo = (random() % xgwa.height) - xgwa.height/2; + + depth = visual_depth(DefaultScreenOfDisplay(dpy), xgwa.visual); + image = XCreateImage (dpy, xgwa.visual, + depth, ZPixmap, 0, /* depth, format, offset */ + 0, xgwa.width, 1, 8, 0); /* data, w, h, pad, bpl */ + + image->data = (char *) malloc (((xgwa.width + 1) * depth / 8) + * 2 /* uh, I dunno... */ + ); + + for (y = 0; y < xgwa.height; y++) + { + for (x = 0; x < xgwa.width; x++) + { + double xx = x + xo; + double yy = y + yo; + double i = ((xx * xx) + (yy * yy)) / (double) factor; + if (mono_p) + gcv.foreground = ((((long) i) & 1) ? fg_pixel : bg_pixel); + else + gcv.foreground = colors[((long) i) % ncolors].pixel; + XPutPixel (image, x, 0, gcv.foreground); + } + XPutImage (dpy, window, gc, image, 0, 0, 0, y, xgwa.width, 1); + XSync(dpy, False); + } + if (image->data) free(image->data); + image->data = 0; + XDestroyImage (image); +} + + +char *progclass = "Moire"; + +char *defaults [] = { + "Moire.background: blue", /* to placate SGI */ + "Moire.foreground: red", + "*random: true", + "*delay: 5", + "*ncolors: 64", + "*offset: 50", + 0 +}; + +XrmOptionDescRec options [] = { + { "-random", ".random", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-ncolors", ".ncolors", XrmoptionSepArg, 0 }, + { "-offset", ".offset", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + int delay = get_integer_resource ("delay", "Integer"); + while (1) + { + init_moire (dpy, window); + moire (dpy, window, offset, colors, ncolors); + XSync (dpy, True); + if (delay) + sleep(delay); + } +} diff --git a/hacks/moire.man b/hacks/moire.man new file mode 100644 index 00000000..4304710d --- /dev/null +++ b/hacks/moire.man @@ -0,0 +1,64 @@ +.TH XScreenSaver 1 "27-Apr-97" "X Version 11" +.SH NAME +halo - draw circular interference patterns +.SH SYNOPSIS +.B halo +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-random \fIboolean\fP] [\-ncolors \fIint\fP] [\-offset \fIint\fP] +.SH DESCRIPTION +The \fImoire\fP program draws cool circular interference patterns. +.SH OPTIONS +.I moire +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 \-delay \fIseconds\fP +How long to wait before starting over. Default 5 seconds. +.TP 8 +.B \-random \fIboolean\fP +Whether to ignore the foreground/background colors, and pick them randomly +instead. +.TP 8 +.B \-offset \fIinteger\fP +The maximum random radius increment to use. +.TP 8 +.B \-ncolors \fIinteger\fP +How many colors should be allocated in the color ramp (note that this +value interacts with \fIoffset\fP.) +.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 , 27-Apr-97, based on code by +Michael D. Bayne . diff --git a/hacks/munch.c b/hacks/munch.c new file mode 100644 index 00000000..d1f2ea6b --- /dev/null +++ b/hacks/munch.c @@ -0,0 +1,256 @@ +/* munch.c + * A munching squares implementation for X + * Tim Showalter + * + * Copyright 1997, Tim Showalter + * Permission is granted to copy, modify, and use this as long + * as this notice remains intact. No warranties are expressed or implied. + * CMU Sucks. + * + * Some code stolen from / This is meant to work with + * xscreensaver, Copyright (c) 1992, 1995, 1996 + * 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. + */ + +/* Munching Squares is this simplistic, silly screen hack (according + to HAKMEM, discovered by Jackson Wright in 1962) where you take + Y = X XOR T and graph it over and over. According to HAKMEM, it + takes 5 instructions of PDP-1 assembly. This is a little more + complicated than that, mostly X's fault, but it does some other + random things. + + http://www.inwap.com/pdp10/hbaker/hakmem/hacks.html#item146 + */ + +#include +/*#include */ +#include "screenhack.h" + +/* flags for random things. Must be < log2(random's maximum), incidentially. + */ +#define SHIFT_KX (0x01) +#define SHIFT_KT (0x02) +#define SHIFT_KY (0x04) +#define GRAV (0x08) + +char *progclass = "Munch"; + +char *defaults [] = { + "Munch.background: black", /* to placate SGI */ + "Munch.foreground: white", + "*delay: 5000", + "*hold: 100000", + "*clear: 50", + "*logminwidth: 7", + "*shift: True", + "*xor: True", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-hold", ".hold", XrmoptionSepArg, 0 }, + { "-clear", ".clear", XrmoptionSepArg, "true" }, + { "-shift", ".shift", XrmoptionNoArg, "true" }, + { "-no-shift", ".shift", XrmoptionNoArg, "false" }, + { "-logminwidth", ".logminwidth", XrmoptionSepArg, 0 }, + { "-xor", ".xor", XrmoptionNoArg, "true" }, + { "-no-xor", ".xor", XrmoptionNoArg, "false" }, + { 0, 0, 0, 0 } +}; + + +static GC gc; +/* only configurable things right now */ +static int delay, hold, clear, logminwidth, shiftk, xor; + +static void munchOnce (Display* dpy, Window w, + int width, /* pixels */ + int atX, int atY, /* pixels */ + int kX, int kT, int kY, /* pixels */ + int grav /* 0 or not */) { + + int x, y, t; + static Colormap cmap; + XWindowAttributes xgwa; + XColor fgc; + int drawX, drawY; + + /* + fprintf(stderr,"Doing width %d at %d %d shift %d %d %d grav %d\n", + width, atX, atY, kX, kT, kY, grav); + */ + + XGetWindowAttributes (dpy, w, &xgwa); + + if (!mono_p) { + /* XXX there are probably bugs with this. */ + cmap = xgwa.colormap; + + fgc.red = random() % 65535; + fgc.green = random() % 65535; + fgc.blue = random() % 65535; + + if (XAllocColor(dpy, cmap, &fgc)) { + XSetForeground(dpy, gc, fgc.pixel); + } + } + + /* Finally draw this munching square. */ + for(t = 0; t < width; t++) { + for(x = 0; x < width; x++) { + /* figure out the next point */ + y = ((x ^ ((t + kT) % width)) + kY) % width; + + drawX = ((x + kX) % width) + atX; + drawY = (grav ? y + atY : atY + width - 1 - y); + + /* used to be bugs where it would draw partially offscreen. + while that might be a pretty feature, I didn't want it to do + that yet. if these trigger, please let me know. + */ +/* assert(drawX >= 0 && drawX < xgwa.width); + assert(drawY >= 0 && drawY < xgwa.height); +*/ + + XDrawPoint(dpy, w, gc, drawX, drawY); + /* XXX may want to change this to XDrawPoints, + but it's fast enough without it for the moment. */ + + } + + /* we've drawn one pass' worth of points. let the server catch up + or this won't be interesting to watch at all. we call this here + in the hopes of having one whole sequence of dots appear at the + same time (one for each value of x, surprisingly enough) + */ + XSync(dpy, False); + if (delay) usleep(delay); + } +} + +/* + * dumb way to get # of digits in number. Probably faster than actually + * doing a log and a division, maybe. + */ +static int dumb_log_2(int k) { + int r = -1; + while (k > 0) { + k >>= 1; r++; + } + return r; +} + +/* This parses arguments, initializes the window, etc., and finally starts + * calling munchOnce ad infinitum. + */ +void +screenhack (dpy, w) Display *dpy; Window w; +{ + int logmaxwidth; + int maxwidth; + XWindowAttributes xgwa; + Colormap cmap; + XGCValues gcv; + int n = 0; /* number of squares before we have to clear */ + int randflags; + int thiswidth; + + /* get the dimensions of the window */ + XGetWindowAttributes (dpy, w, &xgwa); + + /* We need a square; limit on screen size? */ + /* we want a power of 2 for the width or the munch doesn't fill up. + */ + logmaxwidth = (int) + dumb_log_2(xgwa.height < xgwa.width ? xgwa.height : xgwa.width); + + maxwidth = 1 << logmaxwidth; + + if (logmaxwidth < logminwidth) { + /* off-by-one error here? Anyone running on < 640x480? */ + fprintf(stderr, "munch: screen too small; use -logminwidth\n"); + fprintf(stderr, "\t(width is %d; log is %d; log must be at least " + "%d)\n", + (xgwa.height < xgwa.width ? xgwa.height : xgwa.width), + logmaxwidth, logminwidth); + exit(0); + } + + /* create the gc */ + cmap = xgwa.colormap; + gcv.foreground= get_pixel_resource("foreground","Foreground", + dpy, cmap); + gcv.background= get_pixel_resource("background","Background", + dpy, cmap); + + gc = XCreateGC(dpy, w, GCForeground|GCBackground, &gcv); + + delay = get_integer_resource ("delay", "Integer"); + if (delay < 0) delay = 0; + + hold = get_integer_resource ("hold", "Integer"); + if (hold < 0) hold = 0; + + clear = get_integer_resource ("clear", "Integer"); + if (clear < 0) clear = 0; + + logminwidth = get_integer_resource ("logminwidth", "Integer"); + if (logminwidth < 2) logminwidth = 2; + + shiftk = get_boolean_resource("shift", "Boolean"); + + xor = get_boolean_resource("xor", "Boolean"); + + /* always draw xor on mono. */ + if (mono_p || xor) { + XSetFunction(dpy, gc, GXxor); + } + + for(;;) { + /* saves some calls to random. big deal */ + randflags = random(); + + /* choose size -- power of two */ + thiswidth = 1 << (logminwidth + + (random() % (1 + logmaxwidth - logminwidth))); + + munchOnce(dpy, w, + thiswidth, /* Width, in pixels */ + + /* draw at this location */ + (random() % (xgwa.width <= thiswidth ? 1 + : xgwa.width - thiswidth)), + (random() % (xgwa.height <= thiswidth ? 1 + : xgwa.width - thiswidth)), + + /* wrap-around by these values; no need to % + as we end up doing that later anyway*/ + ((shiftk && (randflags & SHIFT_KX)) + ? (random() % thiswidth) : 0), + ((shiftk && (randflags & SHIFT_KT)) + ? (random() % thiswidth) : 0), + ((shiftk && (randflags & SHIFT_KY)) + ? (random() % thiswidth) : 0), + + /* set the gravity of the munch, or rather, + which direction we draw stuff in. */ + (randflags & GRAV) + ); + + if (hold) usleep(hold); + + if (clear && ++n >= clear) { + XClearWindow(dpy, w); + n = 0; + } + } +} diff --git a/hacks/munch.man b/hacks/munch.man new file mode 100644 index 00000000..87721c02 --- /dev/null +++ b/hacks/munch.man @@ -0,0 +1,133 @@ +..de EX \"Begin example +.ne 5 +.if n .sp 1 +.if t .sp .5 +.nf +.in +.5i +.. +.de EE +.fi +.in -.5i +.if n .sp 1 +.if t .sp .5 +.. +.TH XScreenSaver 1 "17-Jun-97" "X Version 11" +.SH NAME +munch - munching squares screen hack +.SH SYNOPSIS +.B deco +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] +[\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] +[\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-xor] [\-noxor] [\-shift] +[\-noshift] [\-logminwidth \fIminimum width\fP] +.SH DESCRIPTION +The +.I munch +program preforms the munching squares hack until killed. It picks square +size, position, and gravity randomly; configurable options are listed +below. +.PP +The munching squares hack cosists of drawing Y = X XOR T for a range of X +and T over and over until all the possible combinations of X and T have +come up. It was reportedly discovered by Jackson Wright in 1962 and took 5 +instructions of PDP-6 code. +.SH OPTIONS +.I munch +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 \-delay \fIseconds\fP +How long to wait before starting over. Default 5 seconds. +.TP 8 +.B \-xor +Use the XOR drawing function. (Default.) +.TP 8 +.B \-no\-xor +Don't use the XOR drawing function. +.TP 8 +.B \-shift +Start drawing the square at weird starting points. (Default.) +.TP 8 +.B \-no\-shift +Don't shift and start drawing the square at weird starting points. +.TP 8 +.B \-logminwidth \fIminimum\-width\fP +The logarithm (base 2) of the minimum with of a square (must be a power of +2, or some parts of the square aren't.) +.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 http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html, +.BR http://www.comedia.com/Hot/jargon_3.0/JARGON_M/MUNCHSQR.HTML +.SH HISTORY +Quoted from HAKMEM, for historical interest. As that document says, "Unless +otherwise stated, all computer programs are in PDP-6/10 assembly language." +.TP 8 +ITEM 146: MUNCHING SQUARES +Another simple display program. It is thought that this was discovered by +Jackson Wright on the RLE PDP-1 circa 1962. + +.EX + DATAI 2 + ADDB 1,2 + ROTC 2,-22 + XOR 1,2 + JRST .-4 +.EE +.RS 8 +2=X, 3=Y. Try things like 1001002 in data switches. This also does +interesting things with operations other than XOR, and rotations other +than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT -14, -9, -20, ...) +.RE +.TP 8 +ITEM 147 (Schroeppel): +Munching squares is just views of the graph Y = X XOR T for consecutive +values of T = time. +.TP 8 +ITEM 148 (Cohen, Beeler): +A modification to munching squares which reveals them in frozen states +through opening and closing curtains: insert FADR 2,1 before the XOR. Try +data switches = + +.EX + 4000,,4 1000,,2002 2000,,4 0,,1002 +.EE +.RS 8 +(Notation: ,,) + +Also try the FADR after the XOR, switches = 1001,,1. +.SH COPYRIGHT +Copyright \(co 1997 by Tim Showalter. 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 +Tim Showalter , 17-Jun-97, based on what's in the +Jargon File and stealing stuff from existing xscreensaver modules. diff --git a/hacks/noseguy.c b/hacks/noseguy.c new file mode 100644 index 00000000..a84ee6b6 --- /dev/null +++ b/hacks/noseguy.c @@ -0,0 +1,720 @@ +/* xscreensaver, Copyright (c) 1992, 1996, 1997 + * 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. + */ + +/* Make a little guy with a big nose and a hat wanter around the screen, + spewing out messages. Derived from xnlock by Dan Heller . + */ + +#include "screenhack.h" +#include + +extern FILE *popen (const char *, const char *); +extern int pclose (FILE *); + +#define font_height(font) (font->ascent + font->descent) +#define FONT_NAME "-*-times-*-*-*-*-18-*-*-*-*-*-*-*" + +static Display *dpy; +static Window window; +static int Width, Height; +static GC fg_gc, bg_gc, text_fg_gc, text_bg_gc; +static char *words; +static char *get_words (void); +static int x, y; +static XFontStruct *font; +static char *def_words = "I'm out running around."; +static void walk (int dir); +static void talk (int erase); +static void talk_1 (void); +static int think (void); +static unsigned long interval; +static unsigned long look (void); +static Pixmap left1, left2, right1, right2; +static Pixmap left_front, right_front, front, down; + +static char *program, *orig_program, *filename, *text; + +#define FROM_ARGV 1 +#define FROM_PROGRAM 2 +#define FROM_FILE 3 +#define FROM_RESRC 4 +static int getwordsfrom; + +#define IS_MOVING 1 +#define GET_PASSWD 2 +static int state; /* indicates states: walking or getting passwd */ + +static void (*next_fn) (void); + +#ifdef HAVE_XPM +# include + +# include "noses/nose-f1.xpm" +# include "noses/nose-f2.xpm" +# include "noses/nose-f3.xpm" +# include "noses/nose-f4.xpm" +# include "noses/nose-l1.xpm" +# include "noses/nose-l2.xpm" +# include "noses/nose-r1.xpm" +# include "noses/nose-r2.xpm" +#else +# include "noses/nose-f1.xbm" +# include "noses/nose-f2.xbm" +# include "noses/nose-f3.xbm" +# include "noses/nose-f4.xbm" +# include "noses/nose-l1.xbm" +# include "noses/nose-l2.xbm" +# include "noses/nose-r1.xbm" +# include "noses/nose-r2.xbm" +#endif + +static void +init_images (void) +{ + static Pixmap *images[] = { + &left1, &left2, &right1, &right2, + &left_front, &right_front, &front, &down + }; + int i; +#ifdef HAVE_XPM + static char **bits[] = { + nose_l1_xpm, nose_l2_xpm, nose_r1_xpm, nose_r2_xpm, + nose_f2_xpm, nose_f3_xpm, nose_f1_xpm, nose_f4_xpm + }; + for (i = 0; i < sizeof (images) / sizeof(*images); i++) + { + XWindowAttributes xgwa; + XpmAttributes xpmattrs; + Pixmap pixmap = 0; + int result; + xpmattrs.valuemask = 0; + + XGetWindowAttributes (dpy, window, &xgwa); + +# ifdef XpmCloseness + xpmattrs.valuemask |= XpmCloseness; + xpmattrs.closeness = 40000; +# endif +# ifdef XpmVisual + xpmattrs.valuemask |= XpmVisual; + xpmattrs.visual = xgwa.visual; +# endif +# ifdef XpmDepth + xpmattrs.valuemask |= XpmDepth; + xpmattrs.depth = xgwa.depth; +# endif +# ifdef XpmColormap + xpmattrs.valuemask |= XpmColormap; + xpmattrs.colormap = xgwa.colormap; +# endif + + result = XpmCreatePixmapFromData(dpy, window, bits[i], + &pixmap, 0 /* mask */, &xpmattrs); + if (!pixmap || (result != XpmSuccess && result != XpmColorError)) + { + fprintf (stderr, "%s: Can't load nose images\n", progname); + exit (1); + } + *images[i] = pixmap; + } +#else + static unsigned char *bits[] = { + nose_l1_bits, nose_l2_bits, nose_r1_bits, nose_r2_bits, + nose_f2_bits, nose_f3_bits, nose_f1_bits, nose_f4_bits + }; + + for (i = 0; i < sizeof (images) / sizeof(*images); i++) + if (!(*images[i] = + XCreatePixmapFromBitmapData(dpy, window, + (char *) bits[i], 64, 64, 1, 0, 1))) + { + fprintf (stderr, "%s: Can't load nose images\n", progname); + exit (1); + } +#endif +} + +#define LEFT 001 +#define RIGHT 002 +#define DOWN 004 +#define UP 010 +#define FRONT 020 +#define X_INCR 3 +#define Y_INCR 2 + +static void +move (void) +{ + static int length, + dir; + + if (!length) + { + register int tries = 0; + dir = 0; + if ((random() & 1) && think()) + { + talk(0); /* sets timeout to itself */ + return; + } + if (!(random() % 3) && (interval = look())) + { + next_fn = move; + return; + } + interval = 20 + random() % 100; + do + { + if (!tries) + length = Width / 100 + random() % 90, tries = 8; + else + tries--; + switch (random() % 8) + { + case 0: + if (x - X_INCR * length >= 5) + dir = LEFT; + break; + case 1: + if (x + X_INCR * length <= Width - 70) + dir = RIGHT; + break; + case 2: + if (y - (Y_INCR * length) >= 5) + dir = UP, interval = 40; + break; + case 3: + if (y + Y_INCR * length <= Height - 70) + dir = DOWN, interval = 20; + break; + case 4: + if (x - X_INCR * length >= 5 && y - (Y_INCR * length) >= 5) + dir = (LEFT | UP); + break; + case 5: + if (x + X_INCR * length <= Width - 70 && + y - Y_INCR * length >= 5) + dir = (RIGHT | UP); + break; + case 6: + if (x - X_INCR * length >= 5 && + y + Y_INCR * length <= Height - 70) + dir = (LEFT | DOWN); + break; + case 7: + if (x + X_INCR * length <= Width - 70 && + y + Y_INCR * length <= Height - 70) + dir = (RIGHT | DOWN); + break; + default: + /* No Defaults */ + break; + } + } while (!dir); + } + walk(dir); + --length; + next_fn = move; +} + +#ifdef HAVE_XPM +# define COPY(dpy,frame,window,gc,x,y,w,h,x2,y2) \ + XCopyArea (dpy,frame,window,gc,x,y,w,h,x2,y2) +#else +# define COPY(dpy,frame,window,gc,x,y,w,h,x2,y2) \ + XCopyPlane(dpy,frame,window,gc,x,y,w,h,x2,y2,1L) +#endif + +static void +walk(int dir) +{ + register int incr = 0; + static int lastdir; + static int up = 1; + static Pixmap frame; + + if (dir & (LEFT | RIGHT)) + { /* left/right movement (mabye up/down too) */ + up = -up; /* bouncing effect (even if hit a wall) */ + if (dir & LEFT) + { + incr = X_INCR; + frame = (up < 0) ? left1 : left2; + } + else + { + incr = -X_INCR; + frame = (up < 0) ? right1 : right2; + } + if ((lastdir == FRONT || lastdir == DOWN) && dir & UP) + { + + /* + * workaround silly bug that leaves screen dust when guy is + * facing forward or down and moves up-left/right. + */ + COPY(dpy, frame, window, fg_gc, 0, 0, 64, 64, x, y); + XFlush(dpy); + } + /* note that maybe neither UP nor DOWN is set! */ + if (dir & UP && y > Y_INCR) + y -= Y_INCR; + else if (dir & DOWN && y < Height - 64) + y += Y_INCR; + } + /* Explicit up/down movement only (no left/right) */ + else if (dir == UP) + COPY(dpy, front, window, fg_gc, 0, 0, 64, 64, x, y -= Y_INCR); + else if (dir == DOWN) + COPY(dpy, down, window, fg_gc, 0, 0, 64, 64, x, y += Y_INCR); + else if (dir == FRONT && frame != front) + { + if (up > 0) + up = -up; + if (lastdir & LEFT) + frame = left_front; + else if (lastdir & RIGHT) + frame = right_front; + else + frame = front; + COPY(dpy, frame, window, fg_gc, 0, 0, 64, 64, x, y); + } + if (dir & LEFT) + while (--incr >= 0) + { + COPY(dpy, frame, window, fg_gc, 0, 0, 64, 64, --x, y + up); + XFlush(dpy); + } + else if (dir & RIGHT) + while (++incr <= 0) + { + COPY(dpy, frame, window, fg_gc, 0, 0, 64, 64, ++x, y + up); + XFlush(dpy); + } + lastdir = dir; +} + +static int +think (void) +{ + if (random() & 1) + walk(FRONT); + if (random() & 1) + { + if (getwordsfrom == FROM_PROGRAM) + words = get_words(); + return 1; + } + return 0; +} + +#define MAXLINES 40 + +static void +talk(int force_erase) +{ + int width = 0, + height, + Z, + total = 0; + static int X, + Y, + talking; + static struct + { + int x, + y, + width, + height; + } s_rect; + register char *p, + *p2; + char buf[BUFSIZ], + args[MAXLINES][256]; + + /* clear what we've written */ + if (talking || force_erase) + { + if (!talking) + return; + XFillRectangle(dpy, window, bg_gc, s_rect.x - 5, s_rect.y - 5, + s_rect.width + 10, s_rect.height + 10); + talking = 0; + if (!force_erase) + next_fn = move; + interval = 0; + { + /* might as well check the window for size changes now... */ + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + Width = xgwa.width + 2; + Height = xgwa.height + 2; + } + return; + } + talking = 1; + walk(FRONT); + p = strcpy(buf, words); + + if (!(p2 = strchr(p, '\n')) || !p2[1]) + { + total = strlen (words); + strcpy (args[0], words); + width = XTextWidth(font, words, total); + height = 0; + } + else + /* p2 now points to the first '\n' */ + for (height = 0; p; height++) + { + int w; + *p2 = 0; + if ((w = XTextWidth(font, p, p2 - p)) > width) + width = w; + total += p2 - p; /* total chars; count to determine reading + * time */ + (void) strcpy(args[height], p); + if (height == MAXLINES - 1) + { + puts("Message too long!"); + break; + } + p = p2 + 1; + if (!(p2 = strchr(p, '\n'))) + break; + } + height++; + + /* + * Figure out the height and width in pixels (height, width) extend the + * new box by 15 pixels on the sides (30 total) top and bottom. + */ + s_rect.width = width + 30; + s_rect.height = height * font_height(font) + 30; + if (x - s_rect.width - 10 < 5) + s_rect.x = 5; + else if ((s_rect.x = x + 32 - (s_rect.width + 15) / 2) + + s_rect.width + 15 > Width - 5) + s_rect.x = Width - 15 - s_rect.width; + if (y - s_rect.height - 10 < 5) + s_rect.y = y + 64 + 5; + else + s_rect.y = y - 5 - s_rect.height; + + XFillRectangle(dpy, window, text_bg_gc, + s_rect.x, s_rect.y, s_rect.width, s_rect.height); + + /* make a box that's 5 pixels thick. Then add a thin box inside it */ + XSetLineAttributes(dpy, text_fg_gc, 5, 0, 0, 0); + XDrawRectangle(dpy, window, text_fg_gc, + s_rect.x, s_rect.y, s_rect.width - 1, s_rect.height - 1); + XSetLineAttributes(dpy, text_fg_gc, 0, 0, 0, 0); + XDrawRectangle(dpy, window, text_fg_gc, + s_rect.x + 7, s_rect.y + 7, s_rect.width - 15, s_rect.height - 15); + + X = 15; + Y = 15 + font_height(font); + + /* now print each string in reverse order (start at bottom of box) */ + for (Z = 0; Z < height; Z++) + { + XDrawString(dpy, window, text_fg_gc, s_rect.x + X, s_rect.y + Y, + args[Z], strlen(args[Z])); + Y += font_height(font); + } + interval = (total / 15) * 1000; + if (interval < 2000) interval = 2000; + next_fn = talk_1; +} + +static void talk_1 (void) +{ + talk(0); +} + + +static unsigned long +look (void) +{ + if (random() % 3) + { + COPY(dpy, (random() & 1) ? down : front, window, fg_gc, + 0, 0, 64, 64, x, y); + return 1000L; + } + if (!(random() % 5)) + return 0; + if (random() % 3) + { + COPY(dpy, (random() & 1) ? left_front : right_front, + window, fg_gc, 0, 0, 64, 64, x, y); + return 1000L; + } + if (!(random() % 5)) + return 0; + COPY(dpy, (random() & 1) ? left1 : right1, window, fg_gc, + 0, 0, 64, 64, x, y); + return 1000L; +} + + +static void +init_words (void) +{ + char *mode = get_string_resource ("mode", "Mode"); + + program = get_string_resource ("program", "Program"); + filename = get_string_resource ("filename", "Filename"); + text = get_string_resource ("text", "Text"); + + if (program) /* get stderr on stdout, so it shows up on the window */ + { + orig_program = program; + program = (char *) malloc (strlen (program) + 10); + strcpy (program, "( "); + strcat (program, orig_program); + strcat (program, " ) 2>&1"); + } + + if (!mode || !strcmp (mode, "program")) + getwordsfrom = FROM_PROGRAM; + else if (!strcmp (mode, "file")) + getwordsfrom = FROM_FILE; + else if (!strcmp (mode, "string")) + getwordsfrom = FROM_RESRC; + else + { + fprintf (stderr, + "%s: mode must be program, file, or string, not %s\n", + progname, mode); + exit (1); + } + + if (getwordsfrom == FROM_PROGRAM && !program) + { + fprintf (stderr, "%s: no program specified.\n", progname); + exit (1); + } + if (getwordsfrom == FROM_FILE && !filename) + { + fprintf (stderr, "%s: no file specified.\n", progname); + exit (1); + } + + words = get_words(); +} + +static int first_time = 1; + +static char * +get_words (void) +{ + FILE *pp; + static char buf[BUFSIZ]; + register char *p = buf; + + buf[0] = '\0'; + + switch (getwordsfrom) + { + case FROM_PROGRAM: +#ifndef VMS + if ((pp = popen(program, "r"))) + { + while (fgets(p, sizeof(buf) - strlen(buf), pp)) + { + if (strlen(buf) + 1 < sizeof(buf)) + p = buf + strlen(buf); + else + break; + } + (void) pclose(pp); + if (! buf[0]) + sprintf (buf, "\"%s\" produced no output!", orig_program); + else if (!first_time && + (strstr (buf, ": not found") || + strstr (buf, ": Not found"))) + switch (random () % 20) + { + case 1: strcat (buf, "( Get with the program, bub. )\n"); + break; + case 2: strcat (buf, + "( I blow my nose at you, you silly person! ) \n"); break; + case 3: strcat (buf, + "\nThe resource you want to\nset is `noseguy.program'\n"); + break; + case 4: + strcat(buf,"\nHelp!! Help!!\nAAAAAAGGGGHHH!! \n\n"); break; + case 5: strcpy (buf, "You have new mail.\n"); break; + case 6: + strcat(buf,"( Hello? Are you paying attention? )\n");break; + case 7: + strcat (buf, "sh: what kind of fool do you take me for? \n"); + break; + } + first_time = 0; + p = buf; + } + else + { + perror(program); + p = def_words; + } + break; +#endif /* VMS */ + case FROM_FILE: + if ((pp = fopen(filename, "r"))) + { + while (fgets(p, sizeof(buf) - strlen(buf), pp)) + { + if (strlen(buf) + 1 < sizeof(buf)) + p = buf + strlen(buf); + else + break; + } + (void) fclose(pp); + if (! buf[0]) + sprintf (buf, "file \"%s\" is empty!", filename); + p = buf; + } + else + { + sprintf (buf, "couldn't read file \"%s\"!", filename); + p = buf; + } + break; + case FROM_RESRC: + p = text; + break; + default: + p = def_words; + break; + } + + if (!p || *p == '\0') + p = def_words; + return p; +} + + + +char *progclass = "Noseguy"; + +char *defaults [] = { + "Noseguy.background: black", /* to placate SGI */ + "Noseguy.foreground: gray80", +#ifndef VMS + "*mode: program", +#else + "*mode: string", +#endif + "*program: " ZIPPY_PROGRAM, + "noseguy.font: -*-new century schoolbook-*-r-*-*-*-180-*-*-*-*-*-*", + 0 +}; + +XrmOptionDescRec options [] = { + { "-mode", ".mode", XrmoptionSepArg, 0 }, + { "-program", ".program", XrmoptionSepArg, 0 }, + { "-text", ".text", XrmoptionSepArg, 0 }, + { "-filename", ".filename", XrmoptionSepArg, 0 }, + { "-font", ".font", XrmoptionSepArg, 0 }, + { "-text-foreground", ".textForeground", XrmoptionSepArg, 0 }, + { "-text-background", ".textBackground", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + + +static void +noseguy_init (Display *d, Window w) +{ + unsigned long fg, bg, text_fg, text_bg; + XWindowAttributes xgwa; + Colormap cmap; + char *fontname = get_string_resource ("font", "Font"); + char **list; + int foo, i; + XGCValues gcvalues; + dpy = d; + window = w; + XGetWindowAttributes (dpy, window, &xgwa); + Width = xgwa.width + 2; + Height = xgwa.height + 2; + cmap = xgwa.colormap; + + init_words(); + init_images(); + + if (!fontname || !(font = XLoadQueryFont(dpy, fontname))) + { + list = XListFonts(dpy, FONT_NAME, 32767, &foo); + for (i = 0; i < foo; i++) + if ((font = XLoadQueryFont(dpy, list[i]))) + break; + if (!font) + { + fprintf (stderr, "%s: Can't find a large font.", progname); + exit (1); + } + XFreeFontNames(list); + } + + fg = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + bg = get_pixel_resource ("background", "Background", dpy, cmap); + text_fg = get_pixel_resource ("textForeground", "Foreground", dpy, cmap); + text_bg = get_pixel_resource ("textBackground", "Background", dpy, cmap); + /* notice when unspecified */ + if (! get_string_resource ("textForeground", "Foreground")) + text_fg = bg; + if (! get_string_resource ("textBackground", "Background")) + text_bg = fg; + + gcvalues.font = font->fid; + gcvalues.graphics_exposures = False; + gcvalues.foreground = fg; + gcvalues.background = bg; + fg_gc = XCreateGC (dpy, window, + GCForeground|GCBackground|GCGraphicsExposures|GCFont, + &gcvalues); + gcvalues.foreground = bg; + gcvalues.background = fg; + bg_gc = XCreateGC (dpy, window, + GCForeground|GCBackground|GCGraphicsExposures|GCFont, + &gcvalues); + gcvalues.foreground = text_fg; + gcvalues.background = text_bg; + text_fg_gc = XCreateGC (dpy, window, + GCForeground|GCBackground|GCGraphicsExposures|GCFont, + &gcvalues); + gcvalues.foreground = text_bg; + gcvalues.background = text_fg; + text_bg_gc = XCreateGC (dpy, window, + GCForeground|GCBackground|GCGraphicsExposures|GCFont, + &gcvalues); + x = Width / 2; + y = Height / 2; + state = IS_MOVING; +} + +void +screenhack (Display *d, Window w) +{ + noseguy_init (d, w); + next_fn = move; + while (1) + { + next_fn(); + XSync (dpy, True); + usleep (interval * 1000); + } +} + diff --git a/hacks/noseguy.man b/hacks/noseguy.man new file mode 100644 index 00000000..fe18d8df --- /dev/null +++ b/hacks/noseguy.man @@ -0,0 +1,74 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +noseguy - a little guy with a big nose wanders around being witty +.SH SYNOPSIS +.B noseguy +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-text-foreground \fIcolor\fP] [\-text-background \fIcolor\fP] [\-font \fIfont\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-mode \fImode\fP] [\-program \fIprogram\fP] [\-filename \file\fP] [\-text \fItext\fP] +.SH DESCRIPTION +A little man with a big nose and a hat runs around spewing out messages to +the screen. This code (and its bitmaps) were extracted from the \fIxnlock\fP +program. +.SH OPTIONS +.I noseguy +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 \-font \fIfont\fP +The font used for the messages. +.TP 8 +.B \-mode [ program | file | string ] +In \fIprogram\fP mode, the messages are gotten by running a program. +The program used is controlled by the \fI\-program\fP option, and +the \fI.program\fP resource. + +In \fIfilename\fP mode, the message used is the contents of a file. +The file used is controlled by the \fI\-file\fP option, and +the \fI.filename\fP resource. + +In \fIstring\fP mode, the message is whatever was specified on the +command line as the \fI\-text\fP option, or in the resource database +as the \fI.text\fP resource. +.TP 8 +.B \-program \fIprogram\fP +If \fImode\fP is \fIprogram\fP (the default), then this program will be +run periodically, and its output will be the text of the messages. The +default program is \fI"fortune -s"\fP, but \fIyow\fP is also a good choice. +.TP 8 +.B \-filename \fIfile\fP +If \fImode\fP is \fIfile\fP, then the contents of this file will be used +for all messages. +.TP 8 +.B \-text \fIstring\fP +If \fImode\fP is \fIstring\fP, then this text will be used for all messages. +.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 xnlock (1) +.SH COPYRIGHT +Copyright 1985, 1990 by Dan Heller . +.SH AUTHOR +Dan Heller , 1985. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 13-aug-92. diff --git a/hacks/noses/nose-f1.xbm b/hacks/noses/nose-f1.xbm new file mode 100644 index 00000000..543af3e4 --- /dev/null +++ b/hacks/noses/nose-f1.xbm @@ -0,0 +1,38 @@ +#define nose_f1_width 64 +#define nose_f1_height 64 +static unsigned char nose_f1_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x40,0x00, + 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, + 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, + 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x08,0x00,0xc0,0x1f,0x00,0x20,0x00,0x00,0x08,0x00,0x30,0x60,0x00,0x20,0x00, + 0x00,0xf8,0xff,0x0f,0x80,0xff,0x3f,0x00,0x00,0x00,0x02,0x02,0x00,0x82,0x00, + 0x00,0x00,0x00,0x03,0x01,0x00,0x84,0x01,0x00,0x00,0x00,0x81,0x00,0x00,0x08, + 0x01,0x00,0x00,0x80,0x80,0x00,0x00,0x08,0x02,0x00,0x00,0x80,0x40,0x00,0x00, + 0x10,0x02,0x00,0x00,0x40,0x40,0x00,0x00,0x10,0x04,0x00,0x00,0x40,0x20,0x00, + 0x00,0x20,0x04,0x00,0x00,0x60,0x20,0x00,0x00,0x20,0x0c,0x00,0x00,0x20,0x20, + 0x00,0x00,0x20,0x08,0x00,0x00,0x20,0x20,0x00,0x00,0x20,0x08,0x00,0x00,0x10, + 0x20,0x00,0x00,0x20,0x10,0x00,0x00,0x10,0x20,0x00,0x00,0x20,0x10,0x00,0x00, + 0x10,0x20,0x00,0x00,0x20,0x10,0x00,0x00,0x10,0x40,0x00,0x00,0x10,0x10,0x00, + 0x00,0x10,0x40,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x80,0x00,0x00,0x08,0x10, + 0x00,0x00,0x10,0x80,0x00,0x00,0x08,0x10,0x00,0x00,0x30,0x00,0x01,0x00,0x04, + 0x18,0x00,0x00,0x20,0x00,0x02,0x00,0x02,0x08,0x00,0x00,0x20,0x00,0x0c,0x80, + 0x01,0x08,0x00,0x00,0x60,0x00,0x30,0x60,0x00,0x0c,0x00,0x00,0x40,0x00,0xc0, + 0x1f,0x00,0x04,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01, + 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0f,0xc0,0x0f,0x00,0x00,0x00, + 0x00,0x40,0x10,0x20,0x10,0x00,0x00,0x00,0x00,0x20,0x60,0x30,0x20,0x00,0x00, + 0x00,0x00,0x20,0xc0,0x18,0x20,0x00,0x00,0xc0,0x7f,0x10,0x80,0x0d,0x40,0xe0, + 0x01,0x70,0xc0,0x18,0x00,0x05,0x40,0x1c,0x06,0x10,0x00,0x0f,0x00,0x05,0x80, + 0x07,0x08,0x08,0x00,0x06,0x00,0x05,0x80,0x01,0x08,0x08,0x00,0x18,0x00,0x05, + 0xc0,0x00,0x10,0x04,0x00,0x30,0x00,0x05,0x30,0x00,0x10,0x04,0x00,0x00,0x80, + 0x08,0x18,0x00,0x20,0x04,0x00,0x00,0x80,0x08,0x00,0x00,0x20,0x04,0x00,0x00, + 0x40,0x10,0x00,0x00,0x20,0x24,0x00,0x00,0x40,0x10,0x00,0x00,0x22,0x24,0x00, + 0x00,0x40,0x10,0x00,0x00,0x22,0x44,0x00,0x00,0x40,0x10,0x00,0x00,0x11,0x84, + 0x01,0x00,0xc0,0x18,0x00,0xc0,0x10,0x08,0x00,0x00,0x80,0x08,0x00,0x00,0x08, + 0x30,0x00,0x00,0x80,0x08,0x00,0x00,0x04,0xe0,0xff,0xff,0xff,0xf8,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-f1.xpm b/hacks/noses/nose-f1.xpm new file mode 100644 index 00000000..a6e03bfb --- /dev/null +++ b/hacks/noses/nose-f1.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * nose_f1_xpm[] = { +"64 64 7 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"O c yellow2 m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ..................... ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .XXXXXXXXXXXXXXXXXX.......XXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXX..ooooooo..XXXXXXXXXXXXXX. ", +" .................ooooooooooo............... ", +" .OOOOOOO.ooooooooooooooo.OOOOO. ", +" ..OOOOOO.ooooooooooooooooo.OOOO.. ", +" .OOOOOO.ooooooooooooooooooo.OOOO. ", +" .OOOOOOO.ooooooooooooooooooo.OOOOO. ", +" .OOOOOO.ooooooooooooooooooooo.OOOO. ", +" .OOOOOOO.ooooooooooooooooooooo.OOOOO. ", +" .OOOOOO.ooooooooooooooooooooooo.OOOO. ", +" ..OOOOOO.ooooooooooooooooooooooo.OOOO.. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOO. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOO. ", +" .OOOOOOOO.ooooooooooooooooooooooo.OOOOOO. ", +" .OOOOOOOO.ooooooooooooooooooooooo.OOOOOO. ", +" .OOOOOOOO.ooooooooooooooooooooooo.OOOOOO. ", +" .OOOOOOOOO.ooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOOOO.ooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOOOOO.ooooooooooooooooooo.OOOOOOOO. ", +" .OOOOOOOOOO.ooooooooooooooooooo.OOOOOOOO. ", +" ..OOOOOOOOOO.ooooooooooooooooo.OOOOOOOO.. ", +" .OOOOOOOOOOO.ooooooooooooooo.OOOOOOOOO. ", +" .OOOOOOOOOOOO..ooooooooooo..OOOOOOOOOO. ", +" ..OOOOOOOOOOOOO..ooooooo..OOOOOOOOOOO.. ", +" .OOOOOOOOOOOOOOO.......OOOOOOOOOOOOO. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" ................................ ", +" ", +" ..... ...... ", +" .+++++. .++++++. ", +" .+++++++.. ..+++++++. ", +" .++++++++.. ..++++++++. ", +" ......... .++++++++++.. ..++++++++++. .... ", +" ...+++++++.. ..+++++++++++. .+++++++++++. ...++++.. ", +" .+++++++++++....@+++++++++++. .+++++++++++@....++++++++. ", +" .+++++++++++++..@@+++++++++++. .++++++++++@@..++++++++++. ", +" .+++++++++++++++..@++++++++++. .+++++++++@@..++++++++++++. ", +" .+++++++++++++++++..@+++++++++. .++++++++@..++++++++++++++. ", +" .++++++++++++++++++++++++++++. .+++++++..++++++++++++++++. ", +" .++++++++++++++++++++++++++++. .+++++++++++++++++++++++++. ", +" .+++++++++++++++++++++++++++. .++++++++++++++++++++++++. ", +" .+@.++++++++++++++++++++++++. .++++++++++++++++++++.+++. ", +" .+@.++++++++++++++++++++++++. .++++++++++++++++++++.@++. ", +" .+@@.+++++++++++++++++++++++. .+++++++++++++++++++.@@+. ", +" .++@@..+++++++++++++++++++++.. ..+++++++++++++++++..@@++. ", +" .++@@++++++++++++++++++++++@. .@++++++++++++++++++@@++. ", +" ..@@@@@@@@@@@@@@@@@@@@@@@@@. .@@@@@@@@@@@@@@@@@@@@@@. ", +" ........................... ....................... ", +" ", +" "}; diff --git a/hacks/noses/nose-f2.xbm b/hacks/noses/nose-f2.xbm new file mode 100644 index 00000000..6851b201 --- /dev/null +++ b/hacks/noses/nose-f2.xbm @@ -0,0 +1,38 @@ +#define nose_f2_width 64 +#define nose_f2_height 64 +static unsigned char nose_f2_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x40,0x00, + 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, + 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, + 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x08,0x00,0xe0,0x0f,0x00,0x20,0x00,0x00,0x08,0x00,0x18,0x30,0x00,0x20,0x00, + 0x00,0xf8,0xff,0x07,0xc0,0xff,0x3f,0x00,0x00,0x00,0x02,0x01,0x00,0x81,0x00, + 0x00,0x00,0x00,0x83,0x00,0x00,0x82,0x01,0x00,0x00,0x00,0x41,0x00,0x00,0x04, + 0x01,0x00,0x00,0x80,0x40,0x00,0x00,0x04,0x02,0x00,0x00,0x80,0x20,0x00,0x00, + 0x08,0x02,0x00,0x00,0x40,0x20,0x00,0x00,0x08,0x04,0x00,0x00,0x40,0x10,0x00, + 0x00,0x10,0x04,0x00,0x00,0x60,0x10,0x00,0x00,0x10,0x0c,0x00,0x00,0x20,0x10, + 0x00,0x00,0x10,0x08,0x00,0x00,0x30,0x10,0x00,0x00,0x10,0x08,0x00,0x00,0x10, + 0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00, + 0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00, + 0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00,0x00,0x10,0x40,0x00,0x00,0x04,0x10, + 0x00,0x00,0x30,0x40,0x00,0x00,0x04,0x10,0x00,0x00,0x20,0x80,0x00,0x00,0x02, + 0x18,0x00,0x00,0x20,0x00,0x01,0x00,0x01,0x08,0x00,0x00,0x60,0x00,0x06,0xc0, + 0x00,0x08,0x00,0x00,0x80,0x00,0x18,0x30,0x00,0x0c,0x00,0x00,0x80,0x00,0xe0, + 0x0f,0x00,0x04,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01, + 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00, + 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xe0,0x00,0x07,0x02,0x10,0x00,0x00, + 0x00,0x30,0x00,0x8c,0x01,0x20,0x00,0x00,0x00,0x0c,0x00,0x90,0x00,0x20,0x00, + 0x00,0x00,0x04,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20, + 0x00,0x00,0x00,0x42,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x02, + 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x06,0x20,0x00,0x00,0x00,0x21,0x00,0x00, + 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x03,0x00, + 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02, + 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00, + 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-f2.xpm b/hacks/noses/nose-f2.xpm new file mode 100644 index 00000000..3763b58d --- /dev/null +++ b/hacks/noses/nose-f2.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * nose_f2_xpm[] = { +"64 64 7 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"O c yellow2 m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ..................... ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .XXXXXXXXXXXXXXXXX.......XXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXX..ooooooo..XXXXXXXXXXXXXXX. ", +" ................ooooooooooo................ ", +" .OOOOOO.ooooooooooooooo.OOOOOO. ", +" ..OOOOO.ooooooooooooooooo.OOOOO.. ", +" .OOOOO.ooooooooooooooooooo.OOOOO. ", +" .OOOOOO.ooooooooooooooooooo.OOOOOO. ", +" .OOOOO.ooooooooooooooooooooo.OOOOO. ", +" .OOOOOO.ooooooooooooooooooooo.OOOOOO. ", +" .OOOOO.ooooooooooooooooooooooo.OOOOO. ", +" ..OOOOO.ooooooooooooooooooooooo.OOOOO.. ", +" .OOOOOO.ooooooooooooooooooooooo.OOOOOO. ", +" ..OOOOOO.ooooooooooooooooooooooo.OOOOOO. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOOO.ooooooooooooooooooooo.OOOOOOOO. ", +" .OOOOOOOO.ooooooooooooooooooooo.OOOOOOOO. ", +" .OOOOOOOOO.ooooooooooooooooooo.OOOOOOOOO. ", +" ..OOOOOOOO.ooooooooooooooooooo.OOOOOOOOO. ", +" .OOOOOOOOO.ooooooooooooooooo.OOOOOOOOO.. ", +" .OOOOOOOOOO.ooooooooooooooo.OOOOOOOOOO. ", +" ..OOOOOOOOOO..ooooooooooo..OOOOOOOOOOO. ", +" .OOOOOOOOOOO..ooooooo..OOOOOOOOOOOO.. ", +" .OOOOOOOOOOOOO.......OOOOOOOOOOOOOO. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" ................................ ", +" ", +" ......... ", +" ........ .+++++++++. ", +" ...++++++++... .++++++++++. ", +" ..++++++++++++.. ..++++++++++++. ", +" ..++++++++++++++++. .@++++++++++++. ", +" .++++@..+++++++++++..@@++++++++++++. ", +" .++++..++++++++++++++..@++++++++++++. ", +" .+++@.+++++++++++++++++.@+++++++++++. ", +" .+++@.+++++++++++++++++++.@++++++++++. ", +" .+++@.+++++++++++++++++++..++++++++++. ", +" .+++@.+++++++++++++++++++++++++++++++. ", +" .++++++++++++++++++++++++++++++++++++@. ", +" ..@++++++++++++++++++++++++++++++++++@. ", +" .@@+++++++++++++++++++++++++++++++++@. ", +" .@@++++++++++++++++++++++++++++++++@@. ", +" .@@@++++++++++++++++++++++++++++++@. ", +" ..@@@++++++++++++++++++++@@@++++@@. ", +" ...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@. ", +" .............................. ", +" ", +" ", +" "}; diff --git a/hacks/noses/nose-f3.xbm b/hacks/noses/nose-f3.xbm new file mode 100644 index 00000000..e70f2293 --- /dev/null +++ b/hacks/noses/nose-f3.xbm @@ -0,0 +1,38 @@ +#define nose_f3_width 64 +#define nose_f3_height 64 +static unsigned char nose_f3_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00, + 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00, + 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, + 0x04,0x00,0xf0,0x07,0x00,0x10,0x00,0x00,0x04,0x00,0x0c,0x18,0x00,0x10,0x00, + 0x00,0xfc,0xff,0x03,0xe0,0xff,0x1f,0x00,0x00,0x00,0x81,0x00,0x80,0x40,0x00, + 0x00,0x00,0x80,0x41,0x00,0x00,0xc1,0x00,0x00,0x00,0x80,0x20,0x00,0x00,0x82, + 0x00,0x00,0x00,0x40,0x20,0x00,0x00,0x02,0x01,0x00,0x00,0x40,0x10,0x00,0x00, + 0x04,0x01,0x00,0x00,0x20,0x10,0x00,0x00,0x04,0x02,0x00,0x00,0x20,0x08,0x00, + 0x00,0x08,0x02,0x00,0x00,0x30,0x08,0x00,0x00,0x08,0x06,0x00,0x00,0x10,0x08, + 0x00,0x00,0x08,0x04,0x00,0x00,0x10,0x08,0x00,0x00,0x08,0x0c,0x00,0x00,0x08, + 0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00, + 0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00, + 0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x08, + 0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x0c,0x00,0x00,0x18,0x40,0x00,0x00,0x01, + 0x04,0x00,0x00,0x10,0x80,0x00,0x80,0x00,0x04,0x00,0x00,0x10,0x00,0x03,0x60, + 0x00,0x06,0x00,0x00,0x30,0x00,0x0c,0x18,0x00,0x01,0x00,0x00,0x20,0x00,0xf0, + 0x07,0x00,0x01,0x00,0x00,0x60,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x40,0x00, + 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0x40,0xe0,0x00,0x07,0x00, + 0x00,0x00,0x04,0x80,0x31,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x09,0x00,0x30, + 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x20,0x00,0x00,0x00,0x04,0x00,0x03,0x00, + 0x43,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x42,0x00,0x00,0x00,0x04,0x40,0x00, + 0x00,0x84,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00, + 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00, + 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-f3.xpm b/hacks/noses/nose-f3.xpm new file mode 100644 index 00000000..c60c5f37 --- /dev/null +++ b/hacks/noses/nose-f3.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * nose_f3_xpm[] = { +"64 64 7 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"O c yellow2 m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ..................... ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .XXXXXXXXXXXXXXXXX.......XXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXX..ooooooo..XXXXXXXXXXXXXXX. ", +" ................ooooooooooo................ ", +" .OOOOOO.ooooooooooooooo.OOOOOO. ", +" ..OOOOO.ooooooooooooooooo.OOOOO.. ", +" .OOOOO.ooooooooooooooooooo.OOOOO. ", +" .OOOOOO.ooooooooooooooooooo.OOOOOO. ", +" .OOOOO.ooooooooooooooooooooo.OOOOO. ", +" .OOOOOO.ooooooooooooooooooooo.OOOOOO. ", +" .OOOOO.ooooooooooooooooooooooo.OOOOO. ", +" ..OOOOO.ooooooooooooooooooooooo.OOOOO.. ", +" .OOOOOO.ooooooooooooooooooooooo.OOOOOO. ", +" .OOOOOO.ooooooooooooooooooooooo.OOOOOO.. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOO.ooooooooooooooooooooooo.OOOOOOO. ", +" .OOOOOOOO.ooooooooooooooooooooo.OOOOOOOO. ", +" .OOOOOOOO.ooooooooooooooooooooo.OOOOOOOO. ", +" .OOOOOOOOO.ooooooooooooooooooo.OOOOOOOOO. ", +" .OOOOOOOOO.ooooooooooooooooooo.OOOOOOOO.. ", +" ..OOOOOOOOO.ooooooooooooooooo.OOOOOOOOO. ", +" .OOOOOOOOOO.ooooooooooooooo.OOOOOOOOOO. ", +" .OOOOOOOOOOO..ooooooooooo..OOOOOOOOOO.. ", +" ..OOOOOOOOOOOO..ooooooo..OOOOOOOOOOO. ", +" .OOOOOOOOOOOOOO.......OOOOOOOOOOOOO. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" ................................ ", +" ", +" ......... ", +" .+++++++++. ........ ", +" .++++++++++. ...++++++++... ", +" .++++++++++++.. ..++++++++++++.. ", +" .++++++++++++@. .++++++++++++++++.. ", +" .++++++++++++@@..+++++++++++..@++++. ", +" .++++++++++++@..++++++++++++++..++++. ", +" .+++++++++++@.+++++++++++++++++.@+++. ", +" .++++++++++@.+++++++++++++++++++.@+++. ", +" .++++++++++..+++++++++++++++++++.@+++. ", +" .+++++++++++++++++++++++++++++++.@+++. ", +" .@++++++++++++++++++++++++++++++++++++. ", +" .@++++++++++++++++++++++++++++++++++@.. ", +" .@+++++++++++++++++++++++++++++++++@@. ", +" .@@++++++++++++++++++++++++++++++++@@. ", +" .@++++++++++++++++++++++++++++++@@@. ", +" .@@++++@@@++++++++++++++++++++@@@.. ", +" .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ", +" .............................. ", +" ", +" ", +" "}; diff --git a/hacks/noses/nose-f4.xbm b/hacks/noses/nose-f4.xbm new file mode 100644 index 00000000..024eead8 --- /dev/null +++ b/hacks/noses/nose-f4.xbm @@ -0,0 +1,38 @@ +#define nose_f4_width 64 +#define nose_f4_height 64 +static unsigned char nose_f4_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0xff,0x01,0x00,0x00,0x00,0x00,0xc0,0x03,0x00,0x1e,0x00, + 0x00,0x00,0x00,0x38,0x00,0x00,0xe0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00, + 0x03,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x40,0x00,0x00,0x00, + 0x00,0x08,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x10,0x00,0x80, + 0x1f,0x00,0x40,0x00,0x00,0x08,0x00,0x60,0x60,0x00,0x80,0x00,0x00,0x08,0x00, + 0x10,0x80,0x00,0x80,0x00,0x00,0x04,0x00,0x08,0x00,0x01,0x00,0x01,0x00,0x04, + 0x00,0x08,0x00,0x01,0x00,0x01,0x00,0x02,0x00,0x18,0x80,0x01,0x00,0x02,0x00, + 0x02,0x00,0x68,0x60,0x01,0x00,0x02,0x00,0x02,0x00,0x88,0x1f,0x01,0x00,0x02, + 0x00,0x02,0x00,0x08,0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x10,0x80,0x00,0x00, + 0x03,0x00,0x06,0x00,0x60,0x60,0x00,0x80,0x02,0x00,0x0c,0x00,0x80,0x1f,0x00, + 0x40,0x01,0x00,0x14,0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x28,0x00,0x00,0x00, + 0x00,0x90,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x48,0x00,0x00,0xa0,0x01,0x00, + 0x00,0x00,0x26,0x00,0x00,0x40,0x1e,0x00,0x00,0xc0,0x11,0x00,0x00,0x80,0xe1, + 0x03,0x00,0x3c,0x0c,0x00,0x00,0x00,0x0e,0xfc,0xff,0x83,0x03,0x00,0x00,0x00, + 0xf0,0x01,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x0f,0x00,0x00,0x00, + 0x00,0x80,0x03,0x00,0x0c,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x14,0x00,0x00, + 0x00,0x00,0x60,0x04,0x00,0x12,0x00,0x00,0xc0,0x7f,0x10,0x04,0x00,0x22,0xe0, + 0x01,0x70,0xc0,0x18,0x08,0x00,0x61,0x1c,0x06,0x10,0x00,0x0f,0x30,0xc0,0x80, + 0x07,0x08,0x08,0x00,0x06,0xc0,0x3f,0x80,0x01,0x08,0x08,0x00,0x18,0x00,0x02, + 0xc0,0x00,0x10,0x04,0x00,0x30,0x00,0x05,0x30,0x00,0x10,0x04,0x00,0x00,0x80, + 0x08,0x18,0x00,0x20,0x04,0x00,0x00,0x80,0x08,0x00,0x00,0x20,0x04,0x00,0x00, + 0x40,0x10,0x00,0x00,0x20,0x24,0x00,0x00,0x40,0x10,0x00,0x00,0x22,0x24,0x00, + 0x00,0x40,0x10,0x00,0x00,0x22,0x44,0x00,0x00,0x40,0x10,0x00,0x00,0x11,0x84, + 0x01,0x00,0xc0,0x18,0x00,0xc0,0x10,0x08,0x00,0x00,0x80,0x08,0x00,0x00,0x08, + 0x30,0x00,0x00,0x80,0x08,0x00,0x00,0x04,0xe0,0xff,0xff,0xff,0xf8,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-f4.xpm b/hacks/noses/nose-f4.xpm new file mode 100644 index 00000000..faa52e03 --- /dev/null +++ b/hacks/noses/nose-f4.xpm @@ -0,0 +1,73 @@ +/* XPM */ +static char * nose_f4_xpm[] = { +"64 64 6 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ............... ", +" ....XXXXXXXXXXXXXXX.... ", +" ...XXXXXXXXXXXXXXXXXXXXXXX... ", +" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. ", +" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. ", +" .XXXXXXXXXXXXXXXXXX......XXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXX..XXXXXX..XXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXX.XXXXXXXXXXXX.XXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXX.XXXXXXXXXXXX.XXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXX..XXXXXXXXXX..XXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXX.X..XXXXXX..X.XXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXX.XXX......XXX.XXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.XXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXXX.. ", +" ..XXXXXXXXXXXXXXXXXX..XXXXXX..XXXXXXXXXXXXXXXX. . ", +" ..XXXXXXXXXXXXXXXXXXX......XXXXXXXXXXXXXXXXX.X. ", +" .X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XX. ", +" .X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XX. ", +" .X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XX. ", +" .X..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..XX. ", +" .XX....XXXXXXXXXXXXXXXXXXXXXXXXX...XXX. ", +" ..XXXX.....XXXXXXXXXXXXXXXX....XXXX.. ", +" ...XXXXXX................XXXXX... ", +" .....XXXXXXXXXXXXXXXXXX.... ", +" ................... ", +" ...oooooooooooooooo.. ", +" .+.oooooooooooooooo.+. ", +" ..+++.oooooooooooooo.++. ", +" ......... .+++++.oooooooooooooo.+++. .... ", +" ...+++++++.. ..++++++.oooooooooooo.++++.. ...++++.. ", +" .+++++++++++....@+++++++..oooooooo..++++++@....++++++++. ", +" .+++++++++++++..@@+++++++++........+++++++@@..++++++++++. ", +" .+++++++++++++++..@+++++++++++.++++++++++@@..++++++++++++. ", +" .+++++++++++++++++..++++++++++. .+++++++++..++++++++++++++. ", +" .++++++++++++++++++++++++++++. .+++++++..++++++++++++++++. ", +" .++++++++++++++++++++++++++++. .+++++++++++++++++++++++++. ", +" .+++++++++++++++++++++++++++. .++++++++++++++++++++++++. ", +" .+@.++++++++++++++++++++++++. .++++++++++++++++++++.+++. ", +" .++.++++++++++++++++++++++++. .++++++++++++++++++++.@+@. ", +" .@+@.+++++++++++++++++++++++. .+++++++++++++++++++.@+@. ", +" .@@+@..++++++++++++++++++++@.. ..@++++++++++++++++..@++@. ", +" .@@+++++++++++++++++++++++@@. .@@+++++++++++++++++++@@. ", +" ..@@@@@@@@@@@@@@@@@@@@@@@@@. .@@@@@@@@@@@@@@@@@@@@@@. ", +" ........................... ....................... ", +" ", +" "}; diff --git a/hacks/noses/nose-l1.xbm b/hacks/noses/nose-l1.xbm new file mode 100644 index 00000000..e3cb7030 --- /dev/null +++ b/hacks/noses/nose-l1.xbm @@ -0,0 +1,38 @@ +#define nose_l1_width 64 +#define nose_l1_height 64 +static unsigned char nose_l1_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x40,0x00, + 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, + 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, + 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00, + 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00, + 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00, + 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00, + 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00, + 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, + 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, + 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, + 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00, + 0x18,0x00,0x20,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x40,0x00,0x80,0x00,0x00, + 0x00,0x08,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x00,0x01,0x20,0x00, + 0x00,0x00,0x04,0x00,0x00,0x06,0x18,0x00,0x00,0x00,0x06,0x00,0x00,0xf8,0x07, + 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00, + 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xc0,0x00,0x03,0x03,0x10,0x00,0x00, + 0x00,0x30,0x00,0x0c,0x01,0x20,0x00,0x00,0x00,0x08,0x00,0x98,0x00,0x20,0x00, + 0x00,0x00,0x0c,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20, + 0x00,0x00,0x00,0x42,0x00,0x80,0x00,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01, + 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00, + 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x01,0x00, + 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02, + 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00, + 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-l1.xpm b/hacks/noses/nose-l1.xpm new file mode 100644 index 00000000..205d18be --- /dev/null +++ b/hacks/noses/nose-l1.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * nose_l1_xpm[] = { +"64 64 7 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"O c yellow2 m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ..................... ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" ......OOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" ...ooOOOO..OOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" ..oooOOOOOOO..OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOO.OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOO..OOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOO.OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooooOOOOOOOOOOOOOOo.OOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .ooooOOOOOOOOOOoooo.OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooooooOOOOOoooo.OOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooooooooooooo.OOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .oooooooooooo.OOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" ..oooooooo..OOOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" ........OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .............................. ", +" ", +" ......... ", +" ........ .+++++++++. ", +" ...++++++++... .++++++++++. ", +" ..++++++++++++.. ..++++++++++++. ", +" ..++++++++++++++++. .@++++++++++++. ", +" .++++@..+++++++++++..@@++++++++++++. ", +" .++++..++++++++++++++..@++++++++++++. ", +" .+++@.+++++++++++++++++.@+++++++++++. ", +" .+++@.+++++++++++++++++++.@++++++++++. ", +" .+++@.+++++++++++++++++++..++++++++++. ", +" .+++@.+++++++++++++++++++++++++++++++. ", +" .++++++++++++++++++++++++++++++++++++@. ", +" ..@++++++++++++++++++++++++++++++++++@. ", +" .@@+++++++++++++++++++++++++++++++++@. ", +" .@@++++++++++++++++++++++++++++++++@@. ", +" .@@@++++++++++++++++++++++++++++++@. ", +" ..@@@++++++++++++++++++++@@@++++@@. ", +" ...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@. ", +" .............................. ", +" ", +" ", +" "}; diff --git a/hacks/noses/nose-l2.xbm b/hacks/noses/nose-l2.xbm new file mode 100644 index 00000000..fa39343b --- /dev/null +++ b/hacks/noses/nose-l2.xbm @@ -0,0 +1,38 @@ +#define nose_l2_width 64 +#define nose_l2_height 64 +static unsigned char nose_l2_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x40,0x00, + 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, + 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, + 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00, + 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00, + 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00, + 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00, + 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00, + 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, + 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, + 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, + 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00, + 0x18,0x00,0x10,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00, + 0x00,0x08,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x80,0x00,0x20,0x00, + 0x00,0x00,0xe4,0x00,0x00,0x03,0x18,0x00,0x00,0x00,0x26,0x03,0x00,0xfc,0x07, + 0x00,0x00,0x00,0x12,0x0c,0x00,0x00,0xf8,0xff,0xff,0xff,0x11,0x10,0x80,0x1f, + 0x00,0x00,0x00,0x00,0x08,0x20,0x60,0x60,0xc0,0x07,0x00,0x00,0x04,0x40,0x10, + 0xc0,0x20,0x08,0x00,0x1f,0x02,0x40,0x08,0x00,0x21,0x10,0xc0,0x60,0x02,0x40, + 0x04,0x00,0x12,0x20,0x20,0x80,0x02,0x20,0xc2,0x00,0x14,0x40,0x18,0x00,0x03, + 0x20,0x22,0x00,0x0c,0x80,0x04,0x03,0x02,0x10,0x12,0x00,0x08,0x80,0x86,0x00, + 0x04,0x10,0x12,0x00,0x10,0x80,0x42,0x00,0x18,0x08,0x12,0x00,0x10,0x40,0x42, + 0x00,0x00,0x04,0x02,0x00,0x20,0x40,0x42,0x00,0x00,0x04,0x02,0x00,0x00,0x20, + 0x42,0x00,0x00,0x02,0x04,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x04,0x00,0x00, + 0x20,0x02,0x00,0x00,0x01,0x08,0x00,0x00,0x20,0x04,0x00,0x80,0x00,0x10,0x00, + 0x00,0x20,0x0c,0x00,0x80,0x00,0x60,0x00,0x00,0x10,0x08,0x00,0x40,0x00,0x80, + 0xff,0xff,0x0f,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-l2.xpm b/hacks/noses/nose-l2.xpm new file mode 100644 index 00000000..f08a72eb --- /dev/null +++ b/hacks/noses/nose-l2.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * nose_l2_xpm[] = { +"64 64 7 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"O c yellow2 m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ..................... ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" ......OOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" ...ooOOOO..OOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" ..oooOOOOOOO..OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOO.OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOO..OOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOO.OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .ooooOOOOOOOOOOOOOOo.OOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .ooooOOOOOOOOOOoooo.OOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooooooOOOOOoooo.OOOOOOOOOOOOOOOOOOOOOOOOOOO. ", +" .oooooooooooooo.OOOOOOOOOOOOOOOOOOOOOOOOOOO.. ", +" .oooooooooooo.OOOOOOOOOOOOOOOOOOOOOOOOOOOO. ... ", +" ..oooooooo..OOOOOOOOOOOOOOOOOOOOOOOOOOOO.. .++.. ", +" ........OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. .+++++.. ", +" .............................. .+++++++. ", +" ...... .+++++++++. ", +" ..++++++.. ..... .++++++++++@. ", +" .+++++++++.. .+++++. ..... .+++++++++++@. ", +" .++++++++++++. .++++++. ..+++++.. .++++++++++@@. ", +" .++++++++++++++. .++++++++. .+++++++++. .@+++++++++@. ", +" .++++..++++++++++. .+++++++++. ..+++++++++++..@++++++++@@. ", +" .+++.@@++++++++++..@++++++++++. .+++++..+++++++.@@+++++++@. ", +" .++.@+++++++++++++.@@+++++++++. ..++++.@@++++++++.@@+++++@@. ", +" .++.@++++++++++++++.@+++++++++. .++++.@+++++++++++..++++@@. ", +" .++.@++++++++++++++.@++++++++. .++++.@+++++++++++++++++@. ", +" .@++++++++++++++++++.@+++++++. .++++.@++++++++++++++++@@. ", +" .@@+++++++++++++++++++++++++. .++++.@+++++++++++++++@@. ", +" .@++++++++++++++++++++++++@. .+++++++++++++++++++++@. ", +" .@@+++++++++++++++++++++++@. .++++++++++++++++++++@@. ", +" .@@++++++++++++++++++++++@. .+++++++++++++++++++@. ", +" .@@@+++++++++++++++++++@@. ..+++++++++++++++++@@. ", +" ..@@@@@@@@@@@@@@@@@@@@@. .@@@+++@@@++++++@@@. ", +" ..................... ..@@@@@@@@@@@@@@.. ", +" .............. ", +" ", +" ", +" ", +" "}; diff --git a/hacks/noses/nose-r1.xbm b/hacks/noses/nose-r1.xbm new file mode 100644 index 00000000..72df86c2 --- /dev/null +++ b/hacks/noses/nose-r1.xbm @@ -0,0 +1,38 @@ +#define nose_r1_width 64 +#define nose_r1_height 64 +static unsigned char nose_r1_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00, + 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00, + 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f, + 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c, + 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00, + 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00, + 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, + 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, + 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, + 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00, + 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x18,0x00,0x00,0x80,0x00, + 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00, + 0x01,0x00,0x02,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x20,0x00,0x00, + 0x00,0x04,0x80,0x00,0x00,0x60,0x00,0x00,0x00,0x18,0x60,0x00,0x00,0x40,0x00, + 0x00,0x00,0xe0,0x1f,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0xc0,0xc0,0x00,0x03,0x00, + 0x00,0x00,0x04,0x80,0x30,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x19,0x00,0x10, + 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x30,0x00,0x00,0x00,0x04,0x00,0x03,0x00, + 0x43,0x00,0x00,0x00,0x04,0x00,0x01,0x00,0x42,0x00,0x00,0x00,0x04,0x80,0x00, + 0x00,0x84,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00, + 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02, + 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00, + 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-r1.xpm b/hacks/noses/nose-r1.xpm new file mode 100644 index 00000000..901dd428 --- /dev/null +++ b/hacks/noses/nose-r1.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * nose_r1_xpm[] = { +"64 64 7 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"O c yellow2 m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ..................... ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO...... ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOO..OOOOoo... ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO..OOOOOOOooo.. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO.OOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOO..OOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO.OOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOO.oOOOOOOOOOOOOOOoooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO.ooooOOOOOOOOOOoooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOO.ooooOOOOOooooooo. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooooooooooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooooooooo. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOO..oooooooo.. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO........ ", +" .............................. ", +" ", +" ......... ", +" .+++++++++. ........ ", +" .++++++++++. ...++++++++... ", +" .++++++++++++.. ..++++++++++++.. ", +" .++++++++++++@. .++++++++++++++++.. ", +" .++++++++++++@@..+++++++++++..@++++. ", +" .++++++++++++@..++++++++++++++..++++. ", +" .+++++++++++@.+++++++++++++++++.@+++. ", +" .++++++++++@.+++++++++++++++++++.@+++. ", +" .++++++++++..+++++++++++++++++++.@+++. ", +" .+++++++++++++++++++++++++++++++.@+++. ", +" .@++++++++++++++++++++++++++++++++++++. ", +" .@++++++++++++++++++++++++++++++++++@.. ", +" .@+++++++++++++++++++++++++++++++++@@. ", +" .@@++++++++++++++++++++++++++++++++@@. ", +" .@++++++++++++++++++++++++++++++@@@. ", +" .@@++++@@@++++++++++++++++++++@@@.. ", +" .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ", +" .............................. ", +" ", +" ", +" "}; diff --git a/hacks/noses/nose-r2.xbm b/hacks/noses/nose-r2.xbm new file mode 100644 index 00000000..eb750ca7 --- /dev/null +++ b/hacks/noses/nose-r2.xbm @@ -0,0 +1,38 @@ +#define nose_r2_width 64 +#define nose_r2_height 64 +static unsigned char nose_r2_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00, + 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00, + 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f, + 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c, + 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00, + 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00, + 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, + 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, + 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, + 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00, + 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x18,0x00,0x00,0x80,0x00, + 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00, + 0x01,0x00,0x04,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x27,0x00,0x00, + 0x00,0x04,0x00,0x01,0xc0,0x64,0x00,0x00,0x00,0x18,0xc0,0x00,0x30,0x48,0x00, + 0x00,0x00,0xe0,0x3f,0x00,0x08,0x88,0xff,0xff,0xff,0x1f,0x00,0x00,0x04,0x10, + 0x00,0x00,0x00,0x00,0xf8,0x01,0x02,0x20,0x00,0x00,0xe0,0x03,0x06,0x06,0x02, + 0x40,0xf8,0x00,0x10,0x04,0x03,0x08,0x02,0x40,0x06,0x03,0x08,0x84,0x00,0x10, + 0x04,0x40,0x01,0x04,0x04,0x48,0x00,0x20,0x04,0xc0,0x00,0x18,0x02,0x28,0x00, + 0x43,0x08,0x40,0xc0,0x20,0x01,0x30,0x00,0x44,0x08,0x20,0x00,0x61,0x01,0x10, + 0x00,0x48,0x10,0x18,0x00,0x42,0x01,0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02, + 0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02,0x04,0x00,0x40,0x40,0x00,0x00,0x42, + 0x04,0x00,0x00,0x40,0x80,0x00,0x00,0x40,0x04,0x00,0x00,0x20,0x80,0x00,0x00, + 0x40,0x04,0x00,0x00,0x20,0x00,0x01,0x00,0x20,0x04,0x00,0x00,0x10,0x00,0x01, + 0x00,0x30,0x04,0x00,0x00,0x08,0x00,0x02,0x00,0x10,0x08,0x00,0x00,0x06,0x00, + 0x0c,0x00,0x0c,0xf0,0xff,0xff,0x01,0x00,0xf0,0xff,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; diff --git a/hacks/noses/nose-r2.xpm b/hacks/noses/nose-r2.xpm new file mode 100644 index 00000000..ddf0edaf --- /dev/null +++ b/hacks/noses/nose-r2.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * nose_r2_xpm[] = { +"64 64 7 1", +" c black m black", +". c black m white", +"X c gray m black", +"o c yellow m black", +"O c yellow2 m black", +"+ c purple m black", +"@ c purple3 m black", +" ", +" ", +" ", +" ", +" ", +" ", +" ..................... ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" ........................................... ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO...... ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOO..OOOOoo... ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO..OOOOOOOooo.. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO.OOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOO..OOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO.OOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooo. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOO.oOOOOOOOOOOOOOOoooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOO.ooooOOOOOOOOOOoooo. ", +" .OOOOOOOOOOOOOOOOOOOOOOOOOOO.ooooOOOOOooooooo. ", +" ..OOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooooooooooo. ", +" ... .OOOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooooooooo. ", +" ..++. ..OOOOOOOOOOOOOOOOOOOOOOOOOOOO..oooooooo.. ", +" ..+++++. .OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO........ ", +" .+++++++. .............................. ", +" .+++++++++. ...... ", +" .@++++++++++. ..... ..++++++.. ", +" .@+++++++++++. ..... .+++++. ..+++++++++. ", +" .@@++++++++++. ..+++++.. .++++++. .++++++++++++. ", +" .@+++++++++@. .+++++++++. .++++++++. .++++++++++++++. ", +" .@@++++++++@..+++++++++++.. .+++++++++. .++++++++++..++++. ", +" .@+++++++@@.+++++++..+++++. .++++++++++@..++++++++++@@.+++. ", +" .@@+++++@@.++++++++@@.++++.. .+++++++++@@.+++++++++++++@.++. ", +" .@@++++..+++++++++++@.++++. .+++++++++@.++++++++++++++@.++. ", +" .@+++++++++++++++++@.++++. .++++++++@.++++++++++++++@.++. ", +" .@@++++++++++++++++@.++++. .+++++++@.++++++++++++++++++@. ", +" .@@+++++++++++++++@.++++. .+++++++++++++++++++++++++@@. ", +" .@+++++++++++++++++++++. .@++++++++++++++++++++++++@. ", +" .@@++++++++++++++++++++. .@+++++++++++++++++++++++@@. ", +" .@+++++++++++++++++++. .@++++++++++++++++++++++@@. ", +" .@@+++++++++++++++++.. .@@+++++++++++++++++++@@@. ", +" .@@@++++++@@@+++@@@. .@@@@@@@@@@@@@@@@@@@@@.. ", +" ..@@@@@@@@@@@@@@.. ..................... ", +" .............. ", +" ", +" ", +" ", +" "}; diff --git a/hacks/pedal.c b/hacks/pedal.c new file mode 100644 index 00000000..ab9dccb0 --- /dev/null +++ b/hacks/pedal.c @@ -0,0 +1,380 @@ +/* + * pedal + * + * Based on a program for some old PDP-11 Graphics Display Processors + * at CMU. + * + * X version by + * + * Dale Moore + * 24-Jun-1994 + * + * Copyright (c) 1994, by Carnegie Mellon University. Permission to use, + * copy, modify, distribute, and sell this software and its documentation + * for any purpose is hereby granted without fee, provided fnord 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 fnord this software + * for any purpose. It is provided "as is" without express or implied + * warranty. + */ + +#include +#include +#include "screenhack.h" + +/* If MAXLINES is too big, we might not be able to get it + * to the X server in the 2byte length field. Must be less + * than 16k + */ +#define MAXLINES (16 * 1024) +#define MAXPOINTS MAXLINES +XPoint *points; + +/* + * If the pedal has only this many lines, it must be ugly and we dont + * want to see it. + */ +#define MINLINES 7 + +static int sizex, sizey; +static int delay; +static int fadedelay; +static int maxlines; +static GC gc; +static XColor foreground, background; +static Colormap cmap; + +static Bool fade_p; + + +/* + * Routine (Macro actually) + * mysin + * Description: + * Assume that degrees is .. oh 360... meaning that + * there are 360 degress in a circle. Then this function + * would return the sin of the angle in degrees. But lets + * say that they are really big degrees, with 4 big degrees + * the same as one regular degree. Then this routine + * would be called mysin(t, 90) and would return sin(t degrees * 4) + */ +#define mysin(t, degrees) sin(t * 2 * M_PI / (degrees)) +#define mycos(t, degrees) cos(t * 2 * M_PI / (degrees)) + +/* + * Macro: + * rand_range + * Description: + * Return a random number between a inclusive and b exclusive. + * rand (3, 6) returns 3 or 4 or 5, but not 6. + */ +#define rand_range(a, b) (a + random() % (b - a)) + + +static int +gcd(int m, int n) /* Greatest Common Divisor (also Greates common factor). */ +{ + int r; + + for (;;) { + r = m % n; + if (r == 0) return (n); + m = n; + n = r; + } +} + +static int numlines (int a, int b, int d) +/* + * Description: + * + * Given parameters a and b, how many lines will we have to draw? + * + * Algorithm: + * + * This algorithm assumes that r = sin (theta * a), where we + * evaluate theta on multiples of b. + * + * LCM (i, j) = i * j / GCD (i, j); + * + * So, at LCM (b, 360) we start over again. But since we + * got to LCM (b, 360) by steps of b, the number of lines is + * LCM (b, 360) / b. + * + * If a is odd, then at 180 we cross over and start the + * negative. Someone should write up an elegant way of proving + * this. Why? Because I'm not convinced of it myself. + * + */ +{ +#define odd(x) (x & 1) +#define even(x) (!odd(x)) + if ( odd(a) && odd(b) && even(d)) d /= 2; + return (d / gcd (d, b)); +#undef odd +} + +static int +compute_pedal(XPoint *points, int maxpoints) +/* + * Description: + * + * Basically, it's combination spirograph and string art. + * Instead of doing lines, we just use a complex polygon, + * and use an even/odd rule for filling in between. + * + * The spirograph, in mathematical terms is a polar + * plot of the form r = sin (theta * c); + * The string art of this is that we evaluate that + * function only on certain multiples of theta. That is + * we let theta advance in some random increment. And then + * we draw a straight line between those two adjacent points. + * + * Eventually, the lines will start repeating themselves + * if we've evaluated theta on some rational portion of the + * whole. + * + * The number of lines generated is limited to the + * ratio of the increment we put on theta to the whole. + * If we say that there are 360 degrees in a circle, then we + * will never have more than 360 lines. + * + * Return: + * + * The number of points. + * + */ +{ + int a, b, d; /* These describe a unique pedal */ + + double r; + int theta = 0; + XPoint *pp = points; + int count; + int numpoints; + + /* Just to make sure that this division is not done inside the loop */ + int h_width = sizex / 2, h_height = sizey / 2 ; + + for (;;) { + d = rand_range (MINLINES, maxlines); + + a = rand_range (1, d); + b = rand_range (1, d); + numpoints = numlines(a, b, d); + if (numpoints > MINLINES) break; + } + + /* it might be nice to try to move as much sin and cos computing + * (or at least the argument computing) out of the loop. + */ + for (count = numpoints; count-- ; ) + { + r = mysin (theta * a, d); + + /* Convert from polar to cartesian coordinates */ + /* We could round the results, but coercing seems just fine */ + pp->x = mysin (theta, d) * r * h_width + h_width; + pp->y = mycos (theta, d) * r * h_height + h_height; + + /* Advance index into array */ + pp++; + + /* Advance theta */ + theta += b; + theta %= d; + } + + return(numpoints); +} + +static void +init_pedal (Display *dpy, Window window) +{ + XGCValues gcv; + XWindowAttributes xgwa; + + fade_p = !mono_p; + + delay = get_integer_resource ("delay", "Integer"); + if (delay < 0) delay = 0; + + fadedelay = get_integer_resource ("fadedelay", "Integer"); + if (fadedelay < 0) fadedelay = 0; + + maxlines = get_integer_resource ("maxlines", "Integer"); + if (maxlines < MINLINES) maxlines = MINLINES; + else if (maxlines > MAXLINES) maxlines = MAXLINES; + + points = (XPoint *)malloc(sizeof(XPoint) * maxlines); + + XGetWindowAttributes (dpy, window, &xgwa); + sizex = xgwa.width; + sizey = xgwa.height; + + if ((xgwa.visual->class != GrayScale) && (xgwa.visual->class != PseudoColor)) + fade_p = False; + + cmap = xgwa.colormap; + + gcv.function = GXcopy; + gcv.foreground = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + gcv.background = get_pixel_resource ("background", "Background", dpy, cmap); + gc = XCreateGC (dpy, window, GCForeground | GCBackground |GCFunction, &gcv); + + if (fade_p) + { + int status; + foreground.pixel = gcv.foreground; + XQueryColor (dpy, cmap, &foreground); + + status = XAllocColorCells ( + dpy, + cmap, + 0, + NULL, + 0, + &foreground.pixel, + 1); + if (status) + { + XStoreColor ( dpy, cmap, &foreground); + XSetForeground (dpy, gc, foreground.pixel); + + background.pixel = gcv.background; + XQueryColor (dpy, cmap, &background); + } + else + { + /* If we cant allocate a color cell, then just forget the + * whole fade business. + */ + fade_p = False; + } + } +} + +static void +fade_foreground (Display *dpy, Colormap cmap, + XColor from, XColor to, int steps) +/* + * This routine assumes that we have a writeable colormap. + * That means that the default colormap is not full, and that + * the visual class is PseudoColor or GrayScale. + */ +{ + int i; + XColor inbetween; + int udelay = fadedelay / (steps + 1); + + inbetween = foreground; + for (i = 0; i <= steps; i++ ) + { + inbetween.red = from.red + (to.red - from.red) * i / steps ; + inbetween.green = from.green + (to.green - from.green) * i / steps ; + inbetween.blue = from.blue + (to.blue - from.blue) * i / steps ; + XStoreColor (dpy, cmap, &inbetween); + /* If we don't sync, these can bunch up */ + XSync(dpy, 0); + usleep(udelay); + } +} + +static void +pedal (Display *dpy, Window window) +/* + * Since the XFillPolygon doesn't require that the last + * point == first point, the number of points is the same + * as the number of lines. We just let XFillPolygon supply + * the line from the last point to the first point. + * + */ +{ + int numpoints; + + numpoints = compute_pedal(points, maxlines); + + /* Fade out, make foreground the same as background */ + if (fade_p) + fade_foreground (dpy, cmap, foreground, background, 32); + + /* Clear the window of previous garbage */ + XClearWindow (dpy, window); + + XFillPolygon ( + dpy, + window, + gc, + points, + numpoints, + Complex, + CoordModeOrigin); + + /* Pick a new foreground color (added by jwz) */ + if (! mono_p) + { + XColor color; + hsv_to_rgb (random()%360, 1.0, 1.0, + &color.red, &color.green, &color.blue); + XSync(dpy, 0); + if (fade_p) + { + foreground.red = color.red; + foreground.green = color.green; + foreground.blue = color.blue; + /* don't do this here -- let fade_foreground() bring it up! */ + /* XStoreColor (dpy, cmap, &foreground); */ + } + else if (XAllocColor (dpy, cmap, &color)) + { + XSetForeground (dpy, gc, color.pixel); + XFreeColors (dpy, cmap, &foreground.pixel, 1, 0); + foreground.red = color.red; + foreground.green = color.green; + foreground.blue = color.blue; + foreground.pixel = color.pixel; + } + XSync(dpy, 0); + } + + /* Fade in by bringing the foreground back from background */ + if (fade_p) + fade_foreground (dpy, cmap, background, foreground, 32); +} + + +char *progclass = "Pedal"; + +/* + * If we are trying to save the screen, the background + * should be dark. + */ +char *defaults [] = { + "Pedal.background: black", /* to placate SGI */ + "Pedal.foreground: white", + "*delay: 5", + "*fadedelay: 200000", + "*maxlines: 1000", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-fadedelay", ".fadedelay", XrmoptionSepArg, 0 }, + { "-maxlines", ".maxlines", XrmoptionSepArg, 0 }, + { "-foreground", ".foreground", XrmoptionSepArg, 0 }, + { "-background", ".background", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_pedal (dpy, window); + for (;;) { + pedal (dpy, window); + XSync(dpy, 0); + if (delay) sleep (delay); + } +} diff --git a/hacks/pedal.man b/hacks/pedal.man new file mode 100644 index 00000000..7a0c3e5b --- /dev/null +++ b/hacks/pedal.man @@ -0,0 +1,62 @@ +.TH XScreenSaver 1 "24-Jun-94" "X Version 11" +.SH NAME +pedal - pretty geometric picture program +.SH SYNOPSIS +.B pedal +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-delay \fIseconds\fP] [-maxlines \fInumber\fP] [-fadedelay \fIuseconds\fP] [-mono] [\-install] [\-visual \fIvisual\fP] +.SH DESCRIPTION +The \fIpedal\fP program displays pretty geometric pictures. +.SH OPTIONS +.I pedal +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 \-foreground \fIcolor\fP +The color for the foreground. Default is white. +.TP 8 +.B \-background \fIcolor\fP +The color for the background. Default is black. +.TP 8 +.B \-delay \fIseconds\fP +The number of seconds to pause between each picture. +.TP 8 +.B \-maxlines \fInumber\fP +The maximum number of lines in the drawing. Good values are +between 20 and 2000. Maximum value is 16K. +.TP 8 +.B \-fadedelay \fImicroseconds\fP +The number of micro seconds to take when fading in and out. +.TP 8 +.B \-mono +Don't do fading. Pretend we're on a monochrome display. +.PP +To make your X server grunt under load, and to impress your +friends, try \fIpedal -mono -delay 0 -maxlines 100\fp. +.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 1994, by Carnegie Mellon University. Permission to use, +copy, modify, distribute, and sell this software and its documentation +for any purpose is hereby granted without fee, provided fnord 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 fnord this software +for any purpose. It is provided "as is" without express or implied +warranty. +.SH AUTHOR +Dale Moore , 24-Jun-1994. diff --git a/hacks/penrose.c b/hacks/penrose.c new file mode 100644 index 00000000..ff8791e6 --- /dev/null +++ b/hacks/penrose.c @@ -0,0 +1,1267 @@ +/* -*- Mode: C; tab-width: 4 -*- + * penrose --- quasiperiodic tilings. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)penrose.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1996 by Timo Korvola + * + * 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: jwz@netscape.com: turned into a standalone program. + * 09-Sep-96: Written. + */ + +/*- +Be careful, this probably still has a few bugs (many of which may only +appear with a very low probability). These are seen with -verbose . +If one of these are hit penrose will reinitialize. +*/ + +/*- + * See Onoda, Steinhardt, DiVincenzo and Socolar in + * Phys. Rev. Lett. 60, #25, 1988 or + * Strandburg in Computers in Physics, Sep/Oct 1991. + * + * This implementation uses the simpler version of the growth + * algorithm, i.e., if there are no forced vertices, a randomly chosen + * tile is added to a randomly chosen vertex (no preference for those + * 108 degree angles). + * + * There are two essential differences to the algorithm presented in + * the literature: First, we do not allow the tiling to enclose an + * untiled area. Whenever this is in danger of happening, we just + * do not add the tile, hoping for a better random choice the next + * time. Second, when choosing a vertex randomly, we will take + * one that lies withing the viewport if available. If this seems to + * cause enclosures in the forced rule case, we will allow invisible + * vertices to be chosen. + * + * Tiling is restarted whenever one of the following happens: there + * are no incomplete vertices within the viewport or the tiling has + * extended a window's length beyond the edge of the window + * horizontally or vertically or forced rule choice has failed 100 + * times due to areas about to become enclosed. + * + */ + +#ifdef STANDALONE +# define PROGCLASS "Penrose" +# define HACK_INIT init_penrose +# define HACK_DRAW draw_penrose +# define penrose_opts xlockmore_opts +# define DEFAULTS "*delay: 10000 \n" \ + "*size: 40 \n" \ + "*ncolors: 64 \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + + +/*- + * Annoyingly the ANSI C library people have reserved all identifiers + * ending with _t for future use. Hence we use _c as a suffix for + * typedefs (c for class, although this is not C++). + */ + +#define MINSIZE 5 + +/*- + * In theory one could fit 10 tiles to a single vertex. However, the + * vertex rules only allow at most seven tiles to meet at a vertex. + */ + +#define CELEBRATE 31415927 /* This causes a pause, an error occurred. */ +#define COMPLETION 3141593 /* This causes a pause, an error occurred. */ + +#define MAX_TILES_PER_VERTEX 7 +#define N_VERTEX_RULES 8 +#define ALLOC_NODE( type) ((type *)malloc( sizeof( type))) +#define DEF_AMMANN "False" + +static Bool ammann; + +static XrmOptionDescRec opts[] = +{ + {"-ammann", ".penrose.ammann", XrmoptionNoArg, (caddr_t) "on"}, + {"+ammann", ".penrose.ammann", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & ammann, "ammann", "Ammann", DEF_AMMANN, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+ammann", "turn on/off Ammann lines"} +}; + +ModeSpecOpt penrose_opts = { 2, opts, 1, vars, desc }; + + +/*- + * These are used to specify directions. They can also be used in bit + * masks to specify a combination of directions. + */ +#define S_LEFT 1 +#define S_RIGHT 2 + + +/*- + * We do not actually maintain objects corresponding to the tiles since + * we do not really need them and they would only consume memory and + * cause additional bookkeeping. Instead we only have vertices, and + * each vertex lists the type of each adjacent tile as well as the + * position of the vertex on the tile (hereafter refered to as + * "corner"). These positions are numbered in counterclockwise order + * so that 0 is where two double arrows meet (see one of the + * articles). The tile type and vertex number are stored in a single + * integer (we use char, and even most of it remains unused). + * + * The primary use of tile objects would be draw traversal, but we do + * not currently do redraws at all (we just start over). + */ +#define VT_CORNER_MASK 0x3 +#define VT_TYPE_MASK 0x4 +#define VT_THIN 0 +#define VT_THICK 0x4 +#define VT_BITS 3 +#define VT_TOTAL_MASK 0x7 + +typedef unsigned char vertex_type_c; + +/*- + * These allow one to compute the types of the other corners of the tile. If + * you are standing at a vertex of type vt looking towards the middle of the + * tile, VT_LEFT( vt) is the vertex on your left etc. + */ +#define VT_LEFT( vt) ((((vt) - 1) & VT_CORNER_MASK) | (((vt) & VT_TYPE_MASK))) +#define VT_RIGHT( vt) ((((vt) + 1) & VT_CORNER_MASK) | (((vt) & VT_TYPE_MASK))) +#define VT_FAR( vt) ((vt) ^ 2) + + +/*- + * Since we do not do redraws, we only store the vertices we need. These are + * the ones with still some empty space around them for the growth algorithm + * to fill. + * + * Here we use a doubly chained ring-like structure as vertices often need + * to be removed or inserted (they are kept in geometrical order + * circling the tiled area counterclockwise). The ring is refered to by + * a pointer to one more or less random node. When deleting nodes one + * must make sure that this pointer continues to refer to a valid + * node. A vertex count is maintained to make it easier to pick + * vertices randomly. + */ +typedef struct forced_node forced_node_c; + +typedef struct fringe_node { + struct fringe_node *prev; + struct fringe_node *next; + /* These are numbered counterclockwise. The gap, if any, lies + between the last and first tiles. */ + vertex_type_c tiles[MAX_TILES_PER_VERTEX]; + int n_tiles; + /* A bit mask used to indicate vertex rules that are still applicable for + completing this vertex. Initialize this to (1 << N_VERTEX_RULES) - 1, + i.e., all ones, and the rule matching functions will automatically mask + out rules that no longer match. */ + unsigned char rule_mask; + /* If the vertex is on the forced vertex list, this points to the + pointer to the appropriate node in the list. To remove the + vertex from the list just set *list_ptr to the next node, + deallocate and decrement node count. */ + struct forced_node **list_ptr; + /* Screen coordinates. */ + XPoint loc; + /* We also keep track of 5D coordinates to avoid rounding errors. + These are in units of edge length. */ + int fived[5]; + /* This is used to quickly check if a vertex is visible. */ + unsigned char off_screen; +} fringe_node_c; + +typedef struct { + fringe_node_c *nodes; + /* This does not count off-screen nodes. */ + int n_nodes; +} fringe_c; + + +/*- + * The forced vertex pool contains vertices where at least one + * side of the tiled region can only be extended in one way. Note + * that this does not necessarily mean that there would only be one + * applicable rule. forced_sides are specified using S_LEFT and + * S_RIGHT as if looking at the untiled region from the vertex. + */ +struct forced_node { + fringe_node_c *vertex; + unsigned forced_sides; + struct forced_node *next; +}; + +typedef struct { + forced_node_c *first; + int n_nodes, n_visible; +} forced_pool_c; + + +/* This is the data related to the tiling of one screen. */ +typedef struct { + int width, height; + XPoint origin; + int edge_length; + fringe_c fringe; + forced_pool_c forced; + int done, failures; + int thick_color, thin_color; +} tiling_c; + +static tiling_c *tilings; /* = {0} */ + + +/* The tiles are listed in counterclockwise order. */ +typedef struct { + vertex_type_c tiles[MAX_TILES_PER_VERTEX]; + int n_tiles; +} vertex_rule_c; + +static vertex_rule_c vertex_rules[N_VERTEX_RULES] = +{ + { + {VT_THICK | 2, VT_THICK | 2, VT_THICK | 2, VT_THICK | 2, VT_THICK | 2}, 5}, + { + {VT_THICK | 0, VT_THICK | 0, VT_THICK | 0, VT_THICK | 0, VT_THICK | 0}, 5}, + { + {VT_THICK | 0, VT_THICK | 0, VT_THICK | 0, VT_THIN | 0}, 4}, + { + {VT_THICK | 2, VT_THICK | 2, VT_THIN | 1, VT_THIN | 3, VT_THICK | 2, + VT_THIN | 1, VT_THIN | 3}, 7}, + { + {VT_THICK | 2, VT_THICK | 2, VT_THICK | 2, VT_THICK | 2, + VT_THIN | 1, VT_THIN | 3}, 6}, + { + {VT_THICK | 1, VT_THICK | 3, VT_THIN | 2}, 3}, + { + {VT_THICK | 0, VT_THIN | 0, VT_THIN | 0}, 3}, + { + {VT_THICK | 2, VT_THIN | 1, VT_THICK | 3, VT_THICK | 1, VT_THIN | 3}, 5} +}; + + +/* Match information returned by match_rules. */ +typedef struct { + int rule; + int pos; +} rule_match_c; + + +/* Occasionally floating point coordinates are needed. */ +typedef struct { + float x, y; +} fcoord_c; + + +/* All angles are measured in multiples of 36 degrees. */ +typedef int angle_c; + +static angle_c vtype_angles[] = +{4, 1, 4, 1, 2, 3, 2, 3}; + +#define vtype_angle( v) (vtype_angles[ v]) + + +/* Direction angle of an edge. */ +static angle_c +vertex_dir(ModeInfo * mi, fringe_node_c * vertex, unsigned side) +{ + tiling_c *tp = &tilings[MI_SCREEN(mi)]; + fringe_node_c *v2 = + (side == S_LEFT ? vertex->next : vertex->prev); + register int i; + + for (i = 0; i < 5; i++) + switch (v2->fived[i] - vertex->fived[i]) { + case 1: + return 2 * i; + case -1: + return (2 * i + 5) % 10; + } + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, + "Weirdness in vertex_dir (this has been reported)\n"); + for (i = 0; i < 5; i++) + (void) fprintf(stderr, "v2->fived[%d]=%d, vertex->fived[%d]=%d\n", + i, v2->fived[i], i, vertex->fived[i]); + } + MI_PAUSE(mi) = CELEBRATE; + return 0; +} + + +/* Move one step to a given direction. */ +static void +add_unit_vec(angle_c dir, int *fived) +{ + static int dir2i[] = + {0, 3, 1, 4, 2}; + + while (dir < 0) + dir += 10; + fived[dir2i[dir % 5]] += (dir % 2 ? -1 : 1); +} + + +/* For comparing coordinates. */ +#define fived_equal( f1, f2) (!memcmp( (f1), (f2), 5 * sizeof( int))) + + +/*- + * This computes screen coordinates from 5D representation. Note that X + * uses left-handed coordinates (y increases downwards). + */ +static XPoint +fived_to_loc(int fived[], tiling_c * tp) +{ + static fcoord_c fived_table[5] = + { + {.0, .0}}; + float fifth = 8 * atan(1.) / 5; + register int i; + register float r; + register fcoord_c offset = + {.0, .0}; + XPoint pt = tp->origin; + + if (fived_table[0].x == .0) + for (i = 0; i < 5; i++) { + fived_table[i].x = cos(fifth * i); + fived_table[i].y = sin(fifth * i); + } + for (i = 0; i < 5; i++) { + r = fived[i] * tp->edge_length; + offset.x += r * fived_table[i].x; + offset.y -= r * fived_table[i].y; + } + pt.x += (int) (offset.x + .5); + pt.y += (int) (offset.y + .5); + return pt; +} + + +/* Mop up dynamic data for one screen. */ +static void +release_screen(tiling_c * tp) +{ + register fringe_node_c *fp1, *fp2; + register forced_node_c *lp1, *lp2; + + if (tp->fringe.nodes == 0) + return; + fp1 = tp->fringe.nodes; + do { + fp2 = fp1; + fp1 = fp1->next; + (void) free((char *) fp2); + } while (fp1 != tp->fringe.nodes); + tp->fringe.nodes = 0; + for (lp1 = tp->forced.first; lp1 != 0;) { + lp2 = lp1; + lp1 = lp1->next; + (void) free((char *) lp2); + } + tp->forced.first = 0; +} + + +/* Called to init the mode. */ +void +init_penrose(ModeInfo * mi) +{ + tiling_c *tp; + fringe_node_c *fp; + int i, size; + + if (tilings == NULL) { + if ((tilings = (tiling_c *) calloc(MI_NUM_SCREENS(mi), + sizeof (tiling_c))) == NULL) + return; + } + tp = &tilings[MI_SCREEN(mi)]; + tp->done = False; + tp->failures = 0; + tp->width = MI_WIN_WIDTH(mi); + tp->height = MI_WIN_HEIGHT(mi); + if (MI_NPIXELS(mi) > 2) { + tp->thick_color = NRAND(MI_NPIXELS(mi)); + /* Insure good contrast */ + tp->thin_color = (NRAND(2 * MI_NPIXELS(mi) / 3) + tp->thick_color + + MI_NPIXELS(mi) / 6) % MI_NPIXELS(mi); + } + size = MI_SIZE(mi); + if (size < -MINSIZE) + tp->edge_length = NRAND(MIN(-size, MAX(MINSIZE, + MIN(tp->width, tp->height) / 2)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + tp->edge_length = MAX(MINSIZE, MIN(tp->width, tp->height) / 2); + else + tp->edge_length = MINSIZE; + } else + tp->edge_length = MIN(size, MAX(MINSIZE, + MIN(tp->width, tp->height) / 2)); + tp->origin.x = (tp->width / 2 + NRAND(tp->width)) / 2; + tp->origin.y = (tp->height / 2 + NRAND(tp->height)) / 2; + tp->fringe.n_nodes = 2; + if (tp->fringe.nodes != 0) + release_screen(tp); + if (tp->fringe.nodes != 0 || tp->forced.first != 0) { + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in init_penrose()\n"); + (void) fprintf(stderr, "tp->fringe.nodes = 0 && tp->forced.first = 0\n"); + } + release_screen(tp); /* Try again */ + tp->done = True; + } + tp->forced.n_nodes = tp->forced.n_visible = 0; + fp = tp->fringe.nodes = ALLOC_NODE(fringe_node_c); + if (fp == 0) { + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in init_penrose()\n"); + (void) fprintf(stderr, "fp = 0\n"); + } + fp = tp->fringe.nodes = ALLOC_NODE(fringe_node_c); + tp->done = True; + } + /* First vertex. */ + fp->rule_mask = (1 << N_VERTEX_RULES) - 1; + fp->list_ptr = 0; + fp->prev = fp->next = ALLOC_NODE(fringe_node_c); + if (fp->next == 0) { + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in init_penrose()\n"); + (void) fprintf(stderr, "fp->next = 0\n"); + } + fp->prev = fp->next = ALLOC_NODE(fringe_node_c); + tp->done = True; + } + fp->n_tiles = 0; + fp->loc = tp->origin; + fp->off_screen = False; + for (i = 0; i < 5; i++) + fp->fived[i] = 0; + + /* Second vertex. */ + *(fp->next) = *fp; + fp->next->prev = fp->next->next = fp; + fp = fp->next; + i = NRAND(5); + fp->fived[i] = 2 * NRAND(2) - 1; + fp->loc = fived_to_loc(fp->fived, tp); + /* That's it! We have created our first edge. */ +} + +/*- + * This attempts to match the configuration of vertex with the vertex + * rules. The return value is a total match count. If matches is + * non-null, it will be used to store information about the matches + * and must be large enough to contain it. To play it absolutely + * safe, allocate room for MAX_TILES_PER_VERTEX * N_VERTEX_RULES + * entries when searching all matches. The rule mask of vertex will + * be applied and rules masked out will not be searched. Only strict + * subsequences match. If first_only is true, the search stops when + * the first match is found. Otherwise all matches will be found and + * the rule_mask of vertex will be updated, which also happens in + * single-match mode if no match is found. + */ +static int +match_rules(fringe_node_c * vertex, rule_match_c * matches, int first_only) +{ + /* I will assume that I can fit all the relevant bits in vertex->tiles + into one unsigned long. With 3 bits per element and at most 7 + elements this means 21 bits, which should leave plenty of room. + After packing the bits the rest is just integer comparisons and + some bit shuffling. This is essentially Rabin-Karp without + congruence arithmetic. */ + register int i, j; + int hits = 0, good_rules[N_VERTEX_RULES], n_good = 0; + unsigned long + vertex_hash = 0, lower_bits_mask = ~(VT_TOTAL_MASK << VT_BITS * (vertex->n_tiles - 1)); + unsigned new_rule_mask = 0; + + for (i = 0; i < N_VERTEX_RULES; i++) + if (vertex->n_tiles >= vertex_rules[i].n_tiles) + vertex->rule_mask &= ~(1 << i); + else if (vertex->rule_mask & 1 << i) + good_rules[n_good++] = i; + for (i = 0; i < vertex->n_tiles; i++) + vertex_hash |= (unsigned long) vertex->tiles[i] << (VT_BITS * i); + + for (j = 0; j < n_good; j++) { + unsigned long rule_hash = 0; + vertex_rule_c *vr = vertex_rules + good_rules[j]; + + for (i = 0; i < vertex->n_tiles; i++) + rule_hash |= (unsigned long) vr->tiles[i] << (VT_BITS * i); + if (rule_hash == vertex_hash) { + if (matches != 0) { + matches[hits].rule = good_rules[j]; + matches[hits].pos = 0; + } + hits++; + if (first_only) + return hits; + else + new_rule_mask |= 1 << good_rules[j]; + } + for (i = vr->n_tiles - 1; i > 0; i--) { + rule_hash = vr->tiles[i] | (rule_hash & lower_bits_mask) << VT_BITS; + if (vertex_hash == rule_hash) { + if (matches != 0) { + matches[hits].rule = good_rules[j]; + matches[hits].pos = i; + } + hits++; + if (first_only) + return hits; + else + new_rule_mask |= 1 << good_rules[j]; + } + } + } + vertex->rule_mask = new_rule_mask; + return hits; +} + + +/*- + * find_completions finds the possible ways to add a tile to a vertex. + * The return values is the number of such possibilities. You must + * first call match_rules to produce matches and n_matches. sides + * specifies which side of the vertex to extend and can be S_LEFT or + * S_RIGHT. If results is non-null, it should point to an array large + * enough to contain the results, which will be stored there. + * MAX_COMPL elements will always suffice. If first_only is true we + * stop as soon as we find one possibility (NOT USED). + */ +#define MAX_COMPL 2 + +static int +find_completions(fringe_node_c * vertex, rule_match_c * matches, int n_matches, + unsigned side, vertex_type_c * results /*, int first_only */ ) +{ + int n_res = 0, cont; + register int i, j; + vertex_type_c buf[MAX_COMPL]; + + if (results == 0) + results = buf; + if (n_matches <= 0) + return 0; + for (i = 0; i < n_matches; i++) { + vertex_rule_c *rule = vertex_rules + matches[i].rule; + int pos = (matches[i].pos + + (side == S_RIGHT ? vertex->n_tiles : rule->n_tiles - 1)) + % rule->n_tiles; + vertex_type_c vtype = rule->tiles[pos]; + + cont = 1; + for (j = 0; j < n_res; j++) + if (vtype == results[j]) { + cont = 0; + break; + } + if (cont) + results[n_res++] = vtype; + } + return n_res; +} + + +/*- + * Draw a tile on the display. Vertices must be given in a + * counterclockwise order. vtype is the vertex type of v1 (and thus + * also gives the tile type). + */ +static void +draw_tile(fringe_node_c * v1, fringe_node_c * v2, + fringe_node_c * v3, fringe_node_c * v4, + vertex_type_c vtype, ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + tiling_c *tp = &tilings[MI_SCREEN(mi)]; + XPoint pts[5]; + vertex_type_c corner = vtype & VT_CORNER_MASK; + + if (v1->off_screen && v2->off_screen && v3->off_screen && v4->off_screen) + return; + pts[corner] = v1->loc; + pts[VT_RIGHT(corner)] = v2->loc; + pts[VT_FAR(corner)] = v3->loc; + pts[VT_LEFT(corner)] = v4->loc; + pts[4] = pts[0]; + if (MI_NPIXELS(mi) > 2) { + if ((vtype & VT_TYPE_MASK) == VT_THICK) + XSetForeground(display, gc, MI_PIXEL(mi, tp->thick_color)); + else + XSetForeground(display, gc, MI_PIXEL(mi, tp->thin_color)); + } else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + XFillPolygon(display, window, gc, pts, 4, Convex, CoordModeOrigin); + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + XDrawLines(display, window, gc, pts, 5, CoordModeOrigin); + + if (ammann) { + /* Draw some Ammann lines for debugging purposes. This will probably + fail miserably on a b&w display. */ + + if ((vtype & VT_TYPE_MASK) == VT_THICK) { + static float r = .0; + + if (r == .0) { + float pi10 = 2 * atan(1.) / 5; + + r = 1 - sin(pi10) / (2 * sin(3 * pi10)); + } + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, tp->thin_color)); + else { + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + XSetLineAttributes(display, gc, 1, LineOnOffDash, CapNotLast, JoinMiter); + } + XDrawLine(display, window, gc, + (int) (r * pts[3].x + (1 - r) * pts[0].x + .5), + (int) (r * pts[3].y + (1 - r) * pts[0].y + .5), + (int) (r * pts[1].x + (1 - r) * pts[0].x + .5), + (int) (r * pts[1].y + (1 - r) * pts[0].y + .5)); + if (MI_NPIXELS(mi) <= 2) + XSetLineAttributes(display, gc, 1, LineSolid, CapNotLast, JoinMiter); + } else { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, tp->thick_color)); + else { + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + XSetLineAttributes(display, gc, 1, LineOnOffDash, CapNotLast, JoinMiter); + } + XDrawLine(display, window, gc, + (int) ((pts[3].x + pts[2].x) / 2 + .5), + (int) ((pts[3].y + pts[2].y) / 2 + .5), + (int) ((pts[1].x + pts[2].x) / 2 + .5), + (int) ((pts[1].y + pts[2].y) / 2 + .5)); + if (MI_NPIXELS(mi) <= 2) + XSetLineAttributes(display, gc, 1, LineSolid, CapNotLast, JoinMiter); + } + } +} + +/*- + * Update the status of this vertex on the forced vertex queue. If + * the vertex has become untileable set tp->done. This is supposed + * to detect dislocations -- never call this routine with a completely + * tiled vertex. + * + * Check for untileable vertices in check_vertex and stop tiling as + * soon as one finds one. I don't know if it is possible to run out + * of forced vertices while untileable vertices exist (or will + * cavities inevitably appear). If this can happen, add_random_tile + * might get called with an untileable vertex, causing ( n <= 1). + * (This is what the tp->done checks for). + * + * A MI_PAUSE celebrates the dislocation. + */ +static void +check_vertex(ModeInfo * mi, fringe_node_c * vertex, tiling_c * tp) +{ + rule_match_c hits[MAX_TILES_PER_VERTEX * N_VERTEX_RULES]; + int n_hits = match_rules(vertex, hits, False); + unsigned forced_sides = 0; + + if (vertex->rule_mask == 0) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Dislocation occured!\n"); + } + MI_PAUSE(mi) = CELEBRATE; /* Should be able to recover */ + } + if (1 == find_completions(vertex, hits, n_hits, S_LEFT, 0 /*, False */ )) + forced_sides |= S_LEFT; + if (1 == find_completions(vertex, hits, n_hits, S_RIGHT, 0 /*, False */ )) + forced_sides |= S_RIGHT; + if (forced_sides == 0) { + if (vertex->list_ptr != 0) { + forced_node_c *node = *vertex->list_ptr; + + *vertex->list_ptr = node->next; + if (node->next != 0) + node->next->vertex->list_ptr = vertex->list_ptr; + free(node); + tp->forced.n_nodes--; + if (!vertex->off_screen) + tp->forced.n_visible--; + vertex->list_ptr = 0; + } + } else { + forced_node_c *node; + + if (vertex->list_ptr == 0) { + node = ALLOC_NODE(forced_node_c); + node->vertex = vertex; + node->next = tp->forced.first; + if (tp->forced.first != 0) + tp->forced.first->vertex->list_ptr = &(node->next); + tp->forced.first = node; + vertex->list_ptr = &(tp->forced.first); + tp->forced.n_nodes++; + if (!vertex->off_screen) + tp->forced.n_visible++; + } else + node = *vertex->list_ptr; + node->forced_sides = forced_sides; + } +} + + +/*- + * Delete this vertex. If the vertex is a member of the forced vertex queue, + * also remove that entry. We assume that the vertex is no longer + * connected to the fringe. Note that tp->fringe.nodes must not point to + * the vertex being deleted. + */ +static void +delete_vertex(ModeInfo * mi, fringe_node_c * vertex, tiling_c * tp) +{ + if (tp->fringe.nodes == vertex) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in delete_penrose()\n"); + (void) fprintf(stderr, "tp->fringe.nodes == vertex\n"); + } + MI_PAUSE(mi) = CELEBRATE; + } + if (vertex->list_ptr != 0) { + forced_node_c *node = *vertex->list_ptr; + + *vertex->list_ptr = node->next; + if (node->next != 0) + node->next->vertex->list_ptr = vertex->list_ptr; + free(node); + tp->forced.n_nodes--; + if (!vertex->off_screen) + tp->forced.n_visible--; + } + if (!vertex->off_screen) + tp->fringe.n_nodes--; + free(vertex); +} + + +/* Check whether the addition of a tile of type vtype would completely fill * + the space available at vertex. */ +static int +fills_vertex(ModeInfo * mi, vertex_type_c vtype, fringe_node_c * vertex) +{ + return + (vertex_dir(mi, vertex, S_LEFT) - vertex_dir(mi, vertex, S_RIGHT) + - vtype_angle(vtype)) % 10 == 0; +} + + +/*- + * If you were to add a tile of type vtype to a specified side of + * vertex, fringe_changes tells you which other vertices it would + * attach to. The addresses of these vertices will be stored in the + * last three arguments. Null is stored if the corresponding vertex + * would need to be allocated. + * + * The function also analyzes which vertices would be swallowed by the tiling + * and thus cut off from the fringe. The result is returned as a bit pattern. + */ +#define FC_BAG 1 /* Total enclosure. Should never occur. */ +#define FC_NEW_RIGHT 2 +#define FC_NEW_FAR 4 +#define FC_NEW_LEFT 8 +#define FC_NEW_MASK 0xe +#define FC_CUT_THIS 0x10 +#define FC_CUT_RIGHT 0x20 +#define FC_CUT_FAR 0x40 +#define FC_CUT_LEFT 0x80 +#define FC_CUT_MASK 0xf0 +#define FC_TOTAL_MASK 0xff + +static unsigned +fringe_changes(ModeInfo * mi, fringe_node_c * vertex, + unsigned side, vertex_type_c vtype, + fringe_node_c ** right, fringe_node_c ** far, + fringe_node_c ** left) +{ + fringe_node_c *v, *f = NULL; + unsigned result = FC_NEW_FAR; /* We clear this later if necessary. */ + + if (far) + *far = 0; + if (fills_vertex(mi, vtype, vertex)) { + result |= FC_CUT_THIS; + } else if (side == S_LEFT) { + result |= FC_NEW_RIGHT; + if (right) + *right = 0; + } else { + result |= FC_NEW_LEFT; + if (left) + *left = 0; + } + + if (!(result & FC_NEW_LEFT)) { + v = vertex->next; + if (left) + *left = v; + if (fills_vertex(mi, VT_LEFT(vtype), v)) { + result = (result & ~FC_NEW_FAR) | FC_CUT_LEFT; + f = v->next; + if (far) + *far = f; + } + } + if (!(result & FC_NEW_RIGHT)) { + v = vertex->prev; + if (right) + *right = v; + if (fills_vertex(mi, VT_RIGHT(vtype), v)) { + result = (result & ~FC_NEW_FAR) | FC_CUT_RIGHT; + f = v->prev; + if (far) + *far = f; + } + } + if (!(result & FC_NEW_FAR) + && fills_vertex(mi, VT_FAR(vtype), f)) { + result |= FC_CUT_FAR; + result &= (~FC_NEW_LEFT & ~FC_NEW_RIGHT); + if (right && (result & FC_CUT_LEFT)) + *right = f->next; + if (left && (result & FC_CUT_RIGHT)) + *left = f->prev; + } + if (((result & FC_CUT_LEFT) && (result & FC_CUT_RIGHT)) + || ((result & FC_CUT_THIS) && (result & FC_CUT_FAR))) + result |= FC_BAG; + return result; +} + + +/* A couple of lesser helper functions for add_tile. */ +static void +add_vtype(fringe_node_c * vertex, unsigned side, vertex_type_c vtype) +{ + if (side == S_RIGHT) + vertex->tiles[vertex->n_tiles++] = vtype; + else { + register int i; + + for (i = vertex->n_tiles; i > 0; i--) + vertex->tiles[i] = vertex->tiles[i - 1]; + vertex->tiles[0] = vtype; + vertex->n_tiles++; + } +} + +static fringe_node_c * +alloc_vertex(ModeInfo * mi, angle_c dir, fringe_node_c * from, tiling_c * tp) +{ + fringe_node_c *v = ALLOC_NODE(fringe_node_c); + + if (v == 0) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in alloc_vertex()\n"); + (void) fprintf(stderr, "v = 0\n"); + } + MI_PAUSE(mi) = CELEBRATE; + } + *v = *from; + add_unit_vec(dir, v->fived); + v->loc = fived_to_loc(v->fived, tp); + if (v->loc.x < 0 || v->loc.y < 0 + || v->loc.x >= tp->width || v->loc.y >= tp->height) { + v->off_screen = True; + if (v->loc.x < -tp->width || v->loc.y < -tp->height + || v->loc.x >= 2 * tp->width || v->loc.y >= 2 * tp->height) + tp->done = True; + } else { + v->off_screen = False; + tp->fringe.n_nodes++; + } + v->n_tiles = 0; + v->rule_mask = (1 << N_VERTEX_RULES) - 1; + v->list_ptr = 0; + return v; +} + +/* + * Add a tile described by vtype to the side of vertex. This must be + * allowed by the rules -- we do not check it here. New vertices are + * allocated as necessary. The fringe and the forced vertex pool are updated. + * The new tile is drawn on the display. + * + * One thing we do check here is whether the new tile causes an untiled + * area to become enclosed by the tiling. If this would happen, the tile + * is not added. The return value is true iff a tile was added. + */ +static int +add_tile(ModeInfo * mi, + fringe_node_c * vertex, unsigned side, vertex_type_c vtype) +{ + tiling_c *tp = &tilings[MI_SCREEN(mi)]; + + fringe_node_c + * left = 0, + *right = 0, + *far = 0, + *node; + unsigned fc = fringe_changes(mi, vertex, side, vtype, &right, &far, &left); + + vertex_type_c + ltype = VT_LEFT(vtype), + rtype = VT_RIGHT(vtype), + ftype = VT_FAR(vtype); + + /* By our conventions vertex->next lies to the left of vertex and + vertex->prev to the right. */ + + /* This should never occur. */ + if (fc & FC_BAG) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in add_tile()\n"); + (void) fprintf(stderr, "fc = %d, FC_BAG = %d\n", fc, FC_BAG); + } + } + if (side == S_LEFT) { + if (right == 0) + right = alloc_vertex(mi, + vertex_dir(mi, vertex, S_LEFT) - vtype_angle(vtype), vertex, tp); + if (far == 0) + far = alloc_vertex(mi, + vertex_dir(mi, left, S_RIGHT) + vtype_angle(ltype), left, tp); + } else { + if (left == 0) + left = alloc_vertex(mi, + vertex_dir(mi, vertex, S_RIGHT) + vtype_angle(vtype), vertex, tp); + if (far == 0) + far = alloc_vertex(mi, + vertex_dir(mi, right, S_LEFT) - vtype_angle(rtype), right, tp); + } + + /* Having allocated the new vertices, but before joining them with + the rest of the fringe, check if vertices with same coordinates + already exist. If any such are found, give up. */ + node = tp->fringe.nodes; + do { + if (((fc & FC_NEW_LEFT) && fived_equal(node->fived, left->fived)) + || ((fc & FC_NEW_RIGHT) && fived_equal(node->fived, right->fived)) + || ((fc & FC_NEW_FAR) && fived_equal(node->fived, far->fived))) { + /* Better luck next time. */ + if (fc & FC_NEW_LEFT) + delete_vertex(mi, left, tp); + if (fc & FC_NEW_RIGHT) + delete_vertex(mi, right, tp); + if (fc & FC_NEW_FAR) + delete_vertex(mi, far, tp); + return False; + } + node = node->next; + } while (node != tp->fringe.nodes); + + /* Rechain. */ + if (!(fc & FC_CUT_THIS)) + if (side == S_LEFT) { + vertex->next = right; + right->prev = vertex; + } else { + vertex->prev = left; + left->next = vertex; + } + if (!(fc & FC_CUT_FAR)) { + if (!(fc & FC_CUT_LEFT)) { + far->next = left; + left->prev = far; + } + if (!(fc & FC_CUT_RIGHT)) { + far->prev = right; + right->next = far; + } + } + draw_tile(vertex, right, far, left, vtype, mi); + + /* Delete vertices that are no longer on the fringe. Check the others. */ + if (fc & FC_CUT_THIS) { + tp->fringe.nodes = far; + delete_vertex(mi, vertex, tp); + } else { + add_vtype(vertex, side, vtype); + check_vertex(mi, vertex, tp); + tp->fringe.nodes = vertex; + } + if (fc & FC_CUT_FAR) + delete_vertex(mi, far, tp); + else { + add_vtype(far, fc & FC_CUT_RIGHT ? S_LEFT : S_RIGHT, ftype); + check_vertex(mi, far, tp); + } + if (fc & FC_CUT_LEFT) + delete_vertex(mi, left, tp); + else { + add_vtype(left, fc & FC_CUT_FAR ? S_LEFT : S_RIGHT, ltype); + check_vertex(mi, left, tp); + } + if (fc & FC_CUT_RIGHT) + delete_vertex(mi, right, tp); + else { + add_vtype(right, fc & FC_CUT_FAR ? S_RIGHT : S_LEFT, rtype); + check_vertex(mi, right, tp); + } + return True; +} + + +/*- + * Add a forced tile to a given forced vertex. Basically an easy job, + * since we know what to add. But it might fail if adding the tile + * would cause some untiled area to become enclosed. There is also another + * more exotic culprit: we might have a dislocation. Fortunately, they + * are very rare (the PRL article reported that perfect tilings of over + * 2^50 tiles had been generated). There is a version of the algorithm + * that doesn't produce dislocations, but it's a lot hairier than the + * simpler version I used. + */ +static int +add_forced_tile(ModeInfo * mi, forced_node_c * node) +{ + tiling_c *tp = &tilings[MI_SCREEN(mi)]; + unsigned side; + vertex_type_c vtype; + rule_match_c hits[MAX_TILES_PER_VERTEX * N_VERTEX_RULES]; + int n; + + if (node->forced_sides == (S_LEFT | S_RIGHT)) + side = NRAND(2) ? S_LEFT : S_RIGHT; + else + side = node->forced_sides; + n = match_rules(node->vertex, hits, True); + n = find_completions(node->vertex, hits, n, side, &vtype /*, True */ ); + if (n <= 0) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in add_forced_tile()\n"); + (void) fprintf(stderr, "n = %d\n", n); + } + } + return add_tile(mi, node->vertex, side, vtype); +} + + +/*- + * Whether the addition of a tile of vtype on the given side of vertex + * would conform to the rules. The efficient way to do this would be + * to add the new tile and then use the same type of search as in + * match_rules. However, this function is not a performance + * bottleneck (only needed for random tile additions, which are + * relatively infrequent), so I will settle for a simpler implementation. + */ +static int +legal_move(fringe_node_c * vertex, unsigned side, vertex_type_c vtype) +{ + rule_match_c hits[MAX_TILES_PER_VERTEX * N_VERTEX_RULES]; + vertex_type_c legal_vt[MAX_COMPL]; + int n_hits, n_legal, i; + + n_hits = match_rules(vertex, hits, False); + n_legal = find_completions(vertex, hits, n_hits, side, legal_vt /*, False */ ); + for (i = 0; i < n_legal; i++) + if (legal_vt[i] == vtype) + return True; + return False; +} + + +/*- + * Add a randomly chosen tile to a given vertex. This requires more checking + * as we must make sure the new tile conforms to the vertex rules at every + * vertex it touches. */ +static void +add_random_tile(fringe_node_c * vertex, ModeInfo * mi) +{ + fringe_node_c *right, *left, *far; + int i, j, n, n_hits, n_good; + unsigned side, fc, no_good, s; + vertex_type_c vtypes[MAX_COMPL]; + rule_match_c hits[MAX_TILES_PER_VERTEX * N_VERTEX_RULES]; + tiling_c *tp = &tilings[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) > 2) { + tp->thick_color = NRAND(MI_NPIXELS(mi)); + /* Insure good contrast */ + tp->thin_color = (NRAND(2 * MI_NPIXELS(mi) / 3) + tp->thick_color + + MI_NPIXELS(mi) / 6) % MI_NPIXELS(mi); + } else + tp->thick_color = tp->thin_color = MI_WIN_WHITE_PIXEL(mi); + n_hits = match_rules(vertex, hits, False); + side = NRAND(2) ? S_LEFT : S_RIGHT; + n = find_completions(vertex, hits, n_hits, side, vtypes /*, False */ ); + /* One answer would mean a forced tile. */ + if (n <= 0) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in add_random_tile()\n"); + (void) fprintf(stderr, "n = %d\n", n); + } + } + no_good = 0; + n_good = n; + for (i = 0; i < n; i++) { + fc = fringe_changes(mi, vertex, side, vtypes[i], &right, &far, &left); + if (fc & FC_BAG) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in add_random_tile()\n"); + (void) fprintf(stderr, "fc = %d, FC_BAG = %d\n", fc, FC_BAG); + } + } + if (right) { + s = (((fc & FC_CUT_FAR) && (fc & FC_CUT_LEFT)) ? S_RIGHT : S_LEFT); + if (!legal_move(right, s, VT_RIGHT(vtypes[i]))) { + no_good |= (1 << i); + n_good--; + continue; + } + } + if (left) { + s = (((fc & FC_CUT_FAR) && (fc & FC_CUT_RIGHT)) ? S_LEFT : S_RIGHT); + if (!legal_move(left, s, VT_LEFT(vtypes[i]))) { + no_good |= (1 << i); + n_good--; + continue; + } + } + if (far) { + s = ((fc & FC_CUT_LEFT) ? S_RIGHT : S_LEFT); + if (!legal_move(far, s, VT_FAR(vtypes[i]))) { + no_good |= (1 << i); + n_good--; + } + } + } + if (n_good <= 0) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in add_random_tile()\n"); + (void) fprintf(stderr, "n_good = %d\n", n_good); + } + } + n = NRAND(n_good); + for (i = j = 0; i <= n; i++, j++) + while (no_good & (1 << j)) + j++; + + i = add_tile(mi, vertex, side, vtypes[j - 1]); + if (!i) { + tp->done = True; + if (MI_WIN_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in add_random_tile()\n"); + (void) fprintf(stderr, "i = %d\n", i); + } + } +} + +/* One step of the growth algorithm. */ +void +draw_penrose(ModeInfo * mi) +{ + tiling_c *tp = &tilings[MI_SCREEN(mi)]; + int i = 0, n; + forced_node_c *p = tp->forced.first; + + if (tp->done || tp->failures >= 100) { + init_penrose(mi); + return; + } + /* Check for the initial "2-gon". */ + if (tp->fringe.nodes->prev == tp->fringe.nodes->next) { + vertex_type_c vtype = VT_TOTAL_MASK & LRAND(); + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + (void) add_tile(mi, tp->fringe.nodes, S_LEFT, vtype); + return; + } + /* No visible nodes left. */ + if (tp->fringe.n_nodes == 0) { + tp->done = True; + MI_PAUSE(mi) = COMPLETION; /* Just finished drawing */ + return; + } + if (tp->forced.n_visible > 0 && tp->failures < 10) { + n = NRAND(tp->forced.n_visible); + for (;;) { + while (p->vertex->off_screen) + p = p->next; + if (i++ < n) + p = p->next; + else + break; + } + } else if (tp->forced.n_nodes > 0) { + n = NRAND(tp->forced.n_nodes); + while (i++ < n) + p = p->next; + } else { + fringe_node_c *p = tp->fringe.nodes; + + n = NRAND(tp->fringe.n_nodes); + i = 0; + for (; i <= n; i++) + do { + p = p->next; + } while (p->off_screen); + add_random_tile(p, mi); + tp->failures = 0; + return; + } + if (add_forced_tile(mi, p)) + tp->failures = 0; + else + tp->failures++; +} + + +/* Total clean-up. */ +void +release_penrose(ModeInfo * mi) +{ + if (tilings != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + tiling_c *tp = &tilings[screen]; + + release_screen(tp); + } + (void) free((void *) tilings); + tilings = NULL; + } +} diff --git a/hacks/penrose.man b/hacks/penrose.man new file mode 100644 index 00000000..7460e39e --- /dev/null +++ b/hacks/penrose.man @@ -0,0 +1,93 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +penrose - draws quasiperiodic tilings +.SH SYNOPSIS +.B penrose +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-size \fIinteger\fP] [\-ammann] [\-no\-ammann] + +.SH DESCRIPTION +The \fIpenrose\fP program draws quasiperiodic tilings. + +See Onoda, Steinhardt, DiVincenzo and Socolar in +Phys. Rev. Lett. 60, #25, 1988 or +Strandburg in Computers in Physics, Sep/Oct 1991. + +This implementation uses the simpler version of the growth +algorithm, i.e., if there are no forced vertices, a randomly chosen +tile is added to a randomly chosen vertex (no preference for those +108 degree angles). + +There are two essential differences to the algorithm presented in +the literature: First, we do not allow the tiling to enclose an +untiled area. Whenever this is in danger of happening, we just +do not add the tile, hoping for a better random choice the next +time. Second, when choosing a vertex randomly, we will take +one that lies withing the viewport if available. If this seems to +cause enclosures in the forced rule case, we will allow invisible +vertices to be chosen. + +Tiling is restarted whenever one of the following happens: there +are no incomplete vertices within the viewport or the tiling has +extended a window's length beyond the edge of the window +horizontally or vertically or forced rule choice has failed 100 +times due to areas about to become enclosed. + +.SH OPTIONS +.I penrose +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 64. +The colors are chosen randomly. +.TP 8 +.B \-size \fIinteger\fP +How big the tiles should be. Default 40 pixels. + +.TP 8 +.B \-ammann \fIinteger\fP +.TP 8 +.B \-no\-ammann \fIinteger\fP +Whether Ammann lines should be added. + +.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 1996 by Timo Korvola. + +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 +Timo Korvola , 1996. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/pyro.c b/hacks/pyro.c new file mode 100644 index 00000000..3b0a1d2d --- /dev/null +++ b/hacks/pyro.c @@ -0,0 +1,248 @@ +/* xscreensaver, Copyright (c) 1992, 1994, 1996 + * 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. + */ + +/* Draw some fireworks. Inspired from TI Explorer Lisp code by + John S. Pezaris + */ + +#include "screenhack.h" + +struct projectile { + int x, y; /* position */ + int dx, dy; /* velocity */ + int decay; + int size; + int fuse; + Bool primary; + Bool dead; + XColor color; + struct projectile *next_free; +}; + +static struct projectile *projectiles, *free_projectiles; + +static struct projectile * +get_projectile (void) +{ + struct projectile *p; + if (free_projectiles) + { + p = free_projectiles; + free_projectiles = p->next_free; + p->next_free = 0; + p->dead = False; + return p; + } + else + return 0; +} + +static void +free_projectile (struct projectile *p) +{ + p->next_free = free_projectiles; + free_projectiles = p; + p->dead = True; +} + +static void +launch (int xlim, int ylim, int g, + Display *dpy, Colormap cmap) +{ + struct projectile *p = get_projectile (); + int x, dx, xxx; + if (! p) return; + + do { + x = (random () % xlim); + dx = 30000 - (random () % 60000); + xxx = x + (dx * 200); + } while (xxx <= 0 || xxx >= xlim); + + p->x = x; + p->y = ylim; + p->dx = dx; + p->size = 8000; + p->decay = 0; + p->dy = (random () % 4000) - 13000; + p->fuse = ((((random () % 500) + 500) * abs (p->dy / g)) / 1000); + p->primary = True; + + if (! mono_p) + { + hsv_to_rgb (random () % 360, 1.0, 1.0, + &p->color.red, &p->color.green, &p->color.blue); + p->color.flags = DoRed | DoGreen | DoBlue; + if (!XAllocColor (dpy, cmap, &p->color)) + { + p->color.pixel = WhitePixel (dpy, DefaultScreen (dpy)); + p->color.red = p->color.green = p->color.blue = 0xFFFF; + } + } +} + +static struct projectile * +shrapnel (struct projectile *parent, Display *dpy, Colormap cmap) +{ + struct projectile *p = get_projectile (); + if (! p) return 0; + p->x = parent->x; + p->y = parent->y; + p->dx = (random () % 5000) - 2500 + parent->dx; + p->dy = (random () % 5000) - 2500 + parent->dy; + p->decay = (random () % 50) - 60; + p->size = (parent->size * 2) / 3; + p->fuse = 0; + p->primary = False; + + p->color = parent->color; + if (! mono_p) + XAllocColor (dpy, cmap, &p->color); /* dup the lock */ + + return p; +} + +static GC draw_gc, erase_gc; +static unsigned int default_fg_pixel; + +static int how_many, frequency, scatter; + +static Colormap +init_pyro (Display *dpy, Window window) +{ + int i; + Colormap cmap; + XGCValues gcv; + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + how_many = get_integer_resource ("count", "Integer"); + frequency = get_integer_resource ("frequency", "Integer"); + scatter = get_integer_resource ("scatter", "Integer"); + if (how_many <= 0) how_many = 100; + if (frequency <= 0) frequency = 30; + if (scatter <= 0) scatter = 20; + projectiles = 0; + free_projectiles = 0; + projectiles = (struct projectile *) + calloc (how_many, sizeof (struct projectile)); + for (i = 0; i < how_many; i++) + free_projectile (&projectiles [i]); + 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); + XClearWindow (dpy, window); + return cmap; +} + +static void +pyro (Display *dpy, Window window, Colormap cmap) +{ + XWindowAttributes xgwa; + static int xlim, ylim, real_xlim, real_ylim; + int g = 100; + int i; + + if ((random () % frequency) == 0) + { + XGetWindowAttributes (dpy, window, &xgwa); + real_xlim = xgwa.width; + real_ylim = xgwa.height; + xlim = real_xlim * 1000; + ylim = real_ylim * 1000; + launch (xlim, ylim, g, dpy, cmap); + } + + XSync (dpy, True); + usleep (10000); + + for (i = 0; i < how_many; i++) + { + struct projectile *p = &projectiles [i]; + int old_x, old_y, old_size; + int size, x, y; + if (p->dead) continue; + old_x = p->x >> 10; + old_y = p->y >> 10; + old_size = p->size >> 10; + size = (p->size += p->decay) >> 10; + x = (p->x += p->dx) >> 10; + y = (p->y += p->dy) >> 10; + p->dy += (p->size >> 6); + if (p->primary) p->fuse--; + + /* erase old one */ + XFillRectangle (dpy, window, erase_gc, old_x, old_y, + old_size, old_size); + + if ((p->primary ? (p->fuse > 0) : (p->size > 0)) && + x < real_xlim && + y < real_ylim && + x > 0 && + y > 0) + { + if (mono_p || p->primary) + XSetForeground (dpy, draw_gc, default_fg_pixel); + else + XSetForeground (dpy, draw_gc, p->color.pixel); + + if /*(p->primary)*/ (size > 2) + XFillArc (dpy, window, draw_gc, x, y, size, size, 0, 360*64); + else + XFillRectangle (dpy, window, draw_gc, x, y, size, size); + } + else + { + free_projectile (p); + if (! mono_p) + if (p->color.pixel != WhitePixel (dpy, DefaultScreen (dpy))) + XFreeColors (dpy, cmap, &p->color.pixel, 1, 0); + } + + if (p->primary && p->fuse <= 0) + { + int j = (random () % scatter) + (scatter/2); + while (j--) + shrapnel (p, dpy, cmap); + } + } +} + + +char *progclass = "Pyro"; + +char *defaults [] = { + "Pyro.background: black", /* to placate SGI */ + "Pyro.foreground: white", + "*count: 100", + "*frequency: 30", + "*scatter: 20", + "*geometry: 800x500", + 0 +}; + +XrmOptionDescRec options [] = { + { "-count", ".count", XrmoptionSepArg, 0 }, + { "-frequency", ".frequency", XrmoptionSepArg, 0 }, + { "-scatter", ".scatter", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + Colormap cmap = init_pyro (dpy, window); + while (1) + pyro (dpy, window, cmap); +} diff --git a/hacks/pyro.man b/hacks/pyro.man new file mode 100644 index 00000000..8edb9669 --- /dev/null +++ b/hacks/pyro.man @@ -0,0 +1,60 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +pyro - simulate fireworks +.SH SYNOPSIS +.B pyro +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-count \fIinteger\fP] [\-frequency \fIinteger\fP] [\-scatter \fIinteger\fP] +.SH DESCRIPTION +The \fIpyro\fP program simulates fireworks, in a way similar to a Macintosh +program of the same name. +.SH OPTIONS +.I pyro +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 \-count \fIinteger\fP +How many particles should be allowed on the screen at once. Default 100. +.TP 8 +.B \-frequency \fIinteger\fP +How often new missiles should launch. Default 30. +.TP 8 +.B \-scatter \fIinteger\fP +How many particles should appear when a missile explodes. Default 20. +The actual number used is between \fIN\fP and \fIN+(N/2)\fP. +.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 1992 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 , 13-aug-92. diff --git a/hacks/qix.c b/hacks/qix.c new file mode 100644 index 00000000..ed3ac0a0 --- /dev/null +++ b/hacks/qix.c @@ -0,0 +1,510 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997 + * 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. + */ + +#include "screenhack.h" +#include "alpha.h" +#include + +#define MAXPOLY 16 +#define SCALE 6 + +struct qpoint { + long x, y; + long dx, dy; +}; + +struct qline { + struct qpoint *p; + XColor color; + Bool dead; +}; + +struct qix { + int id; + int fp; + int nlines; + int npoly; + struct qline *lines; +}; + +static GC draw_gc, erase_gc; +static unsigned int default_fg_pixel; +static long maxx, maxy, max_spread, max_size; +static int color_shift; +static Bool random_p, solid_p, xor_p, transparent_p, gravity_p; +static int delay; +static int count; +static Colormap cmap; +static int npoly; + +static GC *gcs[2]; + +static void +get_geom (Display *dpy, Window window) +{ + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + maxx = ((long)(xgwa.width+1)<nlines = nlines; + qix->lines = (struct qline *) calloc (qix->nlines, sizeof (struct qline)); + qix->npoly = npoly; + for (i = 0; i < qix->nlines; i++) + qix->lines[i].p = (struct qpoint *) + calloc(qix->npoly, sizeof(struct qpoint)); + + if (!mono_p && !transparent_p) + { + hsv_to_rgb (random () % 360, frand (1.0), frand (0.5) + 0.5, + &qix->lines[0].color.red, &qix->lines[0].color.green, + &qix->lines[0].color.blue); + if (!XAllocColor (dpy, cmap, &qix->lines[0].color)) + { + qix->lines[0].color.pixel = default_fg_pixel; + XQueryColor (dpy, cmap, &qix->lines[0].color); + if (!XAllocColor (dpy, cmap, &qix->lines[0].color)) + abort (); + } + } + + if (max_size == 0) + { + for (i = 0; i < qix->npoly; i++) + { + qix->lines[0].p[i].x = random () % maxx; + qix->lines[0].p[i].y = random () % maxy; + } + } + else + { + /*assert(qix->npoly == 2);*/ + qix->lines[0].p[0].x = random () % maxx; + qix->lines[0].p[0].y = random () % maxy; + qix->lines[0].p[1].x = qix->lines[0].p[0].x + (random () % (max_size/2)); + qix->lines[0].p[1].y = qix->lines[0].p[0].y + (random () % (max_size/2)); + if (qix->lines[0].p[1].x > maxx) qix->lines[0].p[1].x = maxx; + if (qix->lines[0].p[1].y > maxy) qix->lines[0].p[1].y = maxy; + } + + for (i = 0; i < qix->npoly; i++) + { + qix->lines[0].p[i].dx = (random () % (max_spread + 1)) - (max_spread /2); + qix->lines[0].p[i].dy = (random () % (max_spread + 1)) - (max_spread /2); + } + qix->lines[0].dead = True; + + for (i = 1; i < qix->nlines; i++) + { + for(j=0; jnpoly; j++) + qix->lines[i].p[j] = qix->lines[0].p[j]; + qix->lines[i].color = qix->lines[0].color; + qix->lines[i].dead = qix->lines[0].dead; + + if (!mono_p && !transparent_p) + if (!XAllocColor (dpy, cmap, &qix->lines[i].color)) + abort (); + } + return qix; +} + + + + +static struct qix ** +init_qix (Display *dpy, Window window) +{ + int nlines; + struct qix **qixes; + XGCValues gcv; + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + count = get_integer_resource ("count", "Integer"); + if (count <= 0) count = 1; + nlines = get_integer_resource ("segments", "Integer"); + if (nlines <= 0) nlines = 20; + npoly = get_integer_resource("poly", "Integer"); + if (npoly <= 2) npoly = 2; + if (npoly > MAXPOLY) npoly = MAXPOLY; + get_geom (dpy, window); + max_spread = get_integer_resource ("spread", "Integer"); + if (max_spread <= 0) max_spread = 10; + max_spread <<= SCALE; + max_size = get_integer_resource ("size", "Integer"); + if (max_size < 0) max_size = 0; + max_size <<= SCALE; + random_p = get_boolean_resource ("random", "Boolean"); + solid_p = get_boolean_resource ("solid", "Boolean"); + xor_p = get_boolean_resource ("xor", "Boolean"); + transparent_p = get_boolean_resource ("transparent", "Boolean"); + gravity_p = get_boolean_resource("gravity", "Boolean"); + delay = get_integer_resource ("delay", "Integer"); + color_shift = get_integer_resource ("colorShift", "Integer"); + if (color_shift < 0 || color_shift >= 360) color_shift = 5; + if (delay < 0) delay = 0; + + /* Clear up ambiguities regarding npoly */ + if (solid_p) + { + if (npoly != 2) + fprintf(stderr, "%s: Can't have -solid and -poly; using -poly 2\n", + progname); + npoly = 2; + } + if (npoly > 2) + { + if (max_size) + fprintf(stderr, "%s: Can't have -poly and -size; using -size 0\n", + progname); + max_size = 0; + } + + if (count == 1 && transparent_p) + transparent_p = False; /* it's a no-op */ + + if (transparent_p && CellsOfScreen (DefaultScreenOfDisplay (dpy)) <= 2) + { + fprintf (stderr, "%s: -transparent only works on color displays.\n", + progname); + transparent_p = False; + } + + if (xor_p && !transparent_p) + mono_p = True; + + gcs[0] = gcs[1] = 0; + gcv.foreground = default_fg_pixel = + get_pixel_resource ("foreground", "Foreground", dpy, cmap); + + if (transparent_p) + { + Bool additive_p = get_boolean_resource ("additive", "Boolean"); + unsigned long *plane_masks = 0; + unsigned long base_pixel; + int nplanes = count; + int i; + + allocate_alpha_colors (dpy, cmap, &nplanes, additive_p, &plane_masks, + &base_pixel); + + if (nplanes <= 1) + { + fprintf (stderr, + "%s: couldn't allocate any color planes; turning -transparent off.\n", + progname); + transparent_p = False; + if (xor_p) + goto NON_TRANSPARENT_XOR; + else + goto NON_TRANSPARENT; + } + else if (nplanes != count) + { + fprintf (stderr, + "%s: only allocated %d color planes (instead of %d).\n", + progname, nplanes, count); + count = nplanes; + } + + gcs[0] = (GC *) malloc (count * sizeof (GC)); + gcs[1] = xor_p ? gcs[0] : (GC *) malloc (count * sizeof (GC)); + + + for (i = 0; i < count; i++) + { + gcv.plane_mask = plane_masks [i]; + gcv.foreground = ~0; + if (xor_p) + { + gcv.function = GXxor; + gcs [0][i] = XCreateGC (dpy, window, + GCForeground|GCFunction|GCPlaneMask, + &gcv); + } + else + { + gcs [0][i] = XCreateGC (dpy, window, GCForeground|GCPlaneMask, + &gcv); + gcv.foreground = 0; + gcs [1][i] = XCreateGC (dpy, window, GCForeground|GCPlaneMask, + &gcv); + } + } + + XSetWindowBackground (dpy, window, base_pixel); + XClearWindow (dpy, window); + } + else if (xor_p) + { + NON_TRANSPARENT_XOR: + gcv.function = GXxor; + gcv.foreground = + (default_fg_pixel ^ get_pixel_resource ("background", "Background", + dpy, cmap)); + draw_gc = erase_gc = XCreateGC(dpy,window,GCForeground|GCFunction,&gcv); + } + else + { + NON_TRANSPARENT: + draw_gc = XCreateGC (dpy, window, GCForeground, &gcv); + gcv.foreground = get_pixel_resource ("background", "Background", + dpy, cmap); + erase_gc = XCreateGC (dpy, window, GCForeground, &gcv); + } + + qixes = (struct qix **) malloc ((count + 1) * sizeof (struct qix *)); + qixes [count] = 0; + while (count--) + { + qixes [count] = init_one_qix (dpy, window, nlines, npoly); + qixes [count]->id = count; + } + return qixes; +} + +static void +free_qline (Display *dpy, Window window, Colormap cmap, + struct qline *qline, + struct qline *prev, + struct qix *qix) +{ + int i; + if (qline->dead || !prev) + ; + else if (solid_p) + { + XPoint points [4]; + /*assert(qix->npoly == 2);*/ + points [0].x = qline->p[0].x >> SCALE; + points [0].y = qline->p[0].y >> SCALE; + points [1].x = qline->p[1].x >> SCALE; + points [1].y = qline->p[1].y >> SCALE; + points [2].x = prev->p[1].x >> SCALE; + points [2].y = prev->p[1].y >> SCALE; + points [3].x = prev->p[0].x >> SCALE; + points [3].y = prev->p[0].y >> SCALE; + XFillPolygon (dpy, window, (transparent_p ? gcs[1][qix->id] : erase_gc), + points, 4, Complex, CoordModeOrigin); + } + else + { + /* XDrawLine (dpy, window, (transparent_p ? gcs[1][qix->id] : erase_gc), + qline->p1.x, qline->p1.y, qline->p2.x, qline->p2.y);*/ + static XPoint points[MAXPOLY+1]; + for(i = 0; i < qix->npoly; i++) + { + points[i].x = qline->p[i].x >> SCALE; + points[i].y = qline->p[i].y >> SCALE; + } + points[qix->npoly] = points[0]; + XDrawLines(dpy, window, (transparent_p ? gcs[1][qix->id] : erase_gc), + points, qix->npoly+1, CoordModeOrigin); + } + + if (!mono_p && !transparent_p) + XFreeColors (dpy, cmap, &qline->color.pixel, 1, 0); + + qline->dead = True; +} + +static void +add_qline (Display *dpy, Window window, Colormap cmap, + struct qline *qline, + struct qline *prev_qline, + struct qix *qix) +{ + int i; + + for(i=0; inpoly; i++) + qline->p[i] = prev_qline->p[i]; + qline->color = prev_qline->color; + qline->dead = prev_qline->dead; + +#define wiggle(point,delta,max) \ + if (random_p) delta += (random () % (1 << (SCALE+1))) - (1 << SCALE); \ + if (delta > max_spread) delta = max_spread; \ + else if (delta < -max_spread) delta = -max_spread; \ + point += delta; \ + if (point < 0) point = 0, delta = -delta, point += delta<<1; \ + else if (point > max) point = max, delta = -delta, point += delta<<1; + + if (gravity_p) + for(i=0; inpoly; i++) + qline->p[i].dy += 3; + + for (i = 0; i < qix->npoly; i++) + { + wiggle (qline->p[i].x, qline->p[i].dx, maxx); + wiggle (qline->p[i].y, qline->p[i].dy, maxy); + } + + if (max_size) + { + /*assert(qix->npoly == 2);*/ + if (qline->p[0].x - qline->p[1].x > max_size) + qline->p[0].x = qline->p[1].x + max_size + - (random_p ? random() % max_spread : 0); + else if (qline->p[1].x - qline->p[0].x > max_size) + qline->p[1].x = qline->p[0].x + max_size + - (random_p ? random() % max_spread : 0); + if (qline->p[0].y - qline->p[1].y > max_size) + qline->p[0].y = qline->p[1].y + max_size + - (random_p ? random() % max_spread : 0); + else if (qline->p[1].y - qline->p[0].y > max_size) + qline->p[1].y = qline->p[0].y + max_size + - (random_p ? random() % max_spread : 0); + } + + if (!mono_p && !transparent_p) + { + XColor desired; + + int h; + double s, v; + rgb_to_hsv (qline->color.red, qline->color.green, qline->color.blue, + &h, &s, &v); + h = (h + color_shift) % 360; + hsv_to_rgb (h, s, v, + &qline->color.red, &qline->color.green, &qline->color.blue); + + qline->color.flags = DoRed | DoGreen | DoBlue; + desired = qline->color; + if (XAllocColor (dpy, cmap, &qline->color)) + { + /* XAllocColor returns the actual RGB that the hardware let us + allocate. Restore the requested values into the XColor struct + so that limited-resolution hardware doesn't cause the cycle to + get "stuck". */ + qline->color.red = desired.red; + qline->color.green = desired.green; + qline->color.blue = desired.blue; + } + else + { + qline->color = prev_qline->color; + if (!XAllocColor (dpy, cmap, &qline->color)) + abort (); /* same color should work */ + } + XSetForeground (dpy, draw_gc, qline->color.pixel); + } + if (! solid_p) + { + /* XDrawLine (dpy, window, (transparent_p ? gcs[0][qix->id] : draw_gc), + qline->p1.x, qline->p1.y, qline->p2.x, qline->p2.y);*/ + static XPoint points[MAXPOLY+1]; + for (i = 0; i < qix->npoly; i++) + { + points[i].x = qline->p[i].x >> SCALE; + points[i].y = qline->p[i].y >> SCALE; + } + points[qix->npoly] = points[0]; + XDrawLines(dpy, window, (transparent_p ? gcs[0][qix->id] : draw_gc), + points, qix->npoly+1, CoordModeOrigin); + } + else if (!prev_qline->dead) + { + XPoint points [4]; + points [0].x = qline->p[0].x >> SCALE; + points [0].y = qline->p[0].y >> SCALE; + points [1].x = qline->p[1].x >> SCALE; + points [1].y = qline->p[1].y >> SCALE; + points [2].x = prev_qline->p[1].x >> SCALE; + points [2].y = prev_qline->p[1].y >> SCALE; + points [3].x = prev_qline->p[0].x >> SCALE; + points [3].y = prev_qline->p[0].y >> SCALE; + XFillPolygon (dpy, window, (transparent_p ? gcs[0][qix->id] : draw_gc), + points, 4, Complex, CoordModeOrigin); + } + + qline->dead = False; +} + +static void +qix1 (Display *dpy, Window window, struct qix *qix) +{ + int ofp = qix->fp - 1; + static int gtick = 0; + if (ofp < 0) ofp = qix->nlines - 1; + if (gtick++ == 500) + get_geom (dpy, window), gtick = 0; + free_qline (dpy, window, cmap, &qix->lines [qix->fp], + &qix->lines[(qix->fp + 1) % qix->nlines], qix); + add_qline (dpy, window, cmap, &qix->lines[qix->fp], &qix->lines[ofp], qix); + if ((++qix->fp) >= qix->nlines) + qix->fp = 0; +} + + +char *progclass = "Qix"; + +char *defaults [] = { + "Qix.background: black", /* to placate SGI */ + "Qix.foreground: white", + "*count: 1", + "*segments: 50", + "*poly: 2", + "*spread: 8", + "*size: 0", + "*colorShift: 3", + "*solid: false", + "*delay: 10000", + "*random: true", + "*xor: false", + "*transparent:false", + "*gravity: false", + "*additive: true", + 0 +}; + +XrmOptionDescRec options [] = { + { "-count", ".count", XrmoptionSepArg, 0 }, + { "-segments", ".segments", XrmoptionSepArg, 0 }, + { "-poly", ".poly", XrmoptionSepArg, 0 }, + { "-spread", ".spread", XrmoptionSepArg, 0 }, + { "-size", ".size", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-color-shift", ".colorShift", XrmoptionSepArg, 0 }, + { "-random", ".random", XrmoptionNoArg, "true" }, + { "-linear", ".random", XrmoptionNoArg, "false" }, + { "-solid", ".solid", XrmoptionNoArg, "true" }, + { "-hollow", ".solid", XrmoptionNoArg, "false" }, + { "-xor", ".xor", XrmoptionNoArg, "true" }, + { "-no-xor", ".xor", XrmoptionNoArg, "false" }, + { "-transparent", ".transparent", XrmoptionNoArg, "true" }, + { "-non-transparent", ".transparent", XrmoptionNoArg, "false" }, + { "-gravity", ".gravity", XrmoptionNoArg, "true" }, + { "-no-gravity", ".gravity", XrmoptionNoArg, "false" }, + { "-additive", ".additive", XrmoptionNoArg, "true" }, + { "-subtractive", ".additive", XrmoptionNoArg, "false" }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + struct qix **q1 = init_qix (dpy, window); + struct qix **qn; + while (1) + for (qn = q1; *qn; qn++) + { + qix1 (dpy, window, *qn); + XSync (dpy, True); + if (delay) usleep (delay); + } +} diff --git a/hacks/qix.man b/hacks/qix.man new file mode 100644 index 00000000..7d046fbf --- /dev/null +++ b/hacks/qix.man @@ -0,0 +1,129 @@ +.TH XScreenSaver 1 "27-Apr-97" "X Version 11" +.SH NAME +qix - bounce colored lines around a window +.SH SYNOPSIS +.B qix +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-segments \fIint\fP] [\-spread \fIpixels\fP] [\-size \fIpixels\fP] [\-count \fIint\fP] [\-color-shift \fIdegrees\fP] [\-delay \fIusecs\fP] [\-random] [\-linear] [\-solid] [\-hollow] [\-xor] [\-no\-xor] [\-transparent] [\-non\-transparent] [\-additive] [\-subtractive] [\-poly \fIint\fP] [\-gravity] [\-no\-gravity] +.SH DESCRIPTION +The \fIqix\fP program bounces a series of line segments around its window. +This is truly the swiss army chainsaw of qix programs. If you know of one +with more display modes, I want to know about it. +.SH OPTIONS +.I qix +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 \-segments \fIinteger\fP +How many line segments should be drawn. Default 50. +.TP 8 +.B \-spread \fIinteger\fP +How far apart the endpoints of one segment should be from the next. +Default 8. +.TP 8 +.B \-size \fIinteger\fP +The maximum distance one endpoint of a segment is allowed to be from +the opposite end of that segment. Default 0, meaning unlimited. +.TP 8 +.B \-count \fIinteger\fP +How many qixes to draw. Default 1. +.TP 8 +.B \-color\-shift \fIdegrees\fP +If on a color display, the color of the line segments will cycle through +the spectrum. This specifies how far the hue of each segment should be +from the next, in degrees on the HSV wheel. Default 3. +.TP 8 +.B \-delay \fImicroseconds\fP +How much of a delay should be introduced between steps of the animation. +Default 25000, or about 0.025 seconds. +.TP 8 +.B \-random +The \fIqix\fP will wander around the screen semi-randomly. This is the +default. +.TP 8 +.B \-linear +The opposite of \fI\-random\fP: the \fIqix\fP will travel in straight lines +until it reaches a wall, and then it will bounce. +.TP 8 +.B \-solid +If this is specified, then the area between the line segments will be filled +in with the appropriate color, instead of the \fIqix\fP simply being composed +of one-pixel-wide line segments. This option looks really good in color. +.TP 8 +.B \-hollow +The opposite of \fI\-solid\fP; this is the default. +.TP 8 +.B \-xor +If this is specified, then qix segments will be drawn and erased with xor, +instead of being drawn in some color and erased in the background color. +This implies \fI\-mono\fP, in that only two colors can be used. +.TP 8 +.B \-transparent +If this is specified, and \fI\-count\fP is greater than 1, then each qix +will be drawn in one color, and when they overlap, the colors will be mixed. +This only works on \fBPseudoColor\fP displays. This looks best in +conjuction with \fI\-solid\fP. +.TP 8 +.B \-non\-transparent +Turns off \fI\-transparent\fP. +.TP 8 +.B \-additive +If \fI\-transparent\fP is specified, then this option means that the colors +will be mixed using an additive color model, as if the qixes were projected +light. This is the default. +.TP 8 +.B \-subtractive +If \fI\-transparent\fP is specified, then this option means that the +colors will be mixed using a subtractive color model, as if the qixes were +translucent filters. +.TP 8 +.B \-poly \fIint\fP +How many vertices each qix-line should have: the default is 2, meaning the +traditional qix line shape. Three will yield triangles, and so on. +.TP 8 +.B \-gravity +.TP 8 +.B \-no\-gravity +Whether there should be downward attraction. For example, the +options +.B \-gravity \-linear +will make everything move in nice smooth parabolas. +Gravity is off by default. +.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 1992 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 , 13-aug-92. + +Thanks to Ariel Scolnicov for the \-poly and \-gravity options. diff --git a/hacks/rocks.c b/hacks/rocks.c new file mode 100644 index 00000000..55abbd84 --- /dev/null +++ b/hacks/rocks.c @@ -0,0 +1,478 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997 + * 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. + */ + +/* Flying through an asteroid field. Based on TI Explorer Lisp code by + John Nguyen + */ + +#include +#include +#include "screenhack.h" + +#define MIN_ROCKS 1 +#define MIN_DEPTH 2 /* rocks disappear when they get this close */ +#define MAX_DEPTH 60 /* this is where rocks appear */ +#define MIN_SIZE 3 /* how small where pixmaps are not used */ +#define MAX_SIZE 200 /* how big (in pixels) rocks are at depth 1 */ +#define DEPTH_SCALE 100 /* how many ticks there are between depths */ +#define SIN_RESOLUTION 1000 + +#define MAX_DEP 0.3 /* how far the displacement can be (percent) */ +#define DIRECTION_CHANGE_RATE 60 +#define MAX_DEP_SPEED 5 /* Maximum speed for movement */ +#define MOVE_STYLE 0 /* Only 0 and 1. Distinguishes the fact that + these are the rocks that are moving (1) + or the rocks source (0). */ + +/* there's not much point in the above being user-customizable, but those + numbers might want to be tweaked for displays with an order of magnitude + higher resolution or compute power. + */ + +static double sins [SIN_RESOLUTION]; +static double coss [SIN_RESOLUTION]; +static double depths [(MAX_DEPTH + 1) * DEPTH_SCALE]; + +static Display *dpy; +static Window window; +static int width, height, midx, midy; +static int dep_x, dep_y; +static float max_dep; +static GC draw_gc, erase_gc; +static Bool rotate_p; +static Bool move_p; +static int speed; +static Bool threed; +static GC threed_left_gc, threed_right_gc; +static double threed_delta; + +#define GETZDIFF(z) \ + (threed_delta * 40.0 * \ + (1.0 - ((MAX_DEPTH * DEPTH_SCALE / 2) / \ + ((z) + 20.0 * DEPTH_SCALE)))) + +struct rock { + int real_size; + int r; + int theta; + int depth; + int size, x, y; + int diff; +}; + +static struct rock *rocks; +static int nrocks; +static Pixmap pixmaps [MAX_SIZE]; +static int delay; + +static void rock_compute (struct rock *); +static void rock_draw (struct rock *, Bool draw_p); + +static void +rock_reset (struct rock *rock) +{ + rock->real_size = MAX_SIZE; + rock->r = (SIN_RESOLUTION * 0.7) + (random () % (30 * SIN_RESOLUTION)); + rock->theta = random () % SIN_RESOLUTION; + rock->depth = MAX_DEPTH * DEPTH_SCALE; + rock_compute (rock); + rock_draw (rock, True); +} + +static void +rock_tick (struct rock *rock, int d) +{ + if (rock->depth > 0) + { + rock_draw (rock, False); + rock->depth -= speed; + if (rotate_p) + { + rock->theta = (rock->theta + d) % SIN_RESOLUTION; + } + while (rock->theta < 0) + rock->theta += SIN_RESOLUTION; + if (rock->depth < (MIN_DEPTH * DEPTH_SCALE)) + rock->depth = 0; + else + { + rock_compute (rock); + rock_draw (rock, True); + } + } + else if ((random () % 40) == 0) + rock_reset (rock); +} + +static void +rock_compute (struct rock *rock) +{ + double factor = depths [rock->depth]; + double rsize = rock->real_size * factor; + + rock->size = (int) (rsize + 0.5); + rock->diff = (int) GETZDIFF(rock->depth); + rock->x = midx + (coss [rock->theta] * rock->r * factor); + rock->y = midy + (sins [rock->theta] * rock->r * factor); + + if (move_p) + { + double move_factor = (((double) MOVE_STYLE) - + (((double) rock->depth) / + (((double) (MAX_DEPTH + 1)) * + ((double) DEPTH_SCALE)))); + /* move_factor is 0 when the rock is close, 1 when far */ + rock->x += (((double) dep_x) * move_factor); + rock->y += (((double) dep_y) * move_factor); + } +} + +static void +rock_draw (rock, draw_p) + struct rock *rock; + Bool draw_p; +{ + GC gc = (draw_p + ? (threed ? erase_gc : draw_gc) + : erase_gc); + + if (rock->x <= 0 || rock->y <= 0 || rock->x >= width || rock->y >= height) + { + /* this means that if a rock were to go off the screen at 12:00, but + would have been visible at 3:00, it won't come back once the observer + rotates around so that the rock would have been visible again. + Oh well. + */ + if (!move_p) + rock->depth = 0; + return; + } + if (rock->size <= 1) + { + if (threed) + { + if (draw_p) gc = threed_left_gc; + XDrawPoint (dpy, window, gc, rock->x - rock->diff, rock->y); + if (draw_p) gc = threed_right_gc; + XDrawPoint (dpy, window, gc, rock->x + rock->diff, rock->y); + } + else + { + XDrawPoint (dpy, window, gc, rock->x, rock->y); + } + } + else if (rock->size <= MIN_SIZE || !draw_p) + { + if (threed) + { + if (draw_p) gc = threed_left_gc; + XFillRectangle(dpy, window, gc, + rock->x - rock->size / 2 - rock->diff, + rock->y - rock->size / 2, + rock->size, rock->size); + if (draw_p) gc = threed_right_gc; + XFillRectangle(dpy, window, gc, + rock->x - rock->size / 2 + rock->diff, + rock->y - rock->size / 2, + rock->size, rock->size); + } + else + { + XFillRectangle (dpy, window, gc, + rock->x - rock->size/2, rock->y - rock->size/2, + rock->size, rock->size); + } + } + else if (rock->size < MAX_SIZE) + { + if (threed) + { + gc = threed_left_gc; + XCopyPlane(dpy, pixmaps[rock->size], window, gc, + 0, 0, rock->size, rock->size, + rock->x - rock->size / 2 - rock->diff, + rock->y - rock->size / 2, 1L); + gc = threed_right_gc; + XCopyPlane(dpy, pixmaps[rock->size], window, gc, + 0, 0, rock->size, rock->size, + rock->x - rock->size / 2 + rock->diff, + rock->y - rock->size / 2, 1L); + } + else + { + XCopyPlane (dpy, pixmaps [rock->size], window, gc, + 0, 0, rock->size, rock->size, + rock->x - rock->size/2, rock->y - rock->size/2, + 1L); + } + } +} + + +static void +init_pixmaps (Display *dpy, Window window) +{ + int i; + XGCValues gcv; + GC fg_gc = 0, bg_gc = 0; + pixmaps [0] = pixmaps [1] = 0; + for (i = MIN_DEPTH; i < MAX_SIZE; i++) + { + int w = (1+(i/32))<<5; /* server might be faster if word-aligned */ + int h = i; + Pixmap p = XCreatePixmap (dpy, window, w, h, 1); + XPoint points [7]; + pixmaps [i] = p; + if (! p) + { + fprintf (stderr, "%s: couldn't allocate pixmaps", progname); + exit (1); + } + if (! fg_gc) + { /* must use drawable of pixmap, not window (fmh) */ + gcv.foreground = 1; + fg_gc = XCreateGC (dpy, p, GCForeground, &gcv); + gcv.foreground = 0; + bg_gc = XCreateGC (dpy, p, GCForeground, &gcv); + } + XFillRectangle (dpy, p, bg_gc, 0, 0, w, h); + points [0].x = i * 0.15; points [0].y = i * 0.85; + points [1].x = i * 0.00; points [1].y = i * 0.20; + points [2].x = i * 0.30; points [2].y = i * 0.00; + points [3].x = i * 0.40; points [3].y = i * 0.10; + points [4].x = i * 0.90; points [4].y = i * 0.10; + points [5].x = i * 1.00; points [5].y = i * 0.55; + points [6].x = i * 0.45; points [6].y = i * 1.00; + XFillPolygon (dpy, p, fg_gc, points, 7, Nonconvex, CoordModeOrigin); + } + XFreeGC (dpy, fg_gc); + XFreeGC (dpy, bg_gc); +} + + +static int +compute_move(int axe) /* 0 for x, 1 for y */ +{ + static int current_dep[2] = {0, 0}; + static int speed[2] = {0, 0}; + static short direction[2] = {0, 0}; + static int limit[2] = {0, 0}; + int change = 0; + + limit[0] = midx; + limit[1] = midy; + + current_dep[axe] += speed[axe]; /* We adjust the displacement */ + + if (current_dep[axe] > (int) (limit[axe] * max_dep)) + { + if (current_dep[axe] > limit[axe]) + current_dep[axe] = limit[axe]; + direction[axe] = -1; + } /* This is when we reach the upper screen limit */ + if (current_dep[axe] < (int) (-limit[axe] * max_dep)) + { + if (current_dep[axe] < -limit[axe]) + current_dep[axe] = -limit[axe]; + direction[axe] = 1; + } /* This is when we reach the lower screen limit */ + if (direction[axe] == 1) /* We adjust the speed */ + speed[axe] += 1; + else if (direction[axe] == -1) + speed[axe] -= 1; + + if (speed[axe] > MAX_DEP_SPEED) + speed[axe] = MAX_DEP_SPEED; + else if (speed[axe] < -MAX_DEP_SPEED) + speed[axe] = -MAX_DEP_SPEED; + + if (move_p && !(random() % DIRECTION_CHANGE_RATE)) + { + /* We change direction */ + change = random() & 1; + if (change != 1) + { + if (direction[axe] == 0) + direction[axe] = change - 1; /* 0 becomes either 1 or -1 */ + else + direction[axe] = 0; /* -1 or 1 become 0 */ + } + } + return (current_dep[axe]); +} + +static void +tick_rocks (int d) +{ + int i; + + if (move_p) + { + dep_x = compute_move(0); + dep_y = compute_move(1); + } + + for (i = 0; i < nrocks; i++) + rock_tick (&rocks [i], d); +} + + +static void +rocks_once (void) +{ + static int current_delta = 0; /* observer Z rotation */ + static int window_tick = 50; + static int new_delta = 0; + static int dchange_tick = 0; + + if (window_tick++ == 50) + { + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + window_tick = 0; + width = xgwa.width; + height = xgwa.height; + midx = width/2; + midy = height/2; + } + + if (current_delta != new_delta) + { + if (dchange_tick++ == 5) + { + dchange_tick = 0; + if (current_delta < new_delta) + current_delta++; + else + current_delta--; + } + } + else + { + if (! (random() % 50)) + { + new_delta = ((random() % 11) - 5); + if (! (random() % 10)) + new_delta *= 5; + } + } + tick_rocks (current_delta); +} + +static void +init_rocks (Display *d, Window w) +{ + int i; + XGCValues gcv; + Colormap cmap; + XWindowAttributes xgwa; + unsigned int fg, bg; + dpy = d; + window = w; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + delay = get_integer_resource ("delay", "Integer"); + if (delay < 0) delay = 0; + speed = get_integer_resource ("speed", "Integer"); + if (speed < 1) speed = 1; + if (speed > 100) speed = 100; + rotate_p = get_boolean_resource ("rotate", "Boolean"); + move_p = get_boolean_resource ("move", "Boolean"); + fg = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + bg = get_pixel_resource ("background", "Background", dpy, cmap); + gcv.foreground = fg; + gcv.background = bg; + draw_gc = XCreateGC (dpy, window, GCForeground|GCBackground, &gcv); + gcv.foreground = bg; + gcv.background = fg; + erase_gc = XCreateGC (dpy, window, GCForeground|GCBackground, &gcv); + + max_dep = (move_p ? MAX_DEP : 0); + + for (i = 0; i < SIN_RESOLUTION; i++) + { + sins [i] = sin ((((double) i) / (SIN_RESOLUTION / 2)) * M_PI); + coss [i] = cos ((((double) i) / (SIN_RESOLUTION / 2)) * M_PI); + } + /* we actually only need i/speed of these, but wtf */ + for (i = 1; i < (sizeof (depths) / sizeof (depths[0])); i++) + depths [i] = atan (((double) 0.5) / (((double) i) / DEPTH_SCALE)); + depths [0] = M_PI/2; /* avoid division by 0 */ + + threed = get_boolean_resource("use3d", "Boolean"); + if (threed) + { + gcv.background = bg; + gcv.foreground = get_pixel_resource ("left3d", "Foreground", dpy, cmap); + threed_left_gc = XCreateGC (dpy, window, GCForeground|GCBackground,&gcv); + gcv.foreground = get_pixel_resource ("right3d", "Foreground", dpy, cmap); + threed_right_gc = XCreateGC (dpy, window,GCForeground|GCBackground,&gcv); + threed_delta = get_float_resource("delta3d", "Integer"); + } + + /* don't want any exposure events from XCopyPlane */ + XSetGraphicsExposures (dpy, draw_gc, False); + XSetGraphicsExposures (dpy, erase_gc, False); + + nrocks = get_integer_resource ("count", "Count"); + if (nrocks < 1) nrocks = 1; + rocks = (struct rock *) calloc (nrocks, sizeof (struct rock)); + init_pixmaps (dpy, window); + XClearWindow (dpy, window); +} + + + +char *progclass = "Rocks"; + +char *defaults [] = { + "Rocks.background: Black", /* to placate SGI */ + "Rocks.foreground: #E9967A", + "*count: 100", + "*delay: 50000", + "*speed: 100", + "*rotate: true", + "*move: true", + "*use3d: False", + "*left3d: Blue", + "*right3d: Red", + "*delta3d: 1.5", + 0 +}; + +XrmOptionDescRec options [] = { + { "-count", ".count", XrmoptionSepArg, 0 }, + { "-rotate", ".rotate", XrmoptionNoArg, "true" }, + { "-norotate", ".rotate", XrmoptionNoArg, "false" }, + { "-move", ".move", XrmoptionNoArg, "true" }, + { "-nomove", ".move", XrmoptionNoArg, "false" }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-speed", ".speed", XrmoptionSepArg, 0 }, + {"-3d", ".use3d", XrmoptionNoArg, "True"}, + {"-no-3d", ".use3d", XrmoptionNoArg, "False"}, + {"-left3d", ".left3d", XrmoptionSepArg, 0 }, + {"-right3d", ".right3d", XrmoptionSepArg, 0 }, + {"-delta3d", ".delta3d", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_rocks (dpy, window); + while (1) + { + rocks_once (); + XSync (dpy, True); + if (delay) usleep (delay); + } +} diff --git a/hacks/rocks.man b/hacks/rocks.man new file mode 100644 index 00000000..37a163b9 --- /dev/null +++ b/hacks/rocks.man @@ -0,0 +1,80 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +rocks - animation of flying through an asteroid field +.SH SYNOPSIS +.B rocks +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-count \fIinteger\fP] [\-delay \fIusecs\fP] [\-speed \fIinteger\fP] [\-norotate] [\-nomove] [\-3d] +.SH DESCRIPTION +The \fIrocks\fP program draws an animation of an asteroid field moving past +the observer (or vice versa). Sometimes the observer picks up spin on Z axis. +.SH OPTIONS +.I rocks +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 \-count \fIinteger\fP +Maximum number of rocks to draw on the screen at once. Default 100. +.TP 8 +.B \-speed \fIinteger\fP +A measure of the speed with which the observer and the rocks pass each other, +from 1 to 100. Default 100, meaning ``very fast.'' If you're on a slow +display connection (the animation looks jerky) then try making this number +smaller, and/or decreasing the number of rocks. +.TP 8 +.B \-delay \fImicroseconds\fP +Number of microseconds to delay between each frame. Default 50000, meaning +about 1/20th second. Compare and contrast with \fI\-speed\fP, above. +.TP 8 +.B \-norotate +Don't rotate the observer; just fly through the field on the level. +.TP 8 +.B \-nomove +Don't turn the observer; just fly straight ahead through the field. +.TP 8 +.B \-3d +Do red/blue 3d separations: if you look at the screen with 3d glasses, +the rocks will be \fIjumping\fP right \fIout\fP at you. Oooooh, scaaary! +.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 BUGS +There should be an option to display doppler shift (a gravity rainbow.) + +Speed of rotation should be settable. + +Default speed of rotation should be relative to forward velocity. +.SH COPYRIGHT +Copyright \(co 1992 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 +Based on Lisp Machine code copyright 1988 John Nguyen . + +Ported to C and X by Jamie Zawinski , 13-aug-92. + +Steering code by Jeremie Petit; 3D code by theiling@coli.uni-sb.de. diff --git a/hacks/rorschach.c b/hacks/rorschach.c new file mode 100644 index 00000000..eab13887 --- /dev/null +++ b/hacks/rorschach.c @@ -0,0 +1,134 @@ +/* xscreensaver, Copyright (c) 1992, 1996 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. + */ + +#include "screenhack.h" + +static GC draw_gc, erase_gc; +static unsigned int default_fg_pixel; +static int iterations, offset; +static Bool xsym, ysym; + +static void +init_rorschach (Display *dpy, Window window) +{ + XGCValues gcv; + Colormap cmap; + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + 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); + iterations = get_integer_resource ("iterations", "Integer"); + offset = get_integer_resource ("offset", "Integer"); + if (offset <= 0) offset = 3; + if (iterations < 10) iterations = 10; + xsym = get_boolean_resource ("xsymmetry", "Symmetry"); + ysym = get_boolean_resource ("ysymmetry", "Symmetry"); +} + +static void +hurm (Display *dpy, Window window) +{ + Colormap cmap; + XWindowAttributes xgwa; + int xlim, ylim, x, y, i, got_color = 0; + XPoint points [4]; + XColor color; + XClearWindow (dpy, window); + XGetWindowAttributes (dpy, window, &xgwa); + xlim = xgwa.width; + ylim = xgwa.height; + cmap = xgwa.colormap; + + if (! mono_p) + hsv_to_rgb (random()%360, 1.0, 1.0, &color.red, &color.green, &color.blue); + if ((!mono_p) && (got_color = XAllocColor (dpy, cmap, &color))) + XSetForeground (dpy, draw_gc, color.pixel); + else + XSetForeground (dpy, draw_gc, default_fg_pixel); + + x = xlim/2; + y = ylim/2; + for (i = 0; i < iterations; i++) + { + int j = 0; + x += ((random () % (1 + (offset << 1))) - offset); + y += ((random () % (1 + (offset << 1))) - offset); + points [j].x = x; + points [j].y = y; + j++; + if (xsym) + { + points [j].x = xlim - x; + points [j].y = y; + j++; + } + if (ysym) + { + points [j].x = x; + points [j].y = ylim - y; + j++; + } + if (xsym && ysym) + { + points [j].x = xlim - x; + points [j].y = ylim - y; + j++; + } + XDrawPoints (dpy, window, draw_gc, points, j, CoordModeOrigin); + XSync (dpy, True); + } + sleep (5); + for (i = 0; i < (ylim >> 1); i++) + { + y = (random () % ylim); + XDrawLine (dpy, window, erase_gc, 0, y, xlim, y); + XFlush (dpy); + if ((i % 50) == 0) + usleep (10000); + } + XClearWindow (dpy, window); + if (got_color) XFreeColors (dpy, cmap, &color.pixel, 1, 0); + XSync (dpy, True); + sleep (1); +} + + +char *progclass = "Rorschach"; + +char *defaults [] = { + "Rorschach.background: black", /* to placate SGI */ + "Rorschach.foreground: white", + "*xsymmetry: true", + "*ysymmetry: false", + "*iterations: 4000", + "*offset: 4", + 0 +}; + +XrmOptionDescRec options [] = { + { "-iterations", ".iterations", XrmoptionSepArg, 0 }, + { "-offset", ".offset", XrmoptionSepArg, 0 }, + { "-xsymmetry", ".xsymmetry", XrmoptionNoArg, "true" }, + { "-ysymmetry", ".ysymmetry", XrmoptionNoArg, "true" }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_rorschach (dpy, window); + while (1) + hurm (dpy, window); +} diff --git a/hacks/rorschach.man b/hacks/rorschach.man new file mode 100644 index 00000000..4619f0ff --- /dev/null +++ b/hacks/rorschach.man @@ -0,0 +1,64 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +rorschach - simulate ink-blot patterns +.SH SYNOPSIS +.B rorschach +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-iterations \fIinteger\fP] [\-offset \fIinteger\fP] [\-xsymmetry] [\-ysymmetry] +.SH DESCRIPTION +The \fIrorschach\fP program draws random patterns reminiscent of the +psychological test of same name. +.SH OPTIONS +.I rorschach +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 \-iterations \fIinteger\fP +How many dots should be drawn each time. Default 4000. +.TP 8 +.B \-offset \fIinteger\fP +How far apart the dots should be. Default 4 pixels. +.TP 8 +.B \-xsymmetry +Whether the images should be horizontally symmetrical. Default true. +.TP 8 +.B \-ysymmetry +Whether the images should be vertically symmetrical. Default false. +.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 BUGS +May call your sanity into question. +.SH SEE ALSO +.BR X (1), +.BR xscreensaver (1) +.SH COPYRIGHT +Copyright \(co 1992 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 , 13-aug-92. diff --git a/hacks/screenhack.c b/hacks/screenhack.c new file mode 100644 index 00000000..8462d4e7 --- /dev/null +++ b/hacks/screenhack.c @@ -0,0 +1,325 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1997 + * 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. + * + * And remember: X Windows is to graphics hacking as roman numerals are to + * the square root of pi. + */ + +/* This file contains simple code to open a window or draw on the root. + The idea being that, when writing a graphics hack, you can just link + with this .o to get all of the uninteresting junk out of the way. + + - create a procedure `screenhack(dpy, window)' + + - create a variable `char *progclass' which names this program's + resource class. + + - create a variable `char defaults []' for the default resources, and + null-terminate it. + + - create a variable `XrmOptionDescRec options[]' for the command-line, + and null-terminate it. + + And that's it... + */ + +#include +#include +#include +#include +#include +#include +#ifdef HAVE_XMU +# ifndef VMS +# include +# else /* VMS */ +# include +# endif +#else +# include "xmu.h" +#endif +#include "screenhack.h" +#include "version.h" +#include "vroot.h" + +char *progname; +XrmDatabase db; +Bool mono_p; + +static XrmOptionDescRec default_options [] = { + { "-root", ".root", XrmoptionNoArg, "True" }, + { "-window", ".root", XrmoptionNoArg, "False" }, + { "-mono", ".mono", XrmoptionNoArg, "True" }, + { "-install", ".installColormap", XrmoptionNoArg, "True" }, + { "-noinstall",".installColormap", XrmoptionNoArg, "False" }, + { "-visual", ".visualID", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +static char *default_defaults[] = { + "*root: false", + "*geometry: 600x480", /* this should be .geometry, but nooooo... */ + "*mono: false", + "*installColormap: false", + "*visualID: default", + 0 +}; + +static XrmOptionDescRec *merged_options; +static int merged_options_size; +static char **merged_defaults; + +static void +merge_options (void) +{ + int def_opts_size, opts_size; + int def_defaults_size, defaults_size; + + for (def_opts_size = 0; default_options[def_opts_size].option; + def_opts_size++) + ; + for (opts_size = 0; options[opts_size].option; opts_size++) + ; + + merged_options_size = def_opts_size + opts_size; + merged_options = (XrmOptionDescRec *) + malloc ((merged_options_size + 1) * sizeof(*default_options)); + memcpy (merged_options, default_options, + (def_opts_size * sizeof(*default_options))); + memcpy (merged_options + def_opts_size, options, + ((opts_size + 1) * sizeof(*default_options))); + + for (def_defaults_size = 0; default_defaults[def_defaults_size]; + def_defaults_size++) + ; + for (defaults_size = 0; defaults[defaults_size]; defaults_size++) + ; + merged_defaults = (char **) + malloc ((def_defaults_size + defaults_size + 1) * sizeof (*defaults));; + memcpy (merged_defaults, default_defaults, + def_defaults_size * sizeof(*defaults)); + memcpy (merged_defaults + def_defaults_size, defaults, + (defaults_size + 1) * sizeof(*defaults)); +} + + +/* Make the X errors print out the name of this program, so we have some + clue which one has a bug when they die under the screensaver. + */ + +static int +screenhack_ehandler (Display *dpy, XErrorEvent *error) +{ + fprintf (stderr, "\nX error in %s:\n", progname); + if (XmuPrintDefaultErrorMessage (dpy, error, stderr)) + exit (-1); + else + fprintf (stderr, " (nonfatal.)\n"); + return 0; +} + +static Bool +MapNotify_event_p (Display *dpy, XEvent *event, XPointer window) +{ + return (event->xany.type == MapNotify && + event->xvisibility.window == (Window) window); +} + + +#ifdef USE_GL +extern Visual *get_gl_visual (Screen *, const char *, const char *); +#endif + +#ifdef XLOCKMORE +extern void pre_merge_options (void); +#endif + + + +int +main (int argc, char **argv) +{ + XtAppContext app; + Widget toplevel; + Display *dpy; + Window window; + Visual *visual; + Colormap cmap; + Bool root_p; + XEvent event; + Boolean dont_clear /*, dont_map */; + char version[255]; + +#ifdef XLOCKMORE + pre_merge_options (); +#endif + merge_options (); + toplevel = XtAppInitialize (&app, progclass, merged_options, + merged_options_size, &argc, argv, + merged_defaults, 0, 0); + dpy = XtDisplay (toplevel); + db = XtDatabase (dpy); + XtGetApplicationNameAndClass (dpy, &progname, &progclass); + XSetErrorHandler (screenhack_ehandler); + + { + char *v = (char *) strdup(strchr(screensaver_id, ' ')); + char *s = (char *) strchr(v, ','); + *s = 0; + sprintf (version, "%s: from the XScreenSaver%s distribution.", + progclass, v); + free(v); + } + + if (argc > 1) + { + const char *s; + int i; + int x = 18; + int end = 78; + Bool help_p = !strcmp(argv[1], "-help"); + fprintf (stderr, "%s\n", version); + for (s = progclass; *s; s++) fprintf(stderr, " "); + fprintf (stderr, " http://people.netscape.com/jwz/xscreensaver/\n\n"); + + if (!help_p) + fprintf(stderr, "Unrecognised option: %s\n", argv[1]); + fprintf (stderr, "Options include: "); + for (i = 0; i < merged_options_size; i++) + { + char *sw = merged_options [i].option; + Bool argp = (merged_options [i].argKind == XrmoptionSepArg); + int size = strlen (sw) + (argp ? 6 : 0) + 2; + if (x + size >= end) + { + fprintf (stderr, "\n\t\t "); + x = 18; + } + x += size; + fprintf (stderr, "%s", sw); + if (argp) fprintf (stderr, " "); + if (i != merged_options_size - 1) fprintf (stderr, ", "); + } + fprintf (stderr, ".\n"); + exit (help_p ? 0 : 1); + } + + dont_clear = get_boolean_resource ("dontClearRoot", "Boolean"); +/*dont_map = get_boolean_resource ("dontMapWindow", "Boolean"); */ + mono_p = get_boolean_resource ("mono", "Boolean"); + if (CellsOfScreen (DefaultScreenOfDisplay (dpy)) <= 2) + mono_p = True; + + root_p = get_boolean_resource ("root", "Boolean"); + if (root_p) + { + XWindowAttributes xgwa; + window = RootWindowOfScreen (XtScreen (toplevel)); + XtDestroyWidget (toplevel); + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + visual = xgwa.visual; + } + else + { + Boolean def_visual_p; + Screen *screen = XtScreen (toplevel); + +#ifdef USE_GL + visual = get_gl_visual (screen, "visualID", "VisualID"); +#else + visual = get_visual_resource (screen, "visualID", "VisualID", False); +#endif + + if (toplevel->core.width <= 0) + toplevel->core.width = 600; + if (toplevel->core.height <= 0) + toplevel->core.height = 480; + + def_visual_p = (visual == DefaultVisualOfScreen (screen)); + + if (!def_visual_p) + { + unsigned int bg, bd; + Widget new; + + cmap = XCreateColormap (dpy, RootWindowOfScreen(screen), + visual, AllocNone); + bg = get_pixel_resource ("background", "Background", dpy, cmap); + bd = get_pixel_resource ("borderColor", "Foreground", dpy, cmap); + + new = XtVaAppCreateShell (progname, progclass, + topLevelShellWidgetClass, dpy, + XtNmappedWhenManaged, False, + XtNvisual, visual, + XtNdepth, visual_depth (screen, visual), + XtNwidth, toplevel->core.width, + XtNheight, toplevel->core.height, + XtNcolormap, cmap, + XtNbackground, (Pixel) bg, + XtNborderColor, (Pixel) bd, + 0); + XtDestroyWidget (toplevel); + toplevel = new; + XtRealizeWidget (toplevel); + window = XtWindow (toplevel); + } + else + { + XtVaSetValues (toplevel, XtNmappedWhenManaged, False, 0); + XtRealizeWidget (toplevel); + window = XtWindow (toplevel); + + if (get_boolean_resource ("installColormap", "InstallColormap")) + { + cmap = XCreateColormap (dpy, window, + DefaultVisualOfScreen (XtScreen (toplevel)), + AllocNone); + XSetWindowColormap (dpy, window, cmap); + } + else + { + cmap = DefaultColormap (dpy, DefaultScreen (dpy)); + } + } + +/* + if (dont_map) + { + XtVaSetValues (toplevel, XtNmappedWhenManaged, False, 0); + XtRealizeWidget (toplevel); + } + else +*/ + { + XtPopup (toplevel, XtGrabNone); + } + + XtVaSetValues(toplevel, XtNtitle, version, 0); + } + + if (!dont_clear) + { + XSetWindowBackground (dpy, window, + get_pixel_resource ("background", "Background", + dpy, cmap)); + XClearWindow (dpy, window); + } + + if (!root_p) + /* wait for it to be mapped */ + XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window); + + XSync (dpy, False); + srandom ((int) time ((time_t *) 0)); + screenhack (dpy, window); /* doesn't return */ + return 0; +} diff --git a/hacks/screenhack.h b/hacks/screenhack.h new file mode 100644 index 00000000..a92cf70d --- /dev/null +++ b/hacks/screenhack.h @@ -0,0 +1,98 @@ +/* xscreensaver, Copyright (c) 1992-1997 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. + */ + +/* Found in Don Hopkins' .plan file: + * + * The color situation is a total flying circus. The X approach to + * device independence is to treat everything like a MicroVax framebuffer + * on acid. A truely portable X application is required to act like the + * persistent customer in the Monty Python ``Cheese Shop'' sketch. Even + * the simplest applications must answer many difficult questions, like: + * + * WHAT IS YOUR DISPLAY? + * display = XOpenDisplay("unix:0"); + * WHAT IS YOUR ROOT? + * root = RootWindow(display, DefaultScreen(display)); + * AND WHAT IS YOUR WINDOW? + * win = XCreateSimpleWindow(display, root, 0, 0, 256, 256, 1, + * BlackPixel(display, DefaultScreen(display)), + * WhitePixel(display, DefaultScreen(display))) + * OH ALL RIGHT, YOU CAN GO ON. + * + * WHAT IS YOUR DISPLAY? + * display = XOpenDisplay("unix:0"); + * WHAT IS YOUR COLORMAP? + * cmap = DefaultColormap(display, DefaultScreen(display)); + * AND WHAT IS YOUR FAVORITE COLOR? + * favorite_color = 0; / * Black. * / + * / * Whoops! No, I mean: * / + * favorite_color = BlackPixel(display, DefaultScreen(display)); + * / * AAAYYYYEEEEE!! (client dumps core & falls into the chasm) * / + * + * WHAT IS YOUR DISPLAY? + * display = XOpenDisplay("unix:0"); + * WHAT IS YOUR VISUAL? + * struct XVisualInfo vinfo; + * if (XMatchVisualInfo(display, DefaultScreen(display), + * 8, PseudoColor, &vinfo) != 0) + * visual = vinfo.visual; + * AND WHAT IS THE NET SPEED VELOCITY OF AN XConfigureWindow REQUEST? + * / * Is that a SubStructureRedirectMask or a ResizeRedirectMask? * / + * WHAT?! HOW AM I SUPPOSED TO KNOW THAT? + * AAAAUUUGGGHHH!!!! (server dumps core & falls into the chasm) + */ + +#ifndef __SCREENHACK_H__ +#define __SCREENHACK_H__ + +#include + +#include "config.h" + +#ifdef __hpux + /* Which of the ten billion standards does values.h belong to? + What systems always have it? */ +# include +#endif + +#include + +#include +#include +#include + +/* M_PI ought to have been defined in math.h, but... */ +#ifndef M_PI +# define M_PI 3.1415926535 +#endif + +#ifndef M_PI_2 +# define M_PI_2 1.5707963267 +#endif + +#include "yarandom.h" +#include "usleep.h" +#include "resources.h" +#include "hsv.h" +#include "colors.h" +#include "grabscreen.h" +#include "visual.h" + +extern Bool mono_p; +extern char *progname; +extern char *progclass; +extern XrmDatabase db; +extern XrmOptionDescRec options []; +extern char *defaults []; + +extern void screenhack (Display*,Window); + +#endif /* __SCREENHACK_H__ */ diff --git a/hacks/sierpinski.c b/hacks/sierpinski.c new file mode 100644 index 00000000..a75c3eb1 --- /dev/null +++ b/hacks/sierpinski.c @@ -0,0 +1,162 @@ +/* -*- Mode: C; tab-width: 4 -*- + * tri --- Sierpinski triangle fractal. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)tri.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1988-91 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: jwz@netscape.com: turned into a standalone program. + * 05-Sep-96: Desmond Daignault Datatimes Incorporated + * . + */ + +#ifdef STANDALONE +# define PROGCLASS "Sierpinski" +# define HACK_INIT init_tri +# define HACK_DRAW draw_tri +# define tri_opts xlockmore_opts +# define DEFAULTS "*count: 2000 \n" \ + "*cycles: 100 \n" \ + "*delay: 400000 \n" \ + "*ncolors: 64 \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt tri_opts = { + 0, NULL, 0, NULL, NULL }; + +typedef struct { + int width, height; + int time; + int px, py; + int total_npoints; + int npoints[3]; + unsigned long colors[3]; + XPoint *pointBuffer[3]; + XPoint vertex[3]; +} tristruct; + +static tristruct *tris = NULL; + +static void +startover(ModeInfo * mi) +{ + int j; + tristruct *tp = &tris[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) > 2) { + tp->colors[0] = (NRAND(MI_NPIXELS(mi))); + tp->colors[1] = (tp->colors[0] + MI_NPIXELS(mi) / 7 + + NRAND(2 * MI_NPIXELS(mi) / 7)) % MI_NPIXELS(mi); + tp->colors[2] = (tp->colors[0] + 4 * MI_NPIXELS(mi) / 7 + + NRAND(2 * MI_NPIXELS(mi) / 7)) % MI_NPIXELS(mi); + } + for (j = 0; j < 3; j++) { + tp->vertex[j].x = NRAND(tp->width); + tp->vertex[j].y = NRAND(tp->height); + } + tp->px = NRAND(tp->width); + tp->py = NRAND(tp->height); + tp->time = 0; + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); +} + +void +init_tri(ModeInfo * mi) +{ + tristruct *tp; + int i; + + if (tris == NULL) { + if ((tris = (tristruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (tristruct))) == NULL) + return; + } + tp = &tris[MI_SCREEN(mi)]; + + tp->width = MI_WIN_WIDTH(mi); + tp->height = MI_WIN_HEIGHT(mi); + + tp->total_npoints = MI_BATCHCOUNT(mi); + if (tp->total_npoints < 1) + tp->total_npoints = 1; + for (i = 0; i < 3; i++) { + if (!tp->pointBuffer[i]) + tp->pointBuffer[i] = (XPoint *) malloc(tp->total_npoints * + sizeof (XPoint)); + } + startover(mi); +} + +void +draw_tri(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + tristruct *tp = &tris[MI_SCREEN(mi)]; + XPoint *xp[3]; + int i = 0, v; + + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + for (i = 0; i < 3; i++) + xp[i] = tp->pointBuffer[i]; + for (i = 0; i < tp->total_npoints; i++) { + v = NRAND(3); + tp->px = (tp->px + tp->vertex[v].x) / 2; + tp->py = (tp->py + tp->vertex[v].y) / 2; + xp[v]->x = tp->px; + xp[v]->y = tp->py; + xp[v]++; + tp->npoints[v]++; + } + for (i = 0; i < 3; i++) { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, tp->colors[i])); + XDrawPoints(display, MI_WINDOW(mi), gc, tp->pointBuffer[i], tp->npoints[i], + CoordModeOrigin); + tp->npoints[i] = 0; + } + if (++tp->time >= MI_CYCLES(mi)) + startover(mi); +} + +void +release_tri(ModeInfo * mi) +{ + if (tris != NULL) { + int screen, i; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + for (i = 0; i < 3; i++) + if (tris[screen].pointBuffer[i] != NULL) { + (void) free((void *) tris[screen].pointBuffer[i]); + } + } + (void) free((void *) tris); + tris = NULL; + } +} + +void +refresh_tri(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} diff --git a/hacks/sierpinski.man b/hacks/sierpinski.man new file mode 100644 index 00000000..e2bc41a6 --- /dev/null +++ b/hacks/sierpinski.man @@ -0,0 +1,65 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +sierpinski - draws Sierpinski triangle fractals +.SH SYNOPSIS +.B sierpinski +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] + +.SH DESCRIPTION +The \fIsierpinski\fP program draws Sierpinski triangle fractals. +.SH OPTIONS +.I sierpinski +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 64. +The colors are chosen randomly. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.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 1996 by Desmond Daignault. + +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 +Desmond Daignault , 05-Sep-96. (Original +xlock version was called tri.c.) + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. (Renamed to sierpinski.) diff --git a/hacks/slidescreen.c b/hacks/slidescreen.c new file mode 100644 index 00000000..a3792cd0 --- /dev/null +++ b/hacks/slidescreen.c @@ -0,0 +1,265 @@ +/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997 + * 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. + */ + +#include "screenhack.h" + +static int grid_size; +static int pix_inc; +static int hole_x, hole_y; +static int bitmap_w, bitmap_h; +static int xoff, yoff; +static int grid_w, grid_h; +static int delay, delay2; +static GC gc; +int max_width, max_height; + +static void +init_slide (Display *dpy, Window window) +{ + int i; + XGCValues gcv; + XWindowAttributes xgwa; + int border; + unsigned long fg; + Drawable d; + Colormap cmap; + Visual *visual; + + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + visual = xgwa.visual; + max_width = xgwa.width; + max_height = xgwa.height; + + delay = get_integer_resource ("delay", "Integer"); + delay2 = get_integer_resource ("delay2", "Integer"); + 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; + + + if (delay < 0) delay = 0; + if (delay2 < 0) delay2 = 0; + if (pix_inc < 1) pix_inc = 1; + if (grid_size < 1) grid_size = 1; + + gcv.foreground = fg; + gcv.function = GXcopy; + gcv.subwindow_mode = IncludeInferiors; + gc = XCreateGC (dpy, window, GCForeground |GCFunction | GCSubwindowMode, + &gcv); + + XGetWindowAttributes (dpy, window, &xgwa); + bitmap_w = xgwa.width; + bitmap_h = xgwa.height; + + grid_w = bitmap_w / grid_size; + grid_h = bitmap_h / grid_size; + hole_x = random () % grid_w; + hole_y = random () % grid_h; + xoff = (bitmap_w - (grid_w * grid_size)) / 2; + yoff = (bitmap_h - (grid_h * grid_size)) / 2; + + d = window; + + if (border) + { + for (i = 0; i <= bitmap_w; i += grid_size) + XFillRectangle (dpy, d, gc, xoff+i-border/2, 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); + } + + if (xoff) + { + XFillRectangle (dpy, d, gc, 0, 0, xoff, bitmap_h); + XFillRectangle (dpy, d, gc, bitmap_w - xoff, 0, xoff, bitmap_h); + } + if (yoff) + { + XFillRectangle (dpy, d, gc, 0, 0, bitmap_w, yoff); + XFillRectangle (dpy, d, gc, 0, bitmap_h - yoff, bitmap_w, yoff); + } + + XSync (dpy, True); + if (delay2) usleep (delay2 * 2); + for (i = 0; i < grid_size; i += pix_inc) + { + XPoint points [3]; + points[0].x = xoff + grid_size * hole_x; + points[0].y = yoff + grid_size * hole_y; + points[1].x = points[0].x + grid_size; + points[1].y = points[0].y; + points[2].x = points[0].x; + points[2].y = points[0].y + i; + XFillPolygon (dpy, window, gc, points, 3, Convex, CoordModeOrigin); + + points[1].x = points[0].x; + points[1].y = points[0].y + grid_size; + points[2].x = points[0].x + i; + points[2].y = points[0].y + grid_size; + XFillPolygon (dpy, window, gc, points, 3, Convex, CoordModeOrigin); + + points[0].x = points[1].x + grid_size; + points[0].y = points[1].y; + points[2].x = points[0].x; + points[2].y = points[0].y - i; + XFillPolygon (dpy, window, gc, points, 3, Convex, CoordModeOrigin); + + points[1].x = points[0].x; + points[1].y = points[0].y - grid_size; + points[2].x = points[1].x - i; + points[2].y = points[1].y; + XFillPolygon (dpy, window, gc, points, 3, Convex, CoordModeOrigin); + + XSync (dpy, True); + if (delay) usleep (delay); + } + + XFillRectangle (dpy, window, gc, + xoff + grid_size * hole_x, + yoff + grid_size * hole_y, + grid_size, grid_size); +} + +static void +slide1 (Display *dpy, Window window) +{ + /* this code is a total kludge, but who cares, it works... */ + int i, x, y, ix, iy, dx, dy, dir, w, h, size, inc; + static int last = -1; + do { + dir = random () % 4; + switch (dir) + { + case 0: dx = 0, dy = 1; break; + case 1: dx = -1, dy = 0; break; + case 2: dx = 0, dy = -1; break; + case 3: dx = 1, dy = 0; break; + default: abort (); + } + } while (dir == last || + hole_x + dx < 0 || hole_x + dx >= grid_w || + hole_y + dy < 0 || hole_y + dy >= grid_h); + if (grid_w > 1 && grid_h > 1) + last = (dir == 0 ? 2 : dir == 2 ? 0 : dir == 1 ? 3 : 1); + + switch (dir) + { + case 0: size = 1 + (random()%(grid_h - hole_y - 1)); h = size; w = 1; break; + case 1: size = 1 + (random()%hole_x); w = size; h = 1; break; + case 2: size = 1 + (random()%hole_y); h = size; w = 1; break; + case 3: size = 1 + (random()%(grid_w - hole_x - 1)); w = size; h = 1; break; + default: abort (); + } + + if (dx == -1) hole_x -= (size - 1); + else if (dy == -1) hole_y -= (size - 1); + + ix = x = xoff + (hole_x + dx) * grid_size; + iy = y = yoff + (hole_y + dy) * grid_size; + inc = pix_inc; + for (i = 0; i < grid_size; i += inc) + { + int fx, fy, tox, toy; + if (inc + i > grid_size) + inc = grid_size - i; + tox = x - dx * inc; + toy = y - dy * inc; + + fx = (x < 0 ? 0 : x > max_width ? max_width : x); + fy = (y < 0 ? 0 : y > max_height ? max_height : y); + tox = (tox < 0 ? 0 : tox > max_width ? max_width : tox); + toy = (toy < 0 ? 0 : toy > max_height ? max_height : toy); + + XCopyArea (dpy, window, window, gc, + fx, fy, + grid_size * w, grid_size * h, + tox, toy); + + x -= dx * inc; + y -= dy * inc; + switch (dir) + { + case 0: XFillRectangle (dpy, window, gc, + ix, y + grid_size * h, grid_size * w, iy - y); + break; + case 1: XFillRectangle (dpy, window, gc, ix, iy, x - ix, grid_size * h); + break; + case 2: XFillRectangle (dpy, window, gc, ix, iy, grid_size * w, y - iy); + break; + case 3: XFillRectangle (dpy, window, gc, + x + grid_size * w, iy, ix - x, grid_size * h); + break; + } + + XSync (dpy, True); + if (delay) usleep (delay); + } + switch (dir) + { + case 0: hole_y += size; break; + case 1: hole_x--; break; + case 2: hole_y--; break; + case 3: hole_x += size; break; + } +} + + +char *progclass = "SlidePuzzle"; + +char *defaults [] = { + "*dontClearRoot: True", + +#ifdef __sgi /* really, HAVE_READ_DISPLAY_EXTENSION */ + "*visualID: Best", +#endif + + "*background: Black", + "*gridSize: 70", + "*pixelIncrement: 10", + "*internalBorderWidth: 1", + "*delay: 50000", + "*delay2: 1000000", + 0 +}; + +XrmOptionDescRec options [] = { + { "-grid-size", ".gridSize", XrmoptionSepArg, 0 }, + { "-ibw", ".internalBorderWidth", XrmoptionSepArg, 0 }, + { "-increment", ".pixelIncrement", XrmoptionSepArg, 0 }, + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-delay2", ".delay2", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + init_slide (dpy, window); + while (1) + { + slide1 (dpy, window); + if (delay2) usleep (delay2); + } +} diff --git a/hacks/slidescreen.man b/hacks/slidescreen.man new file mode 100644 index 00000000..3d03dc50 --- /dev/null +++ b/hacks/slidescreen.man @@ -0,0 +1,68 @@ +.TH XScreenSaver 1 "3-dec-92" "X Version 11" +.SH NAME +slidescreen - permute the screen image like an 8-puzzle +.SH SYNOPSIS +.B slidescreen +[\-display \fIhost:display.screen\fP] [\-background \fIcolor\fP] [\-grid-size \fIpixels\fP] [\-ibw \fIpixels\fP] [\-increment \fIpixels\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] +.SH DESCRIPTION +The \fIslidescreen\fP program takes an image of the screen, divides it into +a grid, deletes a random square of that grid, and then randomly slides +one of the neighbors of this "hole" into the hole (and repeat.) +.SH OPTIONS +.I slidescreen +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 \-grid-size \fIpixels\fP +The size of the grid cells. Default 70 pixels. +.TP 8 +.B \-ibw \fIpixels\fP +The size of the "gutter" between grid cells. Default 1 pixel. +.TP 8 +.B \-increment \fIpixels\fP +How many pixels by which a piece should be moved when sliding to a new +location. Default 10 pixels. +.TP 8 +.B \-delay \fImicroseconds\fP +How much of a delay should be introduced between steps of the animation of +the motion of each segment. Default 50000, which is 0.05 seconds. This +is closely related to the \fI\-increment\fP parameter. +.TP 8 +.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. +.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 1992 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 , 3-dec-92. diff --git a/hacks/slip.c b/hacks/slip.c new file mode 100644 index 00000000..3b83e2bb --- /dev/null +++ b/hacks/slip.c @@ -0,0 +1,300 @@ +/* -*- Mode: C; tab-width: 4 -*- + * slip --- lots of blits. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)slip.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1992 by Scott Draves (spot@cs.cmu.edu) + * + * 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: + * 12-May-97: jwz@netscape.com: turned into a standalone program. + * 01-Dec-95: Patched for VMS . + */ + +#ifdef STANDALONE +# define PROGCLASS "Slip" +# define HACK_INIT init_slip +# define HACK_DRAW draw_slip +# define slip_opts xlockmore_opts +# define DEFAULTS "*count: 35 \n" \ + "*cycles: 50 \n" \ + "*delay: 50000 \n" \ + "*ncolors: 200 \n" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt slip_opts = { + 0, NULL, 0, NULL, NULL }; + +typedef struct { + int width, height; + int nblits_remaining; + int blit_width, blit_height; + int mode; + int first_time; + int backwards; +} slipstruct; +static slipstruct *slips = NULL; + +static short +halfrandom(int mv) +{ + static short lasthalf = 0; + unsigned long r; + + if (lasthalf) { + r = lasthalf; + lasthalf = 0; + } else { + r = LRAND(); + lasthalf = r >> 16; + } + return r % mv; +} + +static int +erandom(int mv) +{ + static int stage = 0; + static unsigned long r; + int res; + + if (0 == stage) { + r = LRAND(); + stage = 7; + } + res = r & 0xf; + r = r >> 4; + stage--; + if (res & 8) + return res & mv; + else + return -(res & mv); +} + +static void +prepare_screen(ModeInfo * mi, slipstruct * s) +{ + + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + int i, n, w = s->width / 20; + int not_solid = halfrandom(10); + +#ifdef STANDALONE /* jwz -- sometimes hack the desktop image! */ + if (halfrandom(5) == 0) + { + grab_screen_image(DefaultScreenOfDisplay (MI_DISPLAY(mi)), + MI_WINDOW(mi)); + return; + } +#endif + + s->backwards = LRAND() & 1; /* jwz: go the other way sometimes */ + + if (s->first_time || !halfrandom(5)) { + XClearWindow(display, MI_WINDOW(mi)); + n = 300; + } else { + if (halfrandom(5)) + return; + if (halfrandom(5)) + n = 100; + else + n = 2000; + } + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, halfrandom(MI_NPIXELS(mi)))); + else if (halfrandom(2)) + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + + for (i = 0; i < n; i++) { + if (not_solid) + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, halfrandom(MI_NPIXELS(mi)))); + else if (halfrandom(2)) + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + XFillRectangle(display, MI_WINDOW(mi), gc, + halfrandom(s->width - w), + halfrandom(s->height - w), + w, w); + } + s->first_time = 0; +} + +static int +quantize(double d) +{ + int i = (int) floor(d); + double f = d - i; + + if ((LRAND() & 0xff) < f * 0xff) + i++; + return i; +} + +void +init_slip(ModeInfo * mi) +{ + slipstruct *sp; + + if (slips == NULL) { + if ((slips = (slipstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (slipstruct))) == NULL) + return; + } + sp = &slips[MI_SCREEN(mi)]; + + sp->width = MI_WIN_WIDTH(mi); + sp->height = MI_WIN_HEIGHT(mi); + + sp->blit_width = sp->width / 25; + sp->blit_height = sp->height / 25; + sp->nblits_remaining = 0; + sp->mode = 0; + sp->first_time = 1; + + /* no "NoExpose" events from XCopyArea wanted */ + XSetGraphicsExposures(MI_DISPLAY(mi), MI_GC(mi), False); +} + +void +draw_slip(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + slipstruct *s = &slips[MI_SCREEN(mi)]; + int timer; + + timer = MI_BATCHCOUNT(mi) * MI_CYCLES(mi); + + while (timer--) { + int xi = halfrandom(s->width - s->blit_width); + int yi = halfrandom(s->height - s->blit_height); + double x, y, dx = 0, dy = 0, t, s1, s2; + + if (0 == s->nblits_remaining--) { + static lut[] = + {0, 0, 0, 1, 1, 1, 2}; + + prepare_screen(mi, s); + s->nblits_remaining = MI_BATCHCOUNT(mi) * + (2000 + halfrandom(1000) + halfrandom(1000)); + if (s->mode == 2) + s->mode = halfrandom(2); + else + s->mode = lut[halfrandom(7)]; + } + x = (2 * xi + s->blit_width) / (double) s->width - 1; + y = (2 * yi + s->blit_height) / (double) s->height - 1; + + /* (x,y) is in biunit square */ + switch (s->mode) { + case 0: + dx = x; + dy = y; + + if (dy < 0) { + dy += 0.04; + if (dy > 0) + dy = 0.00; + } + if (dy > 0) { + dy -= 0.04; + if (dy < 0) + dy = 0.00; + } + t = dx * dx + dy * dy + 1e-10; + s1 = 2 * dx * dx / t - 1; + s2 = 2 * dx * dy / t; + dx = s1 * 5; + dy = s2 * 5; + if (s->backwards) { /* jwz: go the other way sometimes */ + dx = -dx; + dy = -dy; + } + break; + case 1: + dx = erandom(3); + dy = erandom(3); + break; + case 2: + dx = x * 3; + dy = y * 3; + break; + } + { + int qx = xi + quantize(dx), qy = yi + quantize(dy); + int wrap; + + if (qx < 0 || qy < 0 || + qx >= s->width - s->blit_width || + qy >= s->height - s->blit_height) + continue; + + XCopyArea(display, window, window, gc, xi, yi, + s->blit_width, s->blit_height, + qx, qy); + + switch (s->mode) { + case 0: + /* wrap */ + wrap = s->width - (2 * s->blit_width); + if (qx > wrap) + XCopyArea(display, window, window, gc, qx, qy, + s->blit_width, s->blit_height, + qx - wrap, qy); + + if (qx < 2 * s->blit_width) + XCopyArea(display, window, window, gc, qx, qy, + s->blit_width, s->blit_height, + qx + wrap, qy); + + wrap = s->height - (2 * s->blit_height); + if (qy > wrap) + XCopyArea(display, window, window, gc, qx, qy, + s->blit_width, s->blit_height, + qx, qy - wrap); + + if (qy < 2 * s->blit_height) + XCopyArea(display, window, window, gc, qx, qy, + s->blit_width, s->blit_height, + qx, qy + wrap); + break; + case 1: + case 2: + break; + } + } + } +} + +void +release_slip(ModeInfo * mi) +{ + if (slips != NULL) { + (void) free((void *) slips); + slips = NULL; + } +} diff --git a/hacks/slip.man b/hacks/slip.man new file mode 100644 index 00000000..569e1a12 --- /dev/null +++ b/hacks/slip.man @@ -0,0 +1,76 @@ +.TH XScreenSaver 1 "13-aug-92" "X Version 11" +.SH NAME +flame - sucks your screen into a jet engine +.SH SYNOPSIS +.B flame +[\-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 +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 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. +.TP 8 +.B \-points \fIinteger\fP +How many pixels to draw for each fractal. Default 10000. +.TP 8 +.B \-delay \fImicroseconds\fP +How long we should wait between drawing each fractal. Default 50000, +or about 1/20th second. +.TP 8 +.B \-cycles \fIinteger\fP +How long to frobnicate. Default 50. + +.TP 8 +.B \-count \fIinteger\fP +How many whooziwhatsis. Default 35. + +.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 1992 by Scott Draves. + +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 +Scott Graves . + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 18-Oct-93. diff --git a/hacks/sphere.c b/hacks/sphere.c new file mode 100644 index 00000000..728c7240 --- /dev/null +++ b/hacks/sphere.c @@ -0,0 +1,246 @@ +/* -*- Mode: C; tab-width: 4 -*- + * sphere.c --- draw a bunch of shaded spheres + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sphere.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright 1988 by Sun Microsystems, Inc. Mountain View, CA. + * + * All Rights Reserved + * + * 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, and that the names of Sun or MIT not be used in advertising + * or publicity pertaining to distribution of the software without specific + * prior written permission. Sun and M.I.T. make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without any express or implied warranty. + * + * SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * IN NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * *************************************************************************** + * + * Revision History: + * 30-May-97: jwz@netscape.com: made it go vertically as well as horizontally. + * 27-May-97: jwz@netscape.com: turned into a standalone program. + * 2-Sep-93: xlock version (David Bagley bagleyd@bigfoot.com) + * 1988: Revised to use SunView canvas instead of gfxsw Sun Microsystems + * 1982: Orignal Algorithm Tom Duff Lucasfilm Ltd. + */ + +#ifdef STANDALONE +# define PROGCLASS "Sphere" +# define HACK_INIT init_sphere +# define HACK_DRAW draw_sphere +# define sphere_opts xlockmore_opts +# define DEFAULTS "*delay: 1000 \n" \ + "*ncolors: 64 \n" +# define BRIGHT_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt sphere_opts = { + 0, NULL, 0, NULL, NULL }; + +/*- + * (NX, NY, NZ) is the light source vector -- length should be 100 + */ +#define NX 48 +#define NY (-36) +#define NZ 80 +#define NR 100 +#define SQRT(a) ((int)sqrt((double)(a))) + +typedef struct { + int width, height; + int radius; + int x0; /* x center */ + int y0; /* y center */ + int color; + int x, y; + int dirx, diry; + int maxx, maxy; + XPoint *points; +} spherestruct; + +static spherestruct *spheres = NULL; + +void +init_sphere(ModeInfo * mi) +{ + spherestruct *sp; + + if (spheres == NULL) { + if ((spheres = (spherestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (spherestruct))) == NULL) + return; + } + sp = &spheres[MI_SCREEN(mi)]; + + if (sp->points) { + (void) free((void *) sp->points); + sp->points = NULL; + } + sp->width = MI_WIN_WIDTH(mi); + sp->height = MI_WIN_HEIGHT(mi); + sp->points = (XPoint *) malloc(sp->height * sizeof (XPoint)); + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + + sp->dirx = 1; +} + +void +draw_sphere(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + spherestruct *sp = &spheres[MI_SCREEN(mi)]; + register minx = 0, maxx = 0, miny = 0, maxy = 0, npts = 0; + + if ((sp->dirx && ABS(sp->x) >= sp->radius) || + (sp->diry && ABS(sp->y) >= sp->radius)) { + sp->radius = NRAND(MIN(sp->width / 2, sp->height / 2) - 1) + 1; + + if (LRAND() & 1) { + sp->dirx = (LRAND() & 1) * 2 - 1; + sp->diry = 0; + } else { + sp->dirx = 0; + sp->diry = (LRAND() & 1) * 2 - 1; + } + sp->x0 = NRAND(sp->width); + sp->y0 = NRAND(sp->height); + + sp->x = -sp->radius * sp->dirx; + sp->y = -sp->radius * sp->diry; + + if (MI_NPIXELS(mi) > 2) + sp->color = NRAND(MI_NPIXELS(mi)); + } + if (sp->dirx == 1) { + if (sp->x0 + sp->x < 0) + sp->x = -sp->x0; + } else if (sp->dirx == -1) { + if (sp->x0 + sp->x >= sp->width) + sp->x = sp->width - sp->x0 - 1; + } + if (sp->diry == 1) { + if (sp->y0 + sp->y < 0) + sp->y = -sp->y0; + } else if (sp->diry == -1) { + if (sp->y0 + sp->y >= sp->height) + sp->y = sp->height - sp->y0 - 1; + } + if (sp->dirx) { + sp->maxy = SQRT(sp->radius * sp->radius - sp->x * sp->x); + miny = -sp->maxy; + if (sp->y0 - sp->maxy < 0) + miny = -sp->y0; + maxy = sp->maxy; + } + if (sp->diry) { + sp->maxx = SQRT(sp->radius * sp->radius - sp->y * sp->y); + minx = -sp->maxx; + if (sp->x0 - sp->maxx < 0) + minx = -sp->x0; + maxx = sp->maxx; + } + if (sp->dirx) { + if (sp->y0 + sp->maxy >= sp->height) + maxy = sp->height - sp->y0; + } + if (sp->diry) { + if (sp->x0 + sp->maxx >= sp->width) + maxx = sp->width - sp->x0; + } + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + + if (sp->dirx) + XDrawLine(display, MI_WINDOW(mi), gc, + sp->x0 + sp->x, sp->y0 + miny, sp->x0 + sp->x, sp->y0 + maxy); + if (sp->diry) + XDrawLine(display, MI_WINDOW(mi), gc, + sp->x0 + minx, sp->y0 + sp->y, sp->x0 + maxx, sp->y0 + sp->y); + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, sp->color)); + else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + + if (sp->dirx) + for (sp->y = miny; sp->y <= maxy; sp->y++) + if ((NRAND(sp->radius * NR)) <= + (NX * sp->x + NY * sp->y + NZ * + SQRT(sp->radius * sp->radius - sp->x * sp->x - sp->y * sp->y))) { + sp->points[npts].x = sp->x + sp->x0; + sp->points[npts].y = sp->y + sp->y0; + npts++; + } + if (sp->diry) + for (sp->x = minx; sp->x <= maxx; sp->x++) + if ((NRAND(sp->radius * NR)) <= + (NX * sp->x + NY * sp->y + NZ * + SQRT(sp->radius * sp->radius - sp->x * sp->x - sp->y * sp->y))) { + sp->points[npts].x = sp->x + sp->x0; + sp->points[npts].y = sp->y + sp->y0; + npts++; + } + XDrawPoints(display, MI_WINDOW(mi), gc, sp->points, npts, CoordModeOrigin); + if (sp->dirx == 1) { + sp->x++; + if (sp->x0 + sp->x >= sp->width) + sp->x = sp->radius; + } else if (sp->dirx == -1) { + sp->x--; + if (sp->x0 + sp->x < 0) + sp->x = -sp->radius; + } + if (sp->diry == 1) { + sp->y++; + if (sp->y0 + sp->y >= sp->height) + sp->y = sp->radius; + } else if (sp->diry == -1) { + sp->y--; + if (sp->y0 + sp->y < 0) + sp->y = -sp->radius; + } +} + +void +release_sphere(ModeInfo * mi) +{ + if (spheres != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + spherestruct *sp = &spheres[screen]; + + if (sp->points) { + (void) free((void *) sp->points); + sp->points = NULL; + } + } + (void) free((void *) spheres); + spheres = NULL; + } +} + +void +refresh_sphere(ModeInfo * mi) +{ + spherestruct *sp = &spheres[MI_SCREEN(mi)]; + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + sp->x = -sp->radius; +} diff --git a/hacks/sphere.man b/hacks/sphere.man new file mode 100644 index 00000000..89189884 --- /dev/null +++ b/hacks/sphere.man @@ -0,0 +1,58 @@ +.TH XScreenSaver 1 "27-May-97" "X Version 11" +.SH NAME +sphere - draws shaded spheres +.SH SYNOPSIS +.B sphere +[\-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 \fIsphere\fP program draws shaded spheres. +.SH OPTIONS +.I sphere +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 64. +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 1988 by Sun Microsystems, Inc. + +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 +Sun Microsystems, Inc, 1988. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 27-May-97. diff --git a/hacks/spiral.c b/hacks/spiral.c new file mode 100644 index 00000000..24b2b73c --- /dev/null +++ b/hacks/spiral.c @@ -0,0 +1,300 @@ +/* -*- Mode: C; tab-width: 4 -*- + * spiral --- low cpu screen design. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)spiral.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1994 Darrick Brown. + * + * 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. + * + * Idea based on a graphics demo I saw a *LONG* time ago. + * + * See xlock.c for copying information. + * + * Revision History: + * 10-May-97: jwz@netscape.com: turned into a standalone program. + * 24-Jul-95: Fix to allow cycles not to have an arbitrary value by + * Peter Schmitzberger (schmitz@coma.sbg.ac.at). + * 06-Mar-95: Finished cleaning up and final testing. + * Copyright (c) 1994 by Darrick Brown. + * + * 03-Mar-95: Cleaned up code. + * 12-Jul-94: Written. + */ + +#ifdef STANDALONE +# define PROGCLASS "Spiral" +# define HACK_INIT init_spiral +# define HACK_DRAW draw_spiral +# define spiral_opts xlockmore_opts +# define DEFAULTS "*count: 40 \n" \ + "*cycles: 350 \n" \ + "*delay: 50000 \n" \ + "*ncolors: 64 \n" +# define SMOOTH_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt spiral_opts = { + 0, NULL, 0, NULL, NULL }; + +#define MAXTRAIL 512 /* The length of the trail */ +#define MAXDOTS 40 +#define MINDOTS 1 +#define TWOPI (2.0*M_PI) /* for convienence */ +#define JAGGINESS 4 /* This sets the "Craziness" of the spiral (I like 4) */ +#define SPEED 2.0 + +/* How many segments to draw per cycle when redrawing */ +#define REDRAWSTEP 3 + +typedef struct { + float hx, hy, ha, hr; +} Traildots; + +typedef struct { + Traildots *traildots; + float cx, cy; + float angle; + float radius; + float dr, da; + float dx, dy; + int erase; + int inc; + float colors; + int width, height; + float top, bottom, left, right; + int dots, nlength; + int redrawing, redrawpos; +} spiralstruct; + +static spiralstruct *spirals = NULL; + +static void draw_dots(ModeInfo * mi, int in); + +#define TFX(sp,x) ((int)((x/sp->right)*(float)sp->width)) +#define TFY(sp,y) ((int)((y/sp->top)*(float)sp->height)) + +static void +draw_dots(ModeInfo * mi, int in) +{ + + float i, inc; + float x, y; + + spiralstruct *sp = &spirals[MI_SCREEN(mi)]; + + inc = TWOPI / (float) sp->dots; + for (i = 0.0; i < TWOPI; i += inc) { + x = sp->traildots[in].hx + COSF(i + sp->traildots[in].ha) * + sp->traildots[in].hr; + y = sp->traildots[in].hy + SINF(i + sp->traildots[in].ha) * + sp->traildots[in].hr; + XDrawPoint(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + TFX(sp, x), TFY(sp, y)); + } +} + +void +init_spiral(ModeInfo * mi) +{ + spiralstruct *sp; + int i; + + if (spirals == NULL) { + if ((spirals = (spiralstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (spiralstruct))) == NULL) + return; + } + sp = &spirals[MI_SCREEN(mi)]; + + sp->width = MI_WIN_WIDTH(mi); + sp->height = MI_WIN_HEIGHT(mi); + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + + /* Init */ + sp->nlength = MI_CYCLES(mi); + + if (!sp->traildots) + sp->traildots = (Traildots *) malloc(sp->nlength * sizeof (Traildots)); + + /* initialize the allocated array */ + for (i = 0; i < sp->nlength; i++) { + sp->traildots[i].hx = 0.0; + sp->traildots[i].hy = 0.0; + sp->traildots[i].ha = 0.0; + sp->traildots[i].hr = 0.0; + } + sp->redrawing = 0; + + /* keep the window parameters proportional */ + sp->top = 10000.0; + sp->bottom = 0; + sp->right = (float) (sp->width) / (float) (sp->height) * (10000.0); + sp->left = 0; + + /* assign the initial values */ + sp->cx = (float) (5000.0 - NRAND(2000)) / 10000.0 * sp->right; + sp->cy = (float) (5000.0 - NRAND(2000)); + sp->radius = (float) (NRAND(200) + 200); + sp->angle = 0.0; + sp->dx = (float) (10 - NRAND(20)) * SPEED; + sp->dy = (float) (10 - NRAND(20)) * SPEED; + sp->dr = (float) ((NRAND(10) + 4) * (1 - (LRAND() & 1) * 2)); + sp->da = (float) NRAND(360) / 7200.0 + 0.01; + if (MI_NPIXELS(mi) > 2) + sp->colors = (float) NRAND(MI_NPIXELS(mi)); + sp->erase = 0; + sp->inc = 0; + sp->traildots[sp->inc].hx = sp->cx; + sp->traildots[sp->inc].hy = sp->cy; + sp->traildots[sp->inc].ha = sp->angle; + sp->traildots[sp->inc].hr = sp->radius; + sp->inc++; + + sp->dots = MI_BATCHCOUNT(mi); + if (sp->dots < -MINDOTS) + sp->dots = NRAND(sp->dots - MINDOTS + 1) + MINDOTS; + /* Absolute minimum */ + if (sp->dots < MINDOTS) + sp->dots = MINDOTS; +} + +void +draw_spiral(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + spiralstruct *sp = &spirals[MI_SCREEN(mi)]; + int i, j; + + if (sp->erase == 1) { + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + draw_dots(mi, sp->inc); + } + sp->cx += sp->dx; + sp->traildots[sp->inc].hx = sp->cx; + + if ((sp->cx > 9000.0) || (sp->cx < 1000.0)) + sp->dx *= -1.0; + + sp->cy += sp->dy; + sp->traildots[sp->inc].hy = sp->cy; + + if ((sp->cy > 9000.0) || (sp->cy < 1000.0)) + sp->dy *= -1.0; + + sp->radius += sp->dr; + sp->traildots[sp->inc].hr = sp->radius; + + if ((sp->radius > 2500.0) && (sp->dr > 0.0)) + sp->dr *= -1.0; + else if ((sp->radius < 50.0) && (sp->radius < 0.0)) + sp->dr *= -1.0; + + /* Randomly give some variations to: */ + + /* spiral direction (if it is within the boundaries) */ + if ((NRAND(3000) < 1 * JAGGINESS) && + (((sp->cx > 2000.0) && (sp->cx < 8000.0)) && + ((sp->cy > 2000.0) && (sp->cy < 8000.0)))) { + sp->dx = (float) (10 - NRAND(20)) * SPEED; + sp->dy = (float) (10 - NRAND(20)) * SPEED; + } + /* The speed of the change in size of the spiral */ + if (NRAND(3000) < 1 * JAGGINESS) { + if (LRAND() & 1) + sp->dr += (float) (NRAND(3) + 1); + else + sp->dr -= (float) (NRAND(3) + 1); + + /* don't let it get too wild */ + if (sp->dr > 18.0) + sp->dr = 18.0; + else if (sp->dr < 4.0) + sp->dr = 4.0; + } + /* The speed of rotation */ + if (NRAND(3000) < 1 * JAGGINESS) + sp->da = (float) NRAND(360) / 7200.0 + 0.01; + + /* Reverse rotation */ + if (NRAND(3000) < 1 * JAGGINESS) + sp->da *= -1.0; + + sp->angle += sp->da; + sp->traildots[sp->inc].ha = sp->angle; + + if (sp->angle > TWOPI) + sp->angle -= TWOPI; + else if (sp->angle < 0.0) + sp->angle += TWOPI; + + sp->colors += (float) MI_NPIXELS(mi) / ((float) (2 * sp->nlength)); + if (sp->colors >= (float) MI_NPIXELS(mi)) + sp->colors = 0.0; + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, (int) sp->colors)); + else + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + draw_dots(mi, sp->inc); + sp->inc++; + + if (sp->inc > sp->nlength - 1) { + sp->inc -= sp->nlength; + sp->erase = 1; + } + if (sp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + j = (sp->inc - sp->redrawpos + sp->nlength) % sp->nlength; + draw_dots(mi, j); + + if (++(sp->redrawpos) >= sp->nlength) { + sp->redrawing = 0; + break; + } + } + } +} + +void +release_spiral(ModeInfo * mi) +{ + if (spirals != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + spiralstruct *sp = &spirals[screen]; + + if (sp->traildots) + (void) free((void *) sp->traildots); + } + (void) free((void *) spirals); + spirals = NULL; + } +} + +void +refresh_spiral(ModeInfo * mi) +{ + spiralstruct *sp = &spirals[MI_SCREEN(mi)]; + + sp->redrawing = 1; + sp->redrawpos = 0; +} diff --git a/hacks/spiral.man b/hacks/spiral.man new file mode 100644 index 00000000..eeb8850b --- /dev/null +++ b/hacks/spiral.man @@ -0,0 +1,67 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +spiral - draws moving circular spiral patterns +.SH SYNOPSIS +.B spiral +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-count \fIinteger\fP] + +.SH DESCRIPTION +The \fIspiral\fP program draws moving circular spiral patterns +.SH OPTIONS +.I spiral +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 64. +The colors are chosen randomly. +.TP 8 +.B \-count \fIinteger\fP +Default 40. +.TP 8 +.B \-cycles \fIinteger\fP +Default 350. + +.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 1994 by Darrick Brown. + +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 +Darrick Brown, 1994. + +Improved by Peter Schmitzberger , 24-Jul-95. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/starfish.c b/hacks/starfish.c new file mode 100644 index 00000000..143ddf8b --- /dev/null +++ b/hacks/starfish.c @@ -0,0 +1,535 @@ +/* xscreensaver, Copyright (c) 1997 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. + */ + +#include +#include /* for gettimeofday() */ +#include "screenhack.h" +#include "spline.h" + + +static Colormap cmap; +static Bool cycle_p; +static XColor *colors; +static int ncolors; +static int fg_index; +static GC gc; + +#define SCALE 1000 /* fixed-point math, for sub-pixel motion */ + + +#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n)))) +#define RANDSIGN() ((random() & 1) ? 1 : -1) + +enum starfish_mode { + pulse, + zoom +}; + + +struct starfish { + enum starfish_mode mode; + Bool blob_p; + int skip; + long x, y; /* position of midpoint */ + double th; /* angle of rotation */ + double rotv; /* rotational velocity */ + double rota; /* rotational acceleration */ + long elasticity; /* how fast it deforms: radial velocity */ + double rot_max; + long min_r, max_r; /* radius range */ + int npoints; /* control points */ + long *r; /* radii */ + spline *spline; + XPoint *prev; + int n_prev; +}; + +static struct starfish * +make_starfish (int maxx, int maxy, int size) +{ + struct starfish *s = (struct starfish *) calloc(1, sizeof(*s)); + int i; + int mid; + + s->blob_p = get_boolean_resource ("blob", "Blob"); + s->elasticity = SCALE * get_float_resource ("thickness", "Thickness"); + + if (s->elasticity == 0) + /* bell curve from 0-15, avg 7.5 */ + s->elasticity = RAND(5*SCALE) + RAND(5*SCALE) + RAND(5*SCALE); + + s->rotv = get_float_resource ("rotation", "Rotation"); + if (s->rotv == -1) + /* bell curve from 0-12 degrees, avg 6 */ + s->rotv = frand(4) + frand(4) + frand(4); + + s->rotv /= 360; /* convert degrees to ratio */ + + if (s->blob_p) + { + s->elasticity *= 3; + s->rotv *= 3; + } + + s->rot_max = s->rotv * 2; + s->rota = 0.0004 + frand(0.0002); + + + if (! (random() % 20)) + size *= frand(0.35) + frand(0.35) + 0.3; + + { + static char skips[] = { 2, 2, 2, 2, + 3, 3, 3, + 6, 6, + 12 }; + s->skip = skips[random() % sizeof(skips)]; + } + + if (! (random() % (s->skip == 2 ? 3 : 12))) + s->mode = zoom; + else + s->mode = pulse; + + maxx *= SCALE; + maxy *= SCALE; + size *= SCALE; + + s->max_r = size; + s->min_r = 0; + + if (s->min_r < (5*SCALE)) s->min_r = (5*SCALE); + mid = ((s->min_r + s->max_r) / 2); + + s->x = maxx/2; + s->y = maxy/2; + + s->th = frand(M_PI+M_PI) * RANDSIGN(); + + { + static char sizes[] = { 3, 3, 3, 3, 3, + 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, + 8, 8, 8, + 10, + 35 }; + int nsizes = sizeof(sizes); + if (s->skip > 3) + nsizes -= 4; + s->npoints = s->skip * sizes[random() % nsizes]; + } + + s->spline = make_spline (s->npoints); + s->r = (long *) malloc (sizeof(*s->r) * s->npoints); + + for (i = 0; i < s->npoints; i++) + s->r[i] = ((i % s->skip) == 0) ? 0 : size; + + return s; +} + + +static void +free_starfish (struct starfish *s) +{ + if (s->r) free (s->r); + if (s->prev) free (s->prev); + if (s->spline) + { + if (s->spline->control_x) free (s->spline->control_x); + if (s->spline->control_y) free (s->spline->control_y); + if (s->spline->points) free (s->spline->points); + free (s->spline); + } + free (s); +} + + +static void +throb_starfish (struct starfish *s) +{ + int i; + double frac = ((M_PI+M_PI) / s->npoints); + + for (i = 0; i < s->npoints; i++) + { + long r = s->r[i]; + long ra = (r > 0 ? r : -r); + double th = (s->th > 0 ? s->th : -s->th); + long x, y; + long elasticity = s->elasticity; + + /* place control points evenly around perimiter, shifted by theta */ + x = s->x + ra * cos (i * frac + th); + y = s->y + ra * sin (i * frac + th); + + s->spline->control_x[i] = x / SCALE; + s->spline->control_y[i] = y / SCALE; + + if (s->mode == zoom && ((i % s->skip) == 0)) + continue; + + /* Slow down near the end points: move fastest in the middle. */ + { + double ratio = (double)ra / (double)(s->max_r - s->min_r); + if (ratio > 0.5) ratio = 1-ratio; /* flip */ + ratio *= 2; /* normalize */ + ratio = (ratio * 0.9) + 0.1; /* fudge */ + elasticity *= ratio; + } + + + /* Increase/decrease radius by elasticity */ + ra += (r >= 0 ? elasticity : -elasticity); + if ((i % s->skip) == 0) + ra += (elasticity / 2); + + r = ra * (r >= 0 ? 1 : -1); + + /* If we've reached the end (too long or too short) reverse direction. */ + if ((ra > s->max_r && r >= 0) || + (ra < s->min_r && r < 0)) + r = -r; + + s->r[i] = r; + } +} + + +static void +spin_starfish (struct starfish *s) +{ + double th = s->th; + if (th < 0) + th = -(th + s->rotv); + else + th += s->rotv; + + if (th > (M_PI+M_PI)) + th -= (M_PI+M_PI); + else if (th < 0) + th += (M_PI+M_PI); + + s->th = (s->th > 0 ? th : -th); + + s->rotv += s->rota; + + if (s->rotv > s->rot_max || + s->rotv < -s->rot_max) + { + s->rota = -s->rota; + } + /* If it stops, start it going in the other direction. */ + else if (s->rotv < 0) + { + if (random() & 1) + { + /* keep going in the same direction */ + s->rotv = 0; + if (s->rota < 0) + s->rota = -s->rota; + } + else + { + /* reverse gears */ + s->rotv = -s->rotv; + s->rota = -s->rota; + s->th = -s->th; + } + } + + + /* Alter direction of rotational acceleration randomly. */ + if (! (random() % 120)) + s->rota = -s->rota; + + /* Change acceleration very occasionally. */ + if (! (random() % 200)) + { + if (random() & 1) + s->rota *= 1.2; + else + s->rota *= 0.8; + } +} + + +static void +draw_starfish (Display *dpy, Drawable drawable, GC gc, struct starfish *s, + Bool fill_p) +{ + compute_closed_spline (s->spline); + if (s->prev) + { + XPoint *points = (XPoint *) + malloc (sizeof(XPoint) * (s->n_prev + s->spline->n_points + 2)); + int i = s->spline->n_points; + int j = s->n_prev; + memcpy (points, s->spline->points, (i * sizeof(*points))); + memcpy (points+i, s->prev, (j * sizeof(*points))); + + if (s->blob_p) + XClearWindow (dpy, drawable); + XFillPolygon (dpy, drawable, gc, points, i+j, Complex, CoordModeOrigin); + free (points); + + free (s->prev); + s->prev = 0; + } + + s->prev = (XPoint *) malloc (s->spline->n_points * sizeof(XPoint)); + memcpy (s->prev, s->spline->points, s->spline->n_points * sizeof(XPoint)); + s->n_prev = s->spline->n_points; + +#ifdef DEBUG + if (s->blob_p) + { + int i; + for (i = 0; i < s->npoints; i++) + XDrawLine (dpy, drawable, gc, s->x/SCALE, s->y/SCALE, + s->spline->control_x[i], s->spline->control_y[i]); + } +#endif +} + + +static struct starfish * +make_window_starfish (Display *dpy, Window window) +{ + XWindowAttributes xgwa; + int size; + Bool blob_p = get_boolean_resource ("blob", "Blob"); + XGetWindowAttributes (dpy, window, &xgwa); + size = (xgwa.width < xgwa.height ? xgwa.width : xgwa.height); + if (blob_p) size /= 2; + else size *= 1.3; + return make_starfish (xgwa.width, xgwa.height, size); +} + + +static struct starfish * +init_starfish (Display *dpy, Window window) +{ + static Bool first_time = True; + XGCValues gcv; + XWindowAttributes xgwa; + Bool blob_p = get_boolean_resource ("blob", "Blob"); + XGetWindowAttributes (dpy, window, &xgwa); + + cmap = xgwa.colormap; + cycle_p = get_boolean_resource ("cycle", "Cycle"); + + if (!first_time) + { + if (colors && ncolors) + free_colors (dpy, cmap, colors, ncolors); + if (colors) + free (colors); + colors = 0; + } + + ncolors = get_integer_resource ("colors", "Colors"); + if (ncolors < 2) ncolors = 2; + if (ncolors <= 2) mono_p = True; + + if (mono_p) + colors = 0; + else + colors = (XColor *) malloc(sizeof(*colors) * (ncolors+1)); + + if (mono_p || blob_p) + cycle_p = False; + + if (mono_p) + ; + else if (random() % 3) + make_smooth_colormap (dpy, xgwa.visual, cmap, colors, &ncolors, + True, &cycle_p, True); + else + make_uniform_colormap (dpy, xgwa.visual, cmap, colors, &ncolors, + True, &cycle_p, True); + + if (ncolors < 2) ncolors = 2; + if (ncolors <= 2) mono_p = True; + + if (mono_p) cycle_p = False; + + fg_index = 0; + + if (!mono_p && !blob_p) + { + gcv.foreground = colors[fg_index].pixel; + XSetWindowBackground (dpy, window, gcv.foreground); + } + + if (first_time) + { + XClearWindow (dpy, window); + first_time = False; + } + + gcv.fill_rule = EvenOddRule; + gc = XCreateGC (dpy, window, GCForeground | GCFillRule, &gcv); + + return make_window_starfish (dpy, window); +} + + + +static void +run_starfish (Display *dpy, Window window, struct starfish *s) +{ + throb_starfish (s); + spin_starfish (s); + draw_starfish (dpy, window, gc, s, False); + + if (mono_p) + { + static Bool init = False; + static unsigned long black, white; + if (!init) + { + black = get_pixel_resource ("background", "Background", dpy, cmap); + white = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + init = True; + fg_index = white; + XSetForeground (dpy, gc, fg_index); + } + else if (!s->blob_p) + { + fg_index = (fg_index == black ? white : black); + XSetForeground (dpy, gc, fg_index); + } + } + else + { + fg_index = (fg_index + 1) % ncolors; + XSetForeground (dpy, gc, colors [fg_index].pixel); + } +} + + + + +char *progclass = "Starfish"; + +char *defaults [] = { + "Starfish.background: black", /* to placate SGI */ + "Starfish.foreground: white", + "*delay: 10000", + "*cycleDelay: 100000", + "*thickness: 0", /* pixels, 0 = random */ + "*rotation: -1", /* degrees, -1 = "random" */ + "*colors: 200", + "*cycle: true", + "*duration: 30", + "*delay2: 5", + "*blob: false", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { "-delay2", ".delay2", XrmoptionSepArg, 0 }, + { "-cycle-delay", ".cycleDelay", XrmoptionSepArg, 0 }, + { "-thickness", ".thickness", XrmoptionSepArg, 0 }, + { "-rotation", ".rotation", XrmoptionSepArg, 0 }, + { "-colors", ".colors", XrmoptionSepArg, 0 }, + { "-cycle", ".cycle", XrmoptionNoArg, "True" }, + { "-no-cycle", ".cycle", XrmoptionNoArg, "False" }, + { "-duration", ".duration", XrmoptionSepArg, 0 }, + { "-blob", ".blob", XrmoptionNoArg, "True" }, + { "-no-blob", ".blob", XrmoptionNoArg, "False" }, + { 0, 0, 0, 0 } +}; + +void +screenhack (Display *dpy, Window window) +{ + struct starfish *s = init_starfish (dpy, window); + int delay = get_integer_resource ("delay", "Delay"); + int delay2 = get_integer_resource ("delay2", "Delay") * 1000000; + int cycle_delay = get_integer_resource ("cycleDelay", "Delay"); + int duration = get_seconds_resource ("duration", "Seconds"); + Bool blob_p = get_boolean_resource ("blob", "Blob"); + time_t start = time ((time_t) 0); + time_t now; + int direction = (random() % 1) ? 1 : -1; + + if (blob_p) + delay *= 3; + + while (1) + { + run_starfish (dpy, window, s); + XSync (dpy, True); + + if (cycle_p && cycle_delay) + { + if (cycle_delay <= delay) + { + int i = 0; + while (i < delay) + { + rotate_colors (dpy, cmap, colors, ncolors, direction); + usleep(cycle_delay); + i += cycle_delay; + } + } + else + { + static long tick = 0; + if (tick >= cycle_delay) + { + rotate_colors (dpy, cmap, colors, ncolors, direction); + tick = 0; + } + if (delay) + usleep(delay); + tick += delay; + } + + if (! (random() % 1000)) + direction = -direction; + } + else if (delay) + usleep (delay); + + if (duration > 0) + { + now = time ((time_t) 0); + if (start + duration < now) + { + start = now; + + free_starfish (s); + + if (delay2 && !blob_p) + { + int i = 0; + while (i < delay2) + { + rotate_colors (dpy, cmap, colors, ncolors, direction); + usleep(cycle_delay); + i += cycle_delay; + } + } + + /* Every now and then, pick new colors; otherwise, just build + a new starfish with the current colors. */ + if (! (random () % 10)) + s = init_starfish (dpy, window); + else + s = make_window_starfish(dpy, window); + } + } + } +} diff --git a/hacks/starfish.man b/hacks/starfish.man new file mode 100644 index 00000000..461349fe --- /dev/null +++ b/hacks/starfish.man @@ -0,0 +1,89 @@ +.TH XScreenSaver 1 "14-Jun-97" "X Version 11" +.SH NAME +starfish - radially-symmetric throbbing colormap-hacking graphics demo +.SH SYNOPSIS +.B starfish +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP] [\-delay2 \fIsecs\fP] [\-cycle\-delay2 \fIusecs\fP] [\-thickness \fIpixels\fP] [\-rotation \fIdegrees\fP] [\-duration \fIseconds\fP] [\-colors \fIint\fP] [\-cycle] [\-no\-cycle] [\-blob] [\-no\-blob] +.SH DESCRIPTION +The \fIstarfish\fP program draws radially symmetric objects, which expand, +contract, rotate, and turn inside out. It uses these shapes to lay down a +field of smooth colors, and then rotates the colormap. +.SH OPTIONS +.I starfish +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 \-delay \fImicroseconds\fP +How much of a delay should be introduced between steps of the animation. +Default 10000, or about 1/100th second. +.TP 8 +.B \-cycle\-delay \fImicroseconds\fP +How long to wait between shifing the colormap by one step. +Default 100000, or about 1/10th second. +.TP 8 +.B \-thickness \fIpixels\fP +How wide each color band should be. Default 0, meaning random (the chosen +value will be between 0 and 15.) +.TP 8 +.B \-rotation \fIdegrees\fP +How quickly the objects should rotate at each step. Default 0, meaning +random (the chosen value will be between 0 and 12 degrees.) +.TP 8 +.B \-colors \fIint\fP +How many colors to use. Default 200. The more colors, the smoother the +transitions will be, and the nicer the resultant images. +.TP 8 +.B \-cycle +.TP 8 +.B \-no\-cycle +Whether to do colormap cycling. Default true. +.TP 8 +.B \-duration \fIseconds\fP +How long to run before choosing a new shape. Default 30 seconds. +.TP 8 +.B \-delay2 \fIseconds\fP +When \fIduration\fP expires, how long to wait before starting a new run. +Default 5 seconds. +.TP 8 +.B \-blob +.TP 8 +.B \-no\-blob +If \fIblob\fP option is specified, then the raw shapes will be shown, +instead of a field of colors generated from them. +.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 , 14-Jun-97. diff --git a/hacks/strange.c b/hacks/strange.c new file mode 100644 index 00000000..71cd89cd --- /dev/null +++ b/hacks/strange.c @@ -0,0 +1,404 @@ +/* -*- Mode: C; tab-width: 4 -*- + * strange --- Strange attractors are not so hard to find... + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)strange.c 4.02 97/04/01 xlockmore"; +#endif + +/* Copyright (c) 1997 by Massimino Pascal (Pascal.Massimon@ens.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: jwz@netscape.com: turned into a standalone program. + * Made it render into an offscreen bitmap and then copy + * that onto the screen, to reduce flicker. + */ + +#ifdef STANDALONE +# define PROGCLASS "Strange" +# define HACK_INIT init_strange +# define HACK_DRAW draw_strange +# define strange_opts xlockmore_opts +# define DEFAULTS "*delay: 2000 \n" \ + "*ncolors: 100 \n" +# define SMOOTH_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt strange_opts = { + 0, NULL, 0, NULL, NULL }; + +/*****************************************************/ +/*****************************************************/ + +typedef float DBL; +typedef int PRM; + +#define UNIT (1<<12) +#define UNIT2 (1<<14) +/* #define UNIT2 (3140*UNIT/1000) */ + +#define SKIP_FIRST 100 +#define MAX_POINTS 5500 +#define DBL_To_PRM(x) (PRM)( (DBL)(UNIT)*(x) ) + + +#define DO_FOLD(a) (a)<0 ? -Fold[ (-(a))&(UNIT2-1) ] : Fold[ (a)&(UNIT2-1) ] + +/* + #define DO_FOLD(a) (a)<-UNIT2 ? -Fold[(-(a))%UNIT2] : (a)<0 ? -Fold[ -(a) ] + + : \ (a)>UNIT2 ? Fold[ (a)%UNIT2 ] : Fold[ (a) ] */ +/* #define DO_FOLD(a) DBL_To_PRM( sin( (DBL)(a)/UNIT ) ) */ +/* + #define DO_FOLD(a) (a)<0 ? DBL_To_PRM( exp( 16.0*(a)/UNIT2 ) )-1.0 : \ + DBL_To_PRM( 1.0-exp( -16.0*(a)/UNIT2 ) ) */ + +/******************************************************************/ + +#define MAX_PRM 3*5 + +typedef struct { + DBL Prm1[MAX_PRM], Prm2[MAX_PRM]; + void (*Iterate) (PRM, PRM, PRM *, PRM *); + XPoint *Buffer1, *Buffer2; + int Cur_Pt, Max_Pt; + int Col, Count, Speed; + int Width, Height; + Pixmap dbuf; /* jwz */ + GC dbuf_gc; +} ATTRACTOR; + +static ATTRACTOR *Root; +static PRM xmin, xmax, ymin, ymax; +static PRM Prm[MAX_PRM]; +static PRM *Fold = NULL; + +/******************************************************************/ +/******************************************************************/ + +static DBL Amp_Prm[MAX_PRM] = +{ + 1.0, 3.5, 3.5, 2.5, 4.7, + 1.0, 3.5, 3.6, 2.5, 4.7, + 1.0, 1.5, 2.2, 2.1, 3.5 +}; +static DBL Mid_Prm[MAX_PRM] = +{ + 0.0, 1.5, 0.0, .5, 1.5, + 0.0, 1.5, 0.0, .5, 1.5, + 0.0, 1.5, -1.0, -.5, 2.5, +}; + +static DBL +Gauss_Rand(DBL c, DBL A, DBL S) +{ + DBL y; + + y = (DBL) LRAND() / MAXRAND; + y = A * (1.0 - exp(-y * y * S)) / (1.0 - exp(-S)); + if (NRAND(2)) + return (c + y); + else + return (c - y); +} + +static void +Random_Prm(DBL * Prm) +{ + int i; + + for (i = 0; i < MAX_PRM; ++i) + Prm[i] = Gauss_Rand(Mid_Prm[i], Amp_Prm[i], 4.0); +} + +/***************************************************************/ + + /* 2 examples of non-linear map */ + +static void +Iterate_X2(PRM x, PRM y, PRM * xo, PRM * yo) +{ + PRM xx, yy, xy, x2y, y2x, Tmp; + + xx = (x * x) / UNIT; + x2y = (xx * y) / UNIT; + yy = (y * y) / UNIT; + y2x = (yy * x) / UNIT; + xy = (x * y) / UNIT; + + Tmp = Prm[1] * xx + Prm[2] * xy + Prm[3] * yy + Prm[4] * x2y; + Tmp = Prm[0] - y + (Tmp / UNIT); + *xo = DO_FOLD(Tmp); + Tmp = Prm[6] * xx + Prm[7] * xy + Prm[8] * yy + Prm[9] * y2x; + Tmp = Prm[5] + x + (Tmp / UNIT); + *yo = DO_FOLD(Tmp); +} + +static void +Iterate_X3(PRM x, PRM y, PRM * xo, PRM * yo) +{ + PRM xx, yy, xy, x2y, y2x, Tmp_x, Tmp_y, Tmp_z; + + xx = (x * x) / UNIT; + x2y = (xx * y) / UNIT; + yy = (y * y) / UNIT; + y2x = (yy * x) / UNIT; + xy = (x * y) / UNIT; + + Tmp_x = Prm[1] * xx + Prm[2] * xy + Prm[3] * yy + Prm[4] * x2y; + Tmp_x = Prm[0] - y + (Tmp_x / UNIT); + Tmp_x = DO_FOLD(Tmp_x); + + Tmp_y = Prm[6] * xx + Prm[7] * xy + Prm[8] * yy + Prm[9] * y2x; + Tmp_y = Prm[5] + x + (Tmp_y / UNIT); + + Tmp_y = DO_FOLD(Tmp_y); + + Tmp_z = Prm[11] * xx + Prm[12] * xy + Prm[13] * yy + Prm[14] * y2x; + Tmp_z = Prm[10] + x + (Tmp_z / UNIT); + Tmp_z = UNIT + Tmp_z * Tmp_z / UNIT; + + *xo = (Tmp_x * UNIT) / Tmp_z; + *yo = (Tmp_y * UNIT) / Tmp_z; +} + +static void (*Funcs[2]) (PRM, PRM, PRM *, PRM *) = { + Iterate_X2, Iterate_X3 +}; + +/***************************************************************/ + +void +draw_strange(ModeInfo * mi) +{ + int i, j, n, Max_Colors, Cur_Pt; + PRM x, y, xo, yo; + DBL u; + ATTRACTOR *A; + XPoint *Buf; + Display *display; + GC gc; + Window window; + DBL Lx, Ly; + void (*Iterate) (PRM, PRM, PRM *, PRM *); + + display = MI_DISPLAY(mi); + window = MI_WINDOW(mi); + gc = MI_GC(mi); + Max_Colors = MI_NPIXELS(mi); + + A = &Root[MI_SCREEN(mi)]; + + Cur_Pt = A->Cur_Pt; + Iterate = A->Iterate; + + u = (DBL) (A->Count) / 1000.0; + for (j = MAX_PRM - 1; j >= 0; --j) + Prm[j] = DBL_To_PRM((1.0 - u) * A->Prm1[j] + u * A->Prm2[j]); + + x = y = DBL_To_PRM(.0); + for (n = SKIP_FIRST; n; --n) { + (*Iterate) (x, y, &xo, &yo); + x = xo + NRAND(8) - 4; + y = yo + NRAND(8) - 4; + } + + xmax = 0; + xmin = UNIT * 4; + ymax = 0; + ymin = UNIT * 4; + A->Cur_Pt = 0; + Buf = A->Buffer2; + Lx = (DBL) A->Width / UNIT / 2.2; + Ly = (DBL) A->Height / UNIT / 2.2; + for (n = A->Max_Pt; n; --n) { + (*Iterate) (x, y, &xo, &yo); + Buf->x = (short) (Lx * (x + DBL_To_PRM(1.1))); + Buf->y = (short) (Ly * (DBL_To_PRM(1.1) - y)); + /* (void) fprintf( stderr, "X,Y: %d %d ", Buf->x, Buf->y ); */ + Buf++; + A->Cur_Pt++; + if (xo > xmax) + xmax = xo; + else if (xo < xmin) + xmin = xo; + if (yo > ymax) + ymax = yo; + else if (yo < ymin) + ymin = yo; + x = xo + NRAND(8) - 4; + y = yo + NRAND(8) - 4; + } + + XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi)); + + if (A->dbuf) /* jwz */ + { + XSetForeground(display, A->dbuf_gc, 0); +/* XDrawPoints(display, A->dbuf, A->dbuf_gc, A->Buffer1, + Cur_Pt,CoordModeOrigin);*/ + XFillRectangle(display, A->dbuf, A->dbuf_gc, 0,0, A->Width, A->Height); + } + else + XDrawPoints(display, window, gc, A->Buffer1, Cur_Pt, CoordModeOrigin); + + if (Max_Colors < 2) + XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_PIXEL(mi, A->Col % Max_Colors)); + + if (A->dbuf) + { + XSetForeground(display, A->dbuf_gc, 1); + XDrawPoints(display, A->dbuf, A->dbuf_gc, A->Buffer2, A->Cur_Pt, + CoordModeOrigin); + } + else + XDrawPoints(display, window, gc, A->Buffer2, A->Cur_Pt, CoordModeOrigin); + + if (A->dbuf) + XCopyPlane(display, A->dbuf, window, gc, 0,0,A->Width,A->Height,0,0, 1); + + Buf = A->Buffer1; + A->Buffer1 = A->Buffer2; + A->Buffer2 = Buf; + + if ((xmax - xmin < DBL_To_PRM(.2)) && (ymax - ymin < DBL_To_PRM(.2))) + A->Count += 4 * A->Speed; + else + A->Count += A->Speed; + if (A->Count >= 1000) { + for (i = MAX_PRM - 1; i >= 0; --i) + A->Prm1[i] = A->Prm2[i]; + Random_Prm(A->Prm2); + A->Count = 0; + } + A->Col++; +} + + +/***************************************************************/ + +void +init_strange(ModeInfo * mi) +{ + ATTRACTOR *Attractor; + + if (Root == NULL) { + Root = (ATTRACTOR *) calloc( + MI_NUM_SCREENS(mi), sizeof (ATTRACTOR)); + if (Root == NULL) + return; + } + if (Fold == NULL) { + int i; + + Fold = (PRM *) calloc(UNIT2 + 1, sizeof (PRM)); + if (Fold == NULL) + return; + for (i = 0; i <= UNIT2; ++i) { + DBL x; + + /* x = ( DBL )(i)/UNIT2; */ + /* x = sin( M_PI/2.0*x ); */ + /* x = sqrt( x ); */ + /* x = x*x; */ + /* x = x*(1.0-x)*4.0; */ + x = (DBL) (i) / UNIT; + x = sin(x); + Fold[i] = DBL_To_PRM(x); + } + } + Attractor = &Root[MI_SCREEN(mi)]; + + Attractor->Buffer1 = (XPoint *) calloc(MAX_POINTS, sizeof (XPoint)); + if (Attractor->Buffer1 == NULL) + goto Abort; + Attractor->Buffer2 = (XPoint *) calloc(MAX_POINTS, sizeof (XPoint)); + if (Attractor->Buffer2 == NULL) + goto Abort; + Attractor->Max_Pt = MAX_POINTS; + + Attractor->Width = MI_WIN_WIDTH(mi); + Attractor->Height = MI_WIN_HEIGHT(mi); + Attractor->Cur_Pt = 0; + Attractor->Count = 0; + Attractor->Col = NRAND(MI_NPIXELS(mi)); + Attractor->Speed = 4; + + Attractor->Iterate = Funcs[NRAND(2)]; + Random_Prm(Attractor->Prm1); + Random_Prm(Attractor->Prm2); + + Attractor->dbuf = XCreatePixmap(MI_DISPLAY(mi), MI_WINDOW(mi), + Attractor->Width, Attractor->Height, 1); + if (Attractor->dbuf) + { + XGCValues gcv; + gcv.foreground = 0; + gcv.background = 0; + gcv.function = GXcopy; + Attractor->dbuf_gc = XCreateGC(MI_DISPLAY(mi), Attractor->dbuf, + GCForeground|GCBackground|GCFunction, + &gcv); + XFillRectangle(MI_DISPLAY(mi), Attractor->dbuf, + Attractor->dbuf_gc, 0,0, Attractor->Width, + Attractor->Height); + XSetBackground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi)); + XSetFunction(MI_DISPLAY(mi), MI_GC(mi), GXcopy); + } + + XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); + return; + + Abort: + if (Attractor->Buffer1 != NULL) + free(Attractor->Buffer1); + if (Attractor->Buffer2 != NULL) + free(Attractor->Buffer2); + Attractor->Buffer1 = NULL; + Attractor->Buffer2 = NULL; + Attractor->Cur_Pt = 0; + return; +} + +/***************************************************************/ + +void +release_strange(ModeInfo * mi) +{ + int i; + + if (Root == NULL) + return; + + for (i = 0; i < MI_NUM_SCREENS(mi); ++i) { + if (Root[i].Buffer1 != NULL) + free(Root[i].Buffer1); + if (Root[i].Buffer2 != NULL) + free(Root[i].Buffer2); + if (Root[i].dbuf) + XFreePixmap(MI_DISPLAY(mi), Root[i].dbuf); + if (Root[i].dbuf_gc) + XFreeGC(MI_DISPLAY(mi), Root[i].dbuf_gc); + } + free(Root); + Root = NULL; + if (Fold != NULL) + free(Fold); + Fold = NULL; +} diff --git a/hacks/strange.man b/hacks/strange.man new file mode 100644 index 00000000..ff278d39 --- /dev/null +++ b/hacks/strange.man @@ -0,0 +1,58 @@ +.TH XScreenSaver 1 "10-May-97" "X Version 11" +.SH NAME +strange - draws strange attractors +.SH SYNOPSIS +.B strange +[\-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 \fIstrange\fP program draws strange attractors +.SH OPTIONS +.I strange +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 64. +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 Massimino Pascal. + +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 +Massimino Pascal , 1997. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 10-May-97. diff --git a/hacks/swirl.c b/hacks/swirl.c new file mode 100644 index 00000000..7f3764f0 --- /dev/null +++ b/hacks/swirl.c @@ -0,0 +1,1475 @@ +/* -*- Mode: C; tab-width: 4 -*- + * swirl --- swirly color-cycling patterns. + */ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)swirl.c 4.00 97/01/01 xlockmore"; +#endif + +/* Copyright (c) 1994 M.Dobie + * + * 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. + * + * 13-May-97: jwz@netscape.com: turned into a standalone program. + * 21-Apr-95: improved startup time for TrueColour displays + * (limited to 16bpp to save memory) S.Early + * 09-Jan-95: fixed colour maps (more colourful) and the image now spirals + * outwards from the centre with a fixed number of points drawn + * every iteration. Thanks to M.Dobie . + * 1994: written. Copyright (c) 1994 M.Dobie + * based on original code by R.Taylor + */ + +#ifdef STANDALONE +# define PROGCLASS "Swirl" +# define HACK_INIT init_swirl +# define HACK_DRAW draw_swirl +# define swirl_opts xlockmore_opts +# define DEFAULTS "*count: 5 \n" \ + "*delay: 10000 \n" \ + "*ncolors: 200 \n" +# define SMOOTH_COLORS +# define WRITABLE_COLORS +# include "xlockmore.h" /* from the xscreensaver distribution */ +# include +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +ModeSpecOpt swirl_opts = { + 0, NULL, 0, NULL, NULL }; + +#include + +/****************************************************************/ + +#define MASS 4 /* maximum mass of a knot */ +#define MIN_RES 5 /* minimim resolution (>= MIN_RES) */ +#define MAX_RES 1 /* maximum resolution (>0) */ +#define TWO_PLANE_PCNT 30 /* probability for two plane mode (0-100) */ +#define RESTART 2500 /* number of cycles before restart */ +#define BATCH_DRAW 100 /* points to draw per iteration */ + +/* knot types */ +typedef enum { + NONE = 0, + ORBIT = (1 << 0), + WHEEL = (1 << 1), + PICASSO = (1 << 2), + RAY = (1 << 3), + HOOK = (1 << 4), + ALL = (1 << 5) +} KNOT_T; + +/* a knot */ +typedef struct Knot { + int x, y; /* position */ + int m; /* mass */ + KNOT_T t; /* type in the first (or only) plane */ + KNOT_T T; /* type in second plane if there is one */ + int M; /* mass in second plane if there is one */ +} KNOT , *KNOT_P; + +/* a colour specification */ +typedef struct Colour { + unsigned short r, g, b; +} COLOUR , *COLOUR_P; + +/* drawing direction */ +typedef enum { + DRAW_RIGHT, DRAW_DOWN, DRAW_LEFT, DRAW_UP +} DIR_T; + +/****************************************************************/ + +/* data associated with a swirl window */ +typedef struct swirl_data { + /* window paramaters */ + Window win; /* the window */ + int width, height; /* window size */ + int depth; /* depth */ + int rdepth; /* real depth (for XImage) */ + Visual *visual; /* visual */ + + /* swirl drawing parameters */ + int n_knots; /* number of knots */ + KNOT_P knots; /* knot details */ + KNOT_T knot_type; /* general type of knots */ + int resolution; /* drawing resolution, 1..5 */ + int max_resolution; /* maximum resolution, MAX_RES */ + int r; /* pixel step */ + Bool two_plane; /* two plane mode? */ + Bool first_plane; /* doing first plane? */ + int start_again; /* when to restart */ + + /* spiral drawing parameters */ + int x, y; /* current point */ + DIR_T direction; /* current direction */ + int dir_todo, dir_done; /* how many points in current direction? */ + int batch_todo, batch_done; /* how many points in this batch */ + Bool started, drawing; /* are we drawing? */ + + /* image stuff */ + unsigned char *image; /* image data */ + XImage *ximage; + + /* colours stuff */ + int colours; /* how many colours possible */ + int dcolours; /* how many colours for shading */ +#ifndef STANDALONE + Bool fixed_colourmap; /* fixed colourmap? */ +#endif /* !STANDALONE */ + Bool monochrome; /* monochrome? */ + Colormap cmap; /* colour map for the window */ + XColor *rgb_values; /* colour definitions array */ +#ifndef STANDALONE + int current_map; /* current colour map, 0..dcolours-1 */ + unsigned long fg, bg, white, black; /* black and white pixel values */ + int shift; /* colourmap shift */ + int dshift; /* colourmap shift while drawing */ + XColor fgcol, bgcol; /* foreground and background colour specs */ +#endif /* !STANDALONE */ + Bool off_screen; +} SWIRL , *SWIRL_P; + +#define SWIRLCOLOURS 13 + +#ifndef STANDALONE +/* basic colours */ +static COLOUR basic_colours[SWIRLCOLOURS]; +#endif /* !STANDALONE */ + +/* an array of swirls for each screen */ +static SWIRL_P swirls = NULL; + +/* + random_no + + Return a random integer between 0 and n inclusive + + - n is the maximum number + + Returns a random integer */ + +static int +random_no(unsigned int n) +{ + return ((int) ((n + 1) * (double) LRAND() / MAXRAND)); +} + +/****************************************************************/ + +/* + initialise_swirl + + Initialise all the swirl data + + - swirl is the swirl data */ + +static void +initialise_swirl(ModeInfo * mi, SWIRL_P swirl) +{ +#ifndef STANDALONE + Display *display = MI_DISPLAY(mi); +#endif /* !STANDALONE */ + + swirl->width = 0; /* width and height of window */ + swirl->height = 0; + swirl->depth = 1; + swirl->rdepth = 1; + swirl->visual = NULL; + swirl->resolution = MIN_RES + 1; /* current resolution */ + swirl->max_resolution = MAX_RES; /* maximum resolution */ + swirl->n_knots = 0; /* number of knots */ + swirl->knot_type = ALL; /* general type of knots */ + swirl->two_plane = False; /* two plane mode? */ + swirl->first_plane = False; /* doing first plane? */ + swirl->start_again = -1; /* restart counter */ + + /* drawing parameters */ + swirl->x = 0; + swirl->y = 0; + swirl->started = False; + swirl->drawing = False; + + /* image stuff */ + swirl->image = NULL; /* image data */ + swirl->ximage = NULL; + + /* colours stuff */ + swirl->colours = 0; /* how many colours possible */ + swirl->dcolours = 0; /* how many colours for shading */ + swirl->cmap = (Colormap) NULL; + swirl->rgb_values = NULL; /* colour definitions array */ +#ifndef STANDALONE + swirl->current_map = 0; /* current colour map, 0..dcolours-1 */ + + /* set up fg fb colour specs */ + swirl->white = MI_WIN_WHITE_PIXEL(mi); + swirl->black = MI_WIN_BLACK_PIXEL(mi); +#endif /* !STANDALONE */ + + +#ifdef STANDALONE +# define MI_COLORMAP MI_WIN_COLORMAP +#else /* !STANDALONE */ + swirl->fg = MI_FG_COLOR(mi); + swirl->bg = MI_BG_COLOR(mi); + swirl->fgcol.pixel = swirl->fg; + swirl->bgcol.pixel = swirl->bg; + XQueryColor(display, MI_COLORMAP(mi), &(swirl->fgcol)); + XQueryColor(display, MI_COLORMAP(mi), &(swirl->bgcol)); +#endif /* !STANDALONE */ +} + +/****************************************************************/ + +/* + * initialise_image + * + * Initialise the image for drawing to + * + * - swirl is the swirl data + */ +static void +initialise_image(Display * dpy, SWIRL_P swirl) +{ + unsigned int pad; + int bytes_per_line; + int image_depth = swirl->rdepth; + int data_depth = image_depth; + + /* On SGIs at least, using an XImage of depth 24 on a Visual of depth 24 + requires the XImage data to use 32 bits per pixel. I don't understand + how one is supposed to determine this -- maybe XListPixmapFormats? + But on systems that don't work this way, allocating 32 bpp instead of + 24 will be wasteful but non-fatal. -- jwz, 16-May-97. */ + if (data_depth >= 24 && data_depth < 32) + data_depth = 32; + + /* get the bitmap pad */ + pad = BitmapPad(dpy); + /* destroy the old image (destroy XImage and data) */ + if (swirl->ximage != NULL) + XDestroyImage(swirl->ximage); + + /* how many bytes per line? (bits rounded up to pad) */ + bytes_per_line = ((swirl->width * data_depth + pad - 1) / pad) * (pad / 8); + + /* allocate space for the image */ + swirl->image = (unsigned char *) calloc(bytes_per_line * swirl->height, 1); + + /* create an ximage with this */ + swirl->ximage = XCreateImage(dpy, swirl->visual, image_depth, ZPixmap, + 0, (char *) swirl->image, swirl->width, + swirl->height, pad, bytes_per_line); +} + +/****************************************************************/ + +#ifndef STANDALONE +/* + * initialise_colours + * + * Initialise the list of colours from which the colourmaps are derived + * + * - colours is the array to initialise + * - saturation is the saturation value to use 0->grey, + * 1.0->full saturation + */ +static void +initialise_colours(COLOUR * colours, float saturate) +{ + int i; + + /* start off fully saturated, medium and bright colours */ + colours[0].r = 0xA000; + colours[0].g = 0x0000; + colours[0].b = 0x0000; + colours[1].r = 0xD000; + colours[1].g = 0x0000; + colours[1].b = 0x0000; + colours[2].r = 0x0000; + colours[2].g = 0x6000; + colours[2].b = 0x0000; + colours[3].r = 0x0000; + colours[3].g = 0x9000; + colours[3].b = 0x0000; + colours[4].r = 0x0000; + colours[4].g = 0x0000; + colours[4].b = 0xC000; + colours[5].r = 0x0000; + colours[5].g = 0x0000; + colours[5].b = 0xF000; + colours[6].r = 0xA000; + colours[6].g = 0x6000; + colours[6].b = 0x0000; + colours[7].r = 0xD000; + colours[7].g = 0x9000; + colours[7].b = 0x0000; + colours[8].r = 0xA000; + colours[8].g = 0x0000; + colours[8].b = 0xC000; + colours[9].r = 0xD000; + colours[9].g = 0x0000; + colours[9].b = 0xF000; + colours[10].r = 0x0000; + colours[10].g = 0x6000; + colours[10].b = 0xC000; + colours[11].r = 0x0000; + colours[11].g = 0x9000; + colours[11].b = 0xF000; + colours[12].r = 0xA000; + colours[12].g = 0xA000; + colours[12].b = 0xA000; + + /* add white for low saturation */ + for (i = 0; i < SWIRLCOLOURS - 1; i++) { + unsigned short max_rg, max; + + /* what is the max intensity for this colour? */ + max_rg = (colours[i].r > colours[i].g) ? colours[i].r : colours[i].g; + max = (max_rg > colours[i].b) ? max_rg : colours[i].b; + + /* bring elements up to max as saturation approaches 0.0 */ + colours[i].r += (unsigned short) ((float) (1.0 - saturate) * + ((float) max - colours[i].r)); + colours[i].g += (unsigned short) ((float) (1.0 - saturate) * + ((float) max - colours[i].g)); + colours[i].b += (unsigned short) ((float) (1.0 - saturate) * + ((float) max - colours[i].b)); + } +} +#endif /* !STANDALONE */ + +/****************************************************************/ + +#ifndef STANDALONE +/* + * set_black_and_white + * + * Set the entries for foreground & background pixels and + * WhitePixel & BlackPixel in an array of colour specifications. + * + * - swirl is the swirl data + * - values is the array of specifications + */ +static void +set_black_and_white(SWIRL_P swirl, XColor * values) +{ + unsigned long white, black; + + /* where is black and white? */ + white = swirl->white; + black = swirl->black; + + /* set black and white up */ + values[white].flags = DoRed | DoGreen | DoBlue; + values[white].pixel = white; + values[white].red = 0xFFFF; + values[white].green = 0xFFFF; + values[white].blue = 0xFFFF; + values[black].flags = DoRed | DoGreen | DoBlue; + values[black].pixel = black; + values[black].red = 0; + values[black].green = 0; + values[black].blue = 0; + + /* copy the colour specs from the original entries */ + values[swirl->fg] = swirl->fgcol; + values[swirl->bg] = swirl->bgcol; +} + +/****************************************************************/ + +/* + * set_colour + * + * Set an entry in an array of XColor specifications. The given entry will be + * set to the given colour. If the entry corresponds to the foreground, + * background, WhitePixel, or BlackPixel it is ignored and the given colour + * is is put in the next entry. + * + * Therefore, the given colour may be placed up to four places after the + * specified entry in the array, if foreground, background, white, or black + * intervene. + * + * - swirl is the swirl data + * - value points to a pointer to the array entry. It gets updated to + * point to the next free entry. + * - pixel points to the current pixel number. It gets updated. + * - c points to the colour to add + */ +static void +set_colour(SWIRL_P swirl, XColor ** value, unsigned long *pixel, COLOUR_P c) +{ + Bool done; + unsigned long fg, bg, white, black; + + /* where are foreground, background, white, and black? */ + fg = swirl->fg; + bg = swirl->bg; + white = swirl->white; + black = swirl->black; + + /* haven't set it yet */ + done = False; + + /* try and set the colour */ + while (!done) { + (**value).flags = DoRed | DoGreen | DoBlue; + (**value).pixel = *pixel; + + /* white, black, fg, bg, or a colour? */ + if ((*pixel != fg) && (*pixel != bg) && + (*pixel != white) && (*pixel != black)) { + (**value).red = c->r; + (**value).green = c->g; + (**value).blue = c->b; + + /* now we've done it */ + done = True; + } + /* next pixel */ + (*value)++; + (*pixel)++; + } +} + +/****************************************************************/ + +/* + * get_colour + * + * Get an entry from an array of XColor specifications. The next colour from + * the array will be returned. Foreground, background, WhitePixel, or + * BlackPixel will be ignored. + * + * - swirl is the swirl data + * - value points the array entry. It is updated to point to the entry + * following the one returned. + * - c is set to the colour found + */ +static void +get_colour(SWIRL_P swirl, XColor ** value, COLOUR_P c) +{ + Bool done; + unsigned long fg, bg, white, black; + + /* where is white and black? */ + fg = swirl->fg; + bg = swirl->bg; + white = swirl->white; + black = swirl->black; + + /* haven't set it yet */ + done = False; + + /* try and set the colour */ + while (!done) { + /* black, white or a colour? */ + if (((*value)->pixel != fg) && ((*value)->pixel != bg) && + ((*value)->pixel != white) && ((*value)->pixel != black)) { + c->r = (*value)->red; + c->g = (*value)->green; + c->b = (*value)->blue; + + /* now we've done it */ + done = True; + } + /* next value */ + (*value)++; + } +} +#endif /* !STANDALONE */ + +/****************************************************************/ + +#ifndef STANDALONE +/* + * interpolate + * + * Generate n colours between c1 and c2. n XColors at *value are set up with + * ascending pixel values. + * + * If the pixel range includes BlackPixel or WhitePixel they are set to black + * and white respectively but otherwise ignored. Therefore, up to n+2 colours + * may actually be set by this function. + * + * - swirl is the swirl data + * - values points a pointer to an array of XColors to update + * - pixel points to the pixel number to start at + * - k n is the number of colours to generate + * - c1, c2 are the colours to interpolate between + */ +static void +interpolate(SWIRL_P swirl, XColor ** values, unsigned long *pixel, int n, COLOUR_P c1, COLOUR_P c2) +{ + int i, r, g, b; + COLOUR c; + unsigned short maxv; + + /* maximum value */ + maxv = (255 << 8); + + for (i = 0; i < n / 2 && (int) *pixel < swirl->colours; i++) { + /* work out the colour */ + r = c1->r + 2 * i * ((int) c2->r) / n; + c.r = (r > (int) maxv) ? maxv : r; + g = c1->g + 2 * i * ((int) c2->g) / n; + c.g = (g > (int) maxv) ? maxv : g; + b = c1->b + 2 * i * ((int) c2->b) / n; + c.b = (b > (int) maxv) ? maxv : b; + + /* set it up */ + set_colour(swirl, values, pixel, &c); + } + for (i = n / 2; i >= 0 && (int) *pixel < swirl->colours; i--) { + r = c2->r + 2 * i * ((int) c1->r) / n; + c.r = (r > (int) maxv) ? maxv : r; + g = c2->g + 2 * i * ((int) c1->g) / n; + c.g = (g > (int) maxv) ? maxv : g; + b = c2->b + 2 * i * ((int) c1->b) / n; + c.b = (b > (int) maxv) ? maxv : b; + + /* set it up */ + set_colour(swirl, values, pixel, &c); + } +} + +/****************************************************************/ + +/* + * basic_map + * + * Generate a `random' closed loop colourmap that occupies the whole colour + * map. + * + * - swirl is the swirl data + * - values is the array of colour definitions to set up + */ +static void +basic_map(SWIRL_P swirl, XColor * values) +{ + COLOUR c[3]; + int i; + unsigned short r1, g1, b1, r2, g2, b2, r3, g3, b3; + int L1, L2, L3, L; + unsigned long pixel; + XColor *value; + + /* start at the beginning of the colour map */ + pixel = 0; + value = values; + + /* choose 3 different basic colours at random */ + for (i = 0; i < 3;) { + int j; + Bool same; + + /* choose colour i */ + c[i] = basic_colours[random_no(SWIRLCOLOURS - 1)]; + + /* assume different */ + same = False; + + /* different from the rest? */ + for (j = 0; j < i; j++) + if ((c[i].r == c[j].r) && + (c[i].g == c[j].g) && + (c[i].b == c[j].b)) + same = True; + + /* ready for the next colour? */ + if (!same) + i++; + } + + /* extract components into variables */ + r1 = c[0].r; + g1 = c[0].g; + b1 = c[0].b; + r2 = c[1].r; + g2 = c[1].g; + b2 = c[1].b; + r3 = c[2].r; + g3 = c[2].g; + b3 = c[2].b; + + /* work out the lengths of each side of the triangle */ + L1 = (int) sqrt((((double) r1 - r2) * ((double) r1 - r2) + + ((double) g1 - g2) * ((double) g1 - g2) + + ((double) b1 - b2) * ((double) b1 - b2))); + + L2 = (int) sqrt((((double) r3 - r2) * ((double) r3 - r2) + + ((double) g3 - g2) * ((double) g3 - g2) + + ((double) b3 - b2) * ((double) b3 - b2))); + + L3 = (int) sqrt((((double) r1 - r3) * ((double) r1 - r3) + + ((double) g1 - g3) * ((double) g1 - g3) + + ((double) b1 - b3) * ((double) b1 - b3))); + + L = L1 + L2 + L3; + + /* allocate colours in proportion to the lengths of the sides */ + interpolate(swirl, &value, &pixel, + (int) ((double) swirl->dcolours * ((double) L1 / (double) L)) + 1, c, c + 1); + interpolate(swirl, &value, &pixel, + (int) ((double) swirl->dcolours * ((double) L2 / (double) L)) + 1, c + 1, c + 2); + interpolate(swirl, &value, &pixel, + (int) ((double) swirl->dcolours * ((double) L3 / (double) L)) + 1, c + 2, c); + + /* fill up any remaining slots (due to rounding) */ + while ((int) pixel < swirl->colours) { + /* repeat the last colour */ + set_colour(swirl, &value, &pixel, c); + } + + /* ensure black and white are correct */ + if (!swirl->fixed_colourmap) + set_black_and_white(swirl, values); +} + +/****************************************************************/ + +/* + * pre_rotate + * + * Generate pre-rotated versions of the colour specifications + * + * - swirl is the swirl data + * - values is an array of colour specifications + */ +static void +pre_rotate(SWIRL_P swirl, XColor * values) +{ + int i, j; + XColor *src, *dest; + int dcolours; + unsigned long pixel; + + /* how many colours to display? */ + dcolours = swirl->dcolours; + + /* start at the first map */ + src = values; + dest = values + swirl->colours; + + /* generate dcolours-1 rotated maps */ + for (i = 0; i < dcolours - 1; i++) { + COLOUR first; + + /* start at the first pixel */ + pixel = 0; + + /* remember the first one and skip it */ + get_colour(swirl, &src, &first); + + /* put a rotated version of src at dest */ + for (j = 0; j < dcolours - 1; j++) { + COLOUR c; + + /* get the source colour */ + get_colour(swirl, &src, &c); + + /* set the colour */ + set_colour(swirl, &dest, &pixel, &c); + } + + /* put the first one at the end */ + set_colour(swirl, &dest, &pixel, &first); + + /* NB: src and dest should now be ready for the next table */ + + /* ensure black and white are properly set */ + set_black_and_white(swirl, src); + } +} + +/****************************************************************/ + +/* + * create_colourmap + * + * Create a read/write colourmap to use + * + * - swirl is the swirl data + */ + +static void +create_colourmap(ModeInfo * mi, SWIRL_P swirl) +{ + Display *display = MI_DISPLAY(mi); + int preserve; + int n_rotations; + int i; + Bool truecolor; + unsigned long redmask, greenmask, bluemask; + + swirl->fixed_colourmap = !setupColormap(mi, &(swirl->colours), + &truecolor, &redmask, &greenmask, &bluemask); + preserve = preserveColors(swirl->fg, swirl->bg, swirl->white, swirl->black); + + /* how many colours should we animate? */ + swirl->dcolours = (swirl->colours > preserve + 1) ? + swirl->colours - preserve : swirl->colours; + + if (MI_NPIXELS(mi) < 2) + return; + + /* how fast to shift the colourmap? */ + swirl->shift = (swirl->colours > 64) ? swirl->colours / 64 : 1; + swirl->dshift = (swirl->shift > 1) ? swirl->shift * 2 : 1; + + /* how may colour map rotations are there? */ + n_rotations = (swirl->fixed_colourmap) ? 1 : swirl->dcolours; + + /* allocate space for colour definitions (if not already there) */ + if (swirl->rgb_values == NULL) { + swirl->rgb_values = (XColor *) calloc((swirl->colours + 3) * n_rotations, + sizeof (XColor)); + + /* create a colour map */ + if (!swirl->fixed_colourmap) + swirl->cmap = + XCreateColormap(display, swirl->win, swirl->visual, AllocAll); + } + /* select a set of colours for the colour map */ + basic_map(swirl, swirl->rgb_values); + + /* are we rotating them? */ + if (!swirl->fixed_colourmap) { + /* generate rotations of the colour maps */ + pre_rotate(swirl, swirl->rgb_values); + + /* store the colours in the colour map */ + XStoreColors(display, swirl->cmap, swirl->rgb_values, swirl->colours); + } else { + if (truecolor) { + int rsh, gsh, bsh; + unsigned long int t; + + t = redmask; + for (i = 0; (int) t > 0; i++, t >>= 1); + rsh = 16 - i; + t = greenmask; + for (i = 0; (int) t > 0; i++, t >>= 1); + gsh = 16 - i; + t = bluemask; + for (i = 0; (int) t > 0; i++, t >>= 1); + bsh = 16 - i; + for (i = 0; i < swirl->colours; i++) + swirl->rgb_values[i].pixel = + ((rsh > 0 ? (swirl->rgb_values[i].red) >> rsh : + (swirl->rgb_values[i].red) << (-rsh)) & redmask) | + ((gsh > 0 ? (swirl->rgb_values[i].green) >> gsh : + (swirl->rgb_values[i].green) << (-gsh)) & greenmask) | + ((bsh > 0 ? (swirl->rgb_values[i].blue) >> bsh : + (swirl->rgb_values[i].blue) << (-bsh)) & bluemask); + } else { + /* lookup the colours in the fixed colour map */ + for (i = 0; i < swirl->colours; i++) + (void) XAllocColor(display, MI_COLORMAP(mi), + &(swirl->rgb_values[i])); + } + } +} + +/****************************************************************/ + +/* + * install_map + * + * Install a new set of colours into the colour map + * + * - dpy is the display + * - swirl is the swirl data + * - shift is the amount to rotate the colour map by + */ +static void +install_map(Display * dpy, SWIRL_P swirl, int shift) +{ + if (!swirl->fixed_colourmap) { + /* shift the colour map */ + swirl->current_map = (swirl->current_map + shift) % + swirl->dcolours; + + /* store it */ + XStoreColors(dpy, swirl->cmap, + swirl->rgb_values + + swirl->current_map * swirl->colours, + swirl->colours); + } +} +#endif /* !STANDALONE */ + +/****************************************************************/ + +/* + * create_knots + * + * Initialise the array of knot + * + * swirl is the swirl data + */ +static void +create_knots(SWIRL_P swirl) +{ + int k; + Bool orbit, wheel, picasso, ray, hook; + KNOT_P knot; + + /* create array for knots */ + if (swirl->knots) + (void) free((void *) swirl->knots); + swirl->knots = (KNOT_P) calloc(swirl->n_knots, sizeof (KNOT)); + + /* no knots yet */ + orbit = wheel = picasso = ray = hook = False; + + /* what types do we have? */ + if ((int) swirl->knot_type & (int) ALL) { + orbit = wheel = ray = hook = True; + } else { + if ((int) swirl->knot_type & (int) ORBIT) + orbit = True; + if ((int) swirl->knot_type & (int) WHEEL) + wheel = True; + if ((int) swirl->knot_type & (int) PICASSO) + picasso = True; + if ((int) swirl->knot_type & (int) RAY) + ray = True; + if ((int) swirl->knot_type & (int) HOOK) + hook = True; + } + + /* initialise each knot */ + knot = swirl->knots; + for (k = 0; k < swirl->n_knots; k++) { + /* position */ + knot->x = random_no((unsigned int) swirl->width); + knot->y = random_no((unsigned int) swirl->height); + + /* mass */ + knot->m = random_no(MASS) + 1; + + /* can be negative */ + if (random_no(100) > 50) + knot->m *= -1; + + /* type */ + knot->t = NONE; + while (knot->t == NONE) { + /* choose a random one from the types available */ + switch (random_no(4)) { + case 0: + if (orbit) + knot->t = ORBIT; + break; + case 1: + if (wheel) + knot->t = WHEEL; + break; + case 2: + if (picasso) + knot->t = PICASSO; + break; + case 3: + if (ray) + knot->t = RAY; + break; + case 4: + if (hook) + knot->t = HOOK; + break; + } + } + + /* if two planes, do same for second plane */ + if (swirl->two_plane) { + knot->T = NONE; + while (knot->T == NONE || knot->T == knot->t) { + /* choose a different type */ + switch (random_no(4)) { + case 0: + if (orbit) + knot->T = ORBIT; + break; + case 1: + if (wheel) + knot->T = WHEEL; + break; + case 2: + if (picasso) + knot->T = PICASSO; + break; + case 3: + if (ray) + knot->T = RAY; + break; + case 4: + if (hook) + knot->T = HOOK; + break; + } + } + } + /* next knot */ + knot++; + } +} + +/****************************************************************/ + +/* + * do_point + * + * Work out the pixel value at i, j. Ensure it does not clash with BlackPixel + * or WhitePixel. + * + * - swirl is the swirl data + * - i, j is the point to calculate + * + * Returns the value of the point + */ +static unsigned long +do_point(SWIRL_P swirl, int i, int j) +{ + int tT, k, value, add; + double dx, dy, theta, dist; + int dcolours, qcolours; + double rads; + KNOT_P knot; + + /* how many colours? */ + dcolours = swirl->dcolours; + qcolours = dcolours / 4; + + /* colour step round a circle */ + rads = (double) dcolours / (2.0 * M_PI); + + /* start at zero */ + value = 0; + + /* go through all the knots */ + knot = swirl->knots; + for (k = 0; k < swirl->n_knots; k++) { + dx = i - knot->x; + dy = j - knot->y; + + /* in two_plane mode get the appropriate knot type */ + if (swirl->two_plane) + tT = (int) ((swirl->first_plane) ? knot->t : knot->T); + else + tT = (int) knot->t; + + /* distance from knot */ + dist = sqrt(dx * dx + dy * dy); + + /* nothing to add at first */ + add = 0; + + /* work out the contribution (if close enough) */ + if (dist > 0.1) + switch (tT) { + case ORBIT: + add = (int) (dcolours / (1.0 + 0.01 * abs(knot->m) * dist)); + break; + case WHEEL: + /* Avoid atan2: DOMAIN error message */ + if (dy == 0.0 && dx == 0.0) + theta = 1.0; + else + theta = (atan2(dy, dx) + M_PI) / M_PI; + if (theta < 1.0) + add = (int) (dcolours * theta + + sin(0.1 * knot->m * dist) * + qcolours * exp(-0.01 * dist)); + else + add = (int) (dcolours * (theta - 1.0) + + sin(0.1 * knot->m * dist) * + qcolours * exp(-0.01 * dist)); + break; + case PICASSO: + add = (int) (dcolours * + fabs(cos(0.002 * knot->m * dist))); + break; + case RAY: + /* Avoid atan2: DOMAIN error message */ + if (dy == 0.0 && dx == 0.0) + add = 0; + else + add = (int) (dcolours * fabs(sin(2.0 * atan2(dy, dx)))); + + break; + case HOOK: + /* Avoid atan2: DOMAIN error message */ + if (dy == 0.0 && dx == 0.0) + add = (int) (0.05 * (abs(knot->m) - 1) * dist); + else + add = (int) (rads * atan2(dy, dx) + + 0.05 * (abs(knot->m) - 1) * dist); + break; + } + /* for a +ve mass add on the contribution else take it off */ + if (knot->m > 0) + value += add; + else + value -= add; + + /* next knot */ + knot++; + } + + /* toggle plane */ + swirl->first_plane = (!swirl->first_plane); + + /* make sure we handle -ve values properly */ + if (value >= 0) + value = (value % dcolours) + 2; + else + value = dcolours - (abs(value) % (dcolours - 1)); + +#ifndef STANDALONE + /* if fg and bg are 1 and 0 we should be OK, but just in case */ + while ((dcolours > 2) && + (((value % swirl->colours) == (int) swirl->fg) || + ((value % swirl->colours) == (int) swirl->bg) || + ((value % swirl->colours) == (int) swirl->white) || + ((value % swirl->colours) == (int) swirl->black))) { + value++; + } +#endif /* !STANDALONE */ + + /* definitely make sure it is in range */ + value = value % swirl->colours; + + /* lookup the pixel value if necessary */ +#ifndef STANDALONE + if (swirl->fixed_colourmap && swirl->dcolours > 2) +#endif + value = swirl->rgb_values[value].pixel; + + /* return it */ + return ((unsigned long) value); +} + +/****************************************************************/ + +/* + * draw_block + * + * Draw a square block of points with the same value. + * + * - ximage is the XImage to draw on. + * - x, y is the top left corner + * - s is the length of each side + * - v is the value + */ +static void +draw_block(XImage * ximage, int x, int y, int s, unsigned long v) +{ + int a, b; + + for (a = 0; a < s; a++) + for (b = 0; b < s; b++) { + XPutPixel(ximage, x + b, y + a, v); + } +} + +/****************************************************************/ + +/* + * draw_point Draw the current point in a swirl pattern onto the XImage + * + * - swirl is the swirl + * - win is the window to update + */ +static void +draw_point(ModeInfo * mi, SWIRL_P swirl) +{ + int r; + int x, y; + + /* get current point coordinates and resolution */ + x = swirl->x; + y = swirl->y; + r = swirl->r; + + /* check we are within the window */ + if ((x < 0) || (x > swirl->width - r) || (y < 0) || (y > swirl->height - r)) + return; + + /* what style are we drawing? */ + if (swirl->two_plane) { + int r2; + + /* halve the block size */ + r2 = r / 2; + + /* interleave blocks at half r */ + draw_block(swirl->ximage, x, y, r2, do_point(swirl, x, y)); + draw_block(swirl->ximage, x + r2, y, r2, do_point(swirl, x + r2, y)); + draw_block(swirl->ximage, x + r2, y + r2, r2, do_point(swirl, + x + r2, y + r2)); + draw_block(swirl->ximage, x, y + r2, r2, do_point(swirl, x, y + r2)); + } else + draw_block(swirl->ximage, x, y, r, do_point(swirl, x, y)); + + /* update the screen */ +/* PURIFY 4.0.1 on SunOS4 and on Solaris 2 reports a 256 byte memory leak on * + the next line. */ + XPutImage(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), swirl->ximage, + x, y, x, y, r, r); +} + +/****************************************************************/ + +/* + * next_point Move to the next point in the spiral pattern + * - swirl is the swirl + * - win is the window to update + */ +static void +next_point(SWIRL_P swirl) +{ + /* more to do in this direction? */ + if (swirl->dir_done < swirl->dir_todo) { + /* move in the current direction */ + switch (swirl->direction) { + case DRAW_RIGHT: + swirl->x += swirl->r; + break; + case DRAW_DOWN: + swirl->y += swirl->r; + break; + case DRAW_LEFT: + swirl->x -= swirl->r; + break; + case DRAW_UP: + swirl->y -= swirl->r; + break; + } + + /* done another point */ + swirl->dir_done++; + } else { + /* none drawn yet */ + swirl->dir_done = 0; + + /* change direction - check and record if off screen */ + switch (swirl->direction) { + case DRAW_RIGHT: + swirl->direction = DRAW_DOWN; + if (swirl->x > swirl->width - swirl->r) { + /* skip these points */ + swirl->dir_done = swirl->dir_todo; + swirl->y += (swirl->dir_todo * swirl->r); + + /* check for finish */ + if (swirl->off_screen) + swirl->drawing = False; + swirl->off_screen = True; + } else + swirl->off_screen = False; + break; + case DRAW_DOWN: + swirl->direction = DRAW_LEFT; + swirl->dir_todo++; + if (swirl->y > swirl->height - swirl->r) { + /* skip these points */ + swirl->dir_done = swirl->dir_todo; + swirl->x -= (swirl->dir_todo * swirl->r); + + /* check for finish */ + if (swirl->off_screen) + swirl->drawing = False; + swirl->off_screen = True; + } else + swirl->off_screen = False; + break; + case DRAW_LEFT: + swirl->direction = DRAW_UP; + if (swirl->x < 0) { + /* skip these points */ + swirl->dir_done = swirl->dir_todo; + swirl->y -= (swirl->dir_todo * swirl->r); + + /* check for finish */ + if (swirl->off_screen) + swirl->drawing = False; + swirl->off_screen = True; + } else + swirl->off_screen = False; + break; + case DRAW_UP: + swirl->direction = DRAW_RIGHT; + swirl->dir_todo++; + if (swirl->y < 0) { + /* skip these points */ + swirl->dir_done = swirl->dir_todo; + swirl->x += (swirl->dir_todo * swirl->r); + + /* check for finish */ + if (swirl->off_screen) + swirl->drawing = False; + swirl->off_screen = True; + } else + swirl->off_screen = False; + break; + } + } +} + +/****************************************************************/ + +/* + * init_swirl + * + * Initialise things for swirling + * + * - win is the window to draw in + */ +void +init_swirl(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + SWIRL_P swirl; + + /* does the swirls array exist? */ + if (swirls == NULL) { + int i; + + /* allocate an array, one entry for each screen */ + swirls = (SWIRL_P) calloc(ScreenCount(display), sizeof (SWIRL)); + + /* initialise them all */ + for (i = 0; i < ScreenCount(display); i++) + initialise_swirl(mi, &swirls[i]); + } + /* get a pointer to this swirl */ + swirl = &(swirls[MI_SCREEN(mi)]); + + /* get window parameters */ + swirl->win = window; + swirl->width = MI_WIN_WIDTH(mi); + swirl->height = MI_WIN_HEIGHT(mi); + swirl->depth = MI_WIN_DEPTH(mi); + swirl->rdepth = swirl->depth; + swirl->visual = MI_VISUAL(mi); + + if (swirl->depth > 16) + swirl->depth = 16; + + /* initialise image for speeding up drawing */ + initialise_image(display, swirl); + + /* clear the window (before setting the colourmap) */ + XClearWindow(display, MI_WINDOW(mi)); + +#ifdef STANDALONE + + swirl->rgb_values = mi->colors; + swirl->colours = mi->npixels; + swirl->dcolours = swirl->colours; +/* swirl->fixed_colourmap = !mi->writable_p;*/ + +#else /* !STANDALONE */ + + /* initialise the colours from which the colourmap is derived */ + initialise_colours(basic_colours, MI_SATURATION(mi)); + + /* set up the colour map */ + create_colourmap(mi, swirl); + + /* attach the colour map to the window (if we have one) */ + if (!swirl->fixed_colourmap) { +#if 1 + setColormap(display, window, swirl->cmap, MI_WIN_IS_INWINDOW(mi)); +#else + XSetWindowColormap(display, window, swirl->cmap); + (void) XSetWMColormapWindows(display, window, &window, 1); + XInstallColormap(display, swirl->cmap); +#endif + } +#endif /* STANDALONE */ + + /* resolution starts off chunky */ + swirl->resolution = MIN_RES + 1; + + /* calculate the pixel step for this resulution */ + swirl->r = (1 << (swirl->resolution - 1)); + + /* how many knots? */ + swirl->n_knots = random_no((unsigned int) MI_BATCHCOUNT(mi) / 2) + + MI_BATCHCOUNT(mi) + 1; + + /* what type of knots? */ + swirl->knot_type = ALL; /* for now */ + + /* use two_plane mode occaisionally */ + if (random_no(100) <= TWO_PLANE_PCNT) { + swirl->two_plane = swirl->first_plane = True; + swirl->max_resolution = 2; + } else + swirl->two_plane = False; + + /* fix the knot values */ + create_knots(swirl); + + /* we are off */ + swirl->started = True; + swirl->drawing = False; +} + +/****************************************************************/ + +/* + * draw_swirl + * + * Draw one iteration of swirling + * + * - win is the window to draw in + */ +void +draw_swirl(ModeInfo * mi) +{ + SWIRL_P swirl = &(swirls[MI_SCREEN(mi)]); + + /* are we going? */ + if (swirl->started) { + /* in the middle of drawing? */ + if (swirl->drawing) { +#ifdef STANDALONE + if (mi->writable_p) + rotate_colors(MI_DISPLAY(mi), MI_COLORMAP(mi), + swirl->rgb_values, swirl->colours, 1); +#else /* !STANDALONE */ + /* rotate the colours */ + install_map(MI_DISPLAY(mi), swirl, swirl->dshift); +#endif /* !STANDALONE */ + + /* draw a batch of points */ + swirl->batch_todo = BATCH_DRAW; + while ((swirl->batch_todo > 0) && swirl->drawing) { + /* draw a point */ + draw_point(mi, swirl); + + /* move to the next point */ + next_point(swirl); + + /* done a point */ + swirl->batch_todo--; + } + } else { +#ifdef STANDALONE + if (mi->writable_p) + rotate_colors(MI_DISPLAY(mi), MI_COLORMAP(mi), + swirl->rgb_values, swirl->colours, 1); +#else /* !STANDALONE */ + /* rotate the colours */ + install_map(MI_DISPLAY(mi), swirl, swirl->shift); +#endif /* !STANDALONE */ + + /* time for a higher resolution? */ + if (swirl->resolution > swirl->max_resolution) { + /* move to higher resolution */ + swirl->resolution--; + + /* calculate the pixel step for this resulution */ + swirl->r = (1 << (swirl->resolution - 1)); + + /* start drawing again */ + swirl->drawing = True; + + /* start in the middle of the screen */ + swirl->x = (swirl->width - swirl->r) / 2; + swirl->y = (swirl->height - swirl->r) / 2; + + /* initialise spiral drawing parameters */ + swirl->direction = DRAW_RIGHT; + swirl->dir_todo = 1; + swirl->dir_done = 0; + } else { + /* all done, decide when to restart */ + if (swirl->start_again == -1) { + /* start the counter */ + swirl->start_again = RESTART; + } else if (swirl->start_again == 0) { + /* reset the counter */ + swirl->start_again = -1; + +#ifdef STANDALONE + /* Pick a new colormap! */ + XClearWindow (MI_DISPLAY(mi), MI_WINDOW(mi)); + free_colors (MI_DISPLAY(mi), MI_COLORMAP(mi), + mi->colors, mi->npixels); + make_smooth_colormap (MI_DISPLAY(mi), + MI_VISUAL(mi), + MI_COLORMAP(mi), + mi->colors, &mi->npixels, True, + &mi->writable_p, True); + swirl->colours = mi->npixels; +#endif /* STANDALONE */ + + /* start again */ + init_swirl(mi); + } else + /* decrement the counter */ + swirl->start_again--; + } + } + } +} + +/****************************************************************/ + +void +release_swirl(ModeInfo * mi) +{ + /* does the swirls array exist? */ + if (swirls != NULL) { + int i; + + /* free them all */ + for (i = 0; i < MI_NUM_SCREENS(mi); i++) { + SWIRL_P swirl = &(swirls[i]); + + if (swirl->cmap != (Colormap) NULL) + XFreeColormap(MI_DISPLAY(mi), swirl->cmap); + if (swirl->rgb_values != NULL) + XFree((void *) swirl->rgb_values); + if (swirl->ximage != NULL) + XDestroyImage(swirl->ximage); + if (swirl->knots) + (void) free((void *) swirl->knots); + } + /* deallocate an array, one entry for each screen */ + (void) free((void *) swirls); + swirls = NULL; + } +} + +/****************************************************************/ + +void +refresh_swirl(ModeInfo * mi) +{ + SWIRL_P swirl = &(swirls[MI_SCREEN(mi)]); + + if (swirl->started) { + if (swirl->drawing) + swirl->resolution = swirl->resolution + 1; + swirl->drawing = False; + } +} diff --git a/hacks/swirl.man b/hacks/swirl.man new file mode 100644 index 00000000..76374613 --- /dev/null +++ b/hacks/swirl.man @@ -0,0 +1,64 @@ +.TH XScreenSaver 1 "13-May-97" "X Version 11" +.SH NAME +swirl - draws swirly color-cycling patterns +.SH SYNOPSIS +.B swirl +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] + +.SH DESCRIPTION +The \fIswirl\fP program draws swirly color-cycling patterns. +.SH OPTIONS +.I swirl +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. +.TP 8 +.B \-cycles \fIinteger\fP + +.TP 8 +.B \-count \fIinteger\fP + +.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 1994 M. Dobie. + +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 +M.Dobie , 1994. + +Ability to run standalone or with \fIxscreensaver\fP added by +Jamie Zawinski , 13-May-97. diff --git a/hacks/vms_axp.opt b/hacks/vms_axp.opt new file mode 100644 index 00000000..64461591 --- /dev/null +++ b/hacks/vms_axp.opt @@ -0,0 +1,4 @@ +[-.UTILS]UTILS.OLB_AXP/LIB +SYS$SHARE:DECW$XMULIBSHR.EXE/SHARE +SYS$SHARE:DECW$XTSHR.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/hacks/vms_axp_12.opt b/hacks/vms_axp_12.opt new file mode 100644 index 00000000..10f94267 --- /dev/null +++ b/hacks/vms_axp_12.opt @@ -0,0 +1,4 @@ +[-.UTILS]UTILS.OLB_AXP/LIB +SYS$SHARE:DECW$XMULIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/hacks/vms_decc.opt b/hacks/vms_decc.opt new file mode 100644 index 00000000..43d6858f --- /dev/null +++ b/hacks/vms_decc.opt @@ -0,0 +1,4 @@ +[-.UTILS]UTILS.OLB_DECC/LIB +SYS$SHARE:DECW$XMULIBSHR.EXE/SHARE +SYS$SHARE:DECW$XTSHR.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/hacks/vms_decc_12.opt b/hacks/vms_decc_12.opt new file mode 100644 index 00000000..dd6d2f37 --- /dev/null +++ b/hacks/vms_decc_12.opt @@ -0,0 +1,4 @@ +[-.UTILS]UTILS.OLB_DECC/LIB +SYS$SHARE:DECW$XMULIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE +SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/hacks/xlock.h b/hacks/xlock.h new file mode 100644 index 00000000..d509f563 --- /dev/null +++ b/hacks/xlock.h @@ -0,0 +1,192 @@ +/* +** Helpful definitions for porting xlock modes to xscreensaver. +** by Charles Hannum, mycroft@ai.mit.edu +** +** for xlock 2.3 and xscreensaver 1.2, 28AUG92 +** +** Modified for xlockmore 3.0 by Anthony Thyssen +** on August 1995. +** +** Tweaked by jwz to work with both ANSI and K&R compilers, 10-May-97. +** +** Note: this file no longer works as of (at least) xlockmore 4.03a10: +** see jwz's new xlockmore.h file for a similar hack that works with +** code written for that version. +** +** To use, just copy the appropriate file from xlock, add a target +** for it in the Imakefile, and do the following: +** +** 1) If you include math.h, make sure it is before xlock.h. +** 2) Make sure the first thing you do in initfoo() is to call +** XGetWindowAttributes. This is what actually sets up the +** colormap and whatnot. +** 3) Add an appropriate PROGRAM() line at the end of the .c file. +** The information you need for this comes from xlock's file +** resource.c. +** +** That's about all there is to it. +** +** As an added bonus, if you put an empty definition of PROGRAM() in +** xlock's xlock.h, you can now use the code with either xlock or +** xscreensaver. +** +** +** If you make any improvements to this code, please send them to me! +** It could certainly use some more work. +*/ + +#include "screenhack.h" + +#define MAXSCREENS 1 + +static GC gc; +static unsigned long *pixels = 0, fg_pixel, bg_pixel; +static int npixels; +static Colormap cmap; + +static int batchcount; +static unsigned int delay; +static unsigned int cycles; +static double saturation; + +#ifndef min +#define min(a,b) ((a)<(b)?(a):(b)) +#endif + +typedef struct { + GC gc; + int npixels; + u_long *pixels; +} perscreen; + +static perscreen Scr[MAXSCREENS]; +static Display *dsp; + +static int screen = 0; + +static void +#ifdef __STDC__ +My_XGetWindowAttributes (Display *dpy, Window win, XWindowAttributes *xgwa) +#else /* !__STDC__ */ +My_XGetWindowAttributes (dpy, win, xgwa) + Display *dpy; + Window win; + XWindowAttributes *xgwa; +#endif /* !__STDC__ */ +{ + XGetWindowAttributes (dpy, win, xgwa); + + if (! pixels) { + XGCValues gcv; + XColor color; + int n; + int i, shift; + + cmap = xgwa->colormap; + + i = get_integer_resource ("ncolors", "Integer"); + if (i <= 2) i = 2, mono_p = True; + shift = 360 / i; + pixels = (unsigned long *) calloc (i, sizeof (unsigned long)); + fg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + bg_pixel = get_pixel_resource ("background", "Background", dpy, cmap); + if (! mono_p) { + for (npixels = 0; npixels < i; npixels++) { + hsv_to_rgb ((360*npixels)/i, saturation, 1.0, + &color.red, &color.green, &color.blue); + if (! XAllocColor (dpy, cmap, &color)) + break; + pixels[npixels] = color.pixel; + } + } + n = get_integer_resource ("delay", "Usecs"); + if (n >= 0) delay = n; + n = get_integer_resource ("count", "Integer"); + if (n > 0) batchcount = n; + + n = get_integer_resource ("cycles", "Integer"); + if (n >= 0) cycles = n; + + gcv.foreground = fg_pixel; + gcv.background = bg_pixel; + gc = XCreateGC (dpy, win, GCForeground|GCBackground, &gcv); + + XClearWindow (dpy, win); + + Scr[screen].gc = gc; + Scr[screen].npixels = npixels; + Scr[screen].pixels = pixels; + } +} + +#define XGetWindowAttributes(a,b,c) My_XGetWindowAttributes(a,b,c) + +#undef BlackPixel +#define BlackPixel(a,b) bg_pixel +#undef WhitePixel +#define WhitePixel(a,b) fg_pixel +#define mono mono_p + +#define seconds() time((time_t*)0) + +char *defaults[] = { + "*background: black", + "*foreground: white", + "*ncolors: 64", + "*delay: -1", + "*count: -1", + "*cycles: -1", + 0 +}; + +XrmOptionDescRec options[] = { + {"-count", ".count", XrmoptionSepArg, 0}, + {"-ncolors", ".ncolors", XrmoptionSepArg, 0}, + {"-delay", ".delay", XrmoptionSepArg, 0}, + {"-cycles", ".cycles", XrmoptionSepArg, 0}, + { 0, 0, 0, 0 } +}; + +#if defined(__STDC__) || defined(__ANSI_CPP__) +# define XLOCK_INIT(Z) init##Z +# define XLOCK_DRAW(Z) draw##Z +#else /* K&R CPP */ +# define XLOCK_INIT(Z) init/**/Z +# define XLOCK_DRAW(Z) draw/**/Z +#endif /* K&R CPP */ + +#ifdef __STDC__ +# define XLOCK_SCREENHACK_PROTOTYPE() \ + screenhack(Display *dpy, Window window) +# define XLOCK_PROTOS(Z) /* */ +#else /* K&R C */ +# define XLOCK_SCREENHACK_PROTOTYPE() \ + screenhack(dpy, window) \ + Display *dpy; \ + Window window; +# define XLOCK_PROTOS(Z) \ + void init##Z(Window); \ + void draw##Z(Window); \ + +#endif /* K&R C */ + +#define PROGRAM(Y,Z,D,B,C,S) \ + char *progclass = Y; \ + XLOCK_PROTOS(Z) \ + \ + void XLOCK_SCREENHACK_PROTOTYPE() \ + { \ + batchcount = B; \ + delay = D; \ + cycles = C; \ + saturation = S; \ + dsp = dpy; \ + \ + XLOCK_INIT(Z) (window); \ + while (1) \ + { \ + XLOCK_DRAW(Z) (window); \ + XSync (dpy, True); \ + if (delay) usleep (delay); \ + } \ + } diff --git a/hacks/xlockmore.c b/hacks/xlockmore.c new file mode 100644 index 00000000..d7185de9 --- /dev/null +++ b/hacks/xlockmore.c @@ -0,0 +1,353 @@ +/* xlockmore.c --- xscreensaver compatibility layer for xlockmore modules. + * xscreensaver, Copyright (c) 1997 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. + * + * This file, along with xlockmore.h, make it possible to compile an xlockmore + * module into a standalone program, and thus use it with xscreensaver. + * By Jamie Zawinski on 10-May-97; based on the ideas + * in the older xlock.h by Charles Hannum . (I had + * to redo it, since xlockmore has diverged so far from xlock...) + */ + +#include +#include +#include +#include "screenhack.h" +#include "xlockmoreI.h" + +#define countof(x) (sizeof((x))/sizeof(*(x))) + +extern ModeSpecOpt xlockmore_opts[]; +extern const char *app_defaults; + +void +pre_merge_options (void) +{ + int i, j; + char *s; + + /* Translate the xlockmore `opts[]' argument to a form that + screenhack.c expects. + */ + for (i = 0; i < xlockmore_opts->numopts; i++) + { + XrmOptionDescRec *old = &xlockmore_opts->opts[i]; + XrmOptionDescRec *new = &options[i]; + + if (old->option[0] == '-') + new->option = old->option; + else + { + /* Convert "+foo" to "-no-foo". */ + new->option = (char *) malloc (strlen(old->option) + 5); + strcpy (new->option, "-no-"); + strcat (new->option, old->option + 1); + } + + new->specifier = strrchr (old->specifier, '.'); + if (!new->specifier) abort(); + + new->argKind = old->argKind; + new->value = old->value; + } + + /* Add extra args, if they're mentioned in the defaults... */ + { + char *args[] = { "-count", "-cycles", "-delay", "-ncolors", + "-size", "-wireframe", "-use3d" }; + for (j = 0; j < countof(args); j++) + if (strstr(app_defaults, args[j]+1)) + { + XrmOptionDescRec *new = &options[i++]; + new->option = args[j]; + new->specifier = strdup(args[j]); + new->specifier[0] = '.'; + if (!strcmp(new->option, "-wireframe")) + { + new->argKind = XrmoptionNoArg; + new->value = "True"; + new = &options[i++]; + new->option = "-no-wireframe"; + new->specifier = options[i-1].specifier; + new->argKind = XrmoptionNoArg; + new->value = "False"; + } + else if (!strcmp(new->option, "-use3d")) + { + new->option = "-3d"; + new->argKind = XrmoptionNoArg; + new->value = "True"; + new = &options[i++]; + new->option = "-no-3d"; + new->specifier = options[i-1].specifier; + new->argKind = XrmoptionNoArg; + new->value = "False"; + } + else + { + new->argKind = XrmoptionSepArg; + new->value = 0; + } + } + } + + + /* Construct the kind of `defaults' that screenhack.c expects from + the xlockmore `vars[]' argument. + */ + i = 0; + + /* Put on the PROGCLASS.background/foreground resources. */ + s = (char *) malloc(50); + strcpy (s, progclass); + strcat (s, ".background: black"); + defaults [i++] = s; + + s = (char *) malloc(50); + strcpy (s, progclass); + strcat (s, ".foreground: white"); + defaults [i++] = s; + + /* Copy the lines out of the `app_defaults' var and into this array. */ + s = strdup (app_defaults); + while (s && *s) + { + defaults [i++] = s; + s = strchr(s, '\n'); + if (s) + *s++ = 0; + } + + /* Copy the defaults out of the `xlockmore_opts->' variable. */ + for (j = 0; j < xlockmore_opts->numvarsdesc; j++) + { + const char *def = xlockmore_opts->vars[j].def; + if (!def) def = "False"; + if (def == ((char*) 1)) def = "True"; + s = (char *) malloc (strlen (xlockmore_opts->vars[j].name) + + strlen (def) + 10); + strcpy (s, "*"); + strcat (s, xlockmore_opts->vars[j].name); + strcat (s, ": "); + strcat (s, def); + defaults [i++] = s; + } + + defaults [i] = 0; +} + + +static void +xlockmore_read_resources (void) +{ + int i; + for (i = 0; i < xlockmore_opts->numvarsdesc; i++) + { + void *var = xlockmore_opts->vars[i].var; + Bool *var_b = (Bool *) var; + char **var_c = (char **) var; + int *var_i = (int *) var; + float *var_f = (float *) var; + + switch (xlockmore_opts->vars[i].type) + { + case t_String: + *var_c = get_string_resource (xlockmore_opts->vars[i].name, + xlockmore_opts->vars[i].classname); + break; + case t_Float: + *var_f = get_float_resource (xlockmore_opts->vars[i].name, + xlockmore_opts->vars[i].classname); + break; + case t_Int: + *var_i = get_integer_resource (xlockmore_opts->vars[i].name, + xlockmore_opts->vars[i].classname); + break; + case t_Bool: + *var_b = get_boolean_resource (xlockmore_opts->vars[i].name, + xlockmore_opts->vars[i].classname); + break; + default: + abort (); + } + } +} + + + +void +xlockmore_screenhack (Display *dpy, Window window, + Bool want_writable_colors, + Bool want_uniform_colors, + Bool want_smooth_colors, + Bool want_bright_colors, + void (*hack_init) (ModeInfo *), + void (*hack_draw) (ModeInfo *), + void (*hack_free) (ModeInfo *)) +{ + ModeInfo mi; + XGCValues gcv; + XColor color; + int i; + time_t start, now; + + memset(&mi, 0, sizeof(mi)); + mi.dpy = dpy; + mi.window = window; + XGetWindowAttributes (dpy, window, &mi.xgwa); + + color.flags = DoRed|DoGreen|DoBlue; + color.red = color.green = color.blue = 0; + if (!XAllocColor(dpy, mi.xgwa.colormap, &color)) + abort(); + mi.black = color.pixel; + color.red = color.green = color.blue = 0xFFFF; + if (!XAllocColor(dpy, mi.xgwa.colormap, &color)) + abort(); + mi.white = color.pixel; + + if (mono_p) + { + static unsigned long pixels[2]; + static XColor colors[2]; + MONO: + mi.npixels = 2; + mi.pixels = pixels; + mi.colors = colors; + pixels[0] = mi.black; + pixels[1] = mi.white; + colors[0].flags = DoRed|DoGreen|DoBlue; + colors[1].flags = DoRed|DoGreen|DoBlue; + colors[0].red = colors[0].green = colors[0].blue = 0; + colors[1].red = colors[1].green = colors[1].blue = 0xFFFF; + mi.writable_p = False; + } + else + { + mi.npixels = get_integer_resource ("ncolors", "Integer"); + if (mi.npixels <= 0) + mi.npixels = 64; + else if (mi.npixels > 256) + mi.npixels = 256; + + mi.colors = (XColor *) calloc (mi.npixels, sizeof (*mi.colors)); + + mi.writable_p = want_writable_colors; + + if (want_uniform_colors) + make_uniform_colormap (dpy, mi.xgwa.visual, mi.xgwa.colormap, + mi.colors, &mi.npixels, + True, &mi.writable_p, True); + else if (want_smooth_colors) + make_smooth_colormap (dpy, mi.xgwa.visual, mi.xgwa.colormap, + mi.colors, &mi.npixels, + True, &mi.writable_p, True); + else + make_random_colormap (dpy, mi.xgwa.visual, mi.xgwa.colormap, + mi.colors, &mi.npixels, + want_bright_colors, + True, &mi.writable_p, True); + + if (mi.npixels <= 2) + goto MONO; + else + { + int i; + mi.pixels = (unsigned long *) + calloc (mi.npixels, sizeof (*mi.pixels)); + for (i = 0; i < mi.npixels; i++) + mi.pixels[i] = mi.colors[i].pixel; + } + } + + gcv.foreground = mi.white; + gcv.background = mi.black; + mi.gc = XCreateGC(dpy, window, GCForeground|GCBackground, &gcv); + + mi.fullrandom = True; + + mi.pause = get_integer_resource ("delay", "Usecs"); + + mi.cycles = get_integer_resource ("cycles", "Int"); + mi.batchcount = get_integer_resource ("count", "Int"); + mi.size = get_integer_resource ("size", "Int"); + +#if 0 + decay = get_boolean_resource ("decay", "Boolean"); + if (decay) mi.fullrandom = False; + + trail = get_boolean_resource ("trail", "Boolean"); + if (trail) mi.fullrandom = False; + + grow = get_boolean_resource ("grow", "Boolean"); + if (grow) mi.fullrandom = False; + + liss = get_boolean_resource ("liss", "Boolean"); + if (liss) mi.fullrandom = False; + + ammann = get_boolean_resource ("ammann", "Boolean"); + if (ammann) mi.fullrandom = False; + + jong = get_boolean_resource ("jong", "Boolean"); + if (jong) mi.fullrandom = False; + + sine = get_boolean_resource ("sine", "Boolean"); + if (sine) mi.fullrandom = False; +#endif + + mi.threed = get_boolean_resource ("use3d", "Boolean"); + mi.threed_delta = get_float_resource ("delta3d", "Boolean"); + mi.threed_right_color = get_pixel_resource ("right3d", "Color", dpy, + mi.xgwa.colormap); + mi.threed_left_color = get_pixel_resource ("left3d", "Color", dpy, + mi.xgwa.colormap); + mi.threed_both_color = get_pixel_resource ("both3d", "Color", dpy, + mi.xgwa.colormap); + mi.threed_none_color = get_pixel_resource ("none3d", "Color", dpy, + mi.xgwa.colormap); + + mi.wireframe_p = get_boolean_resource ("wireframe", "Boolean"); + mi.root_p = (window == RootWindowOfScreen (mi.xgwa.screen)); + + + if (mi.pause < 0) + mi.pause = 0; + else if (mi.pause > 100000000) + mi.pause = 100000000; + + xlockmore_read_resources (); + + XClearWindow (dpy, window); + + i = 0; + start = time((time_t) 0); + + hack_init (&mi); + do { + hack_draw (&mi); + XSync(dpy, False); + if (mi.pause) + usleep(mi.pause); + + if (hack_free) + { + if (i++ > (mi.batchcount / 4) && + (start + 5) < (now = time((time_t) 0))) + { + i = 0; + start = now; + hack_free (&mi); + hack_init (&mi); + XSync(dpy, False); + } + } + + } while (1); +} diff --git a/hacks/xlockmore.h b/hacks/xlockmore.h new file mode 100644 index 00000000..f09248b7 --- /dev/null +++ b/hacks/xlockmore.h @@ -0,0 +1,149 @@ +/* xlockmore.h --- xscreensaver compatibility layer for xlockmore modules. + * xscreensaver, Copyright (c) 1997 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. + * + * The definitions in this file make it possible to compile an xlockmore + * module into a standalone program, and thus use it with xscreensaver. + * By Jamie Zawinski on 10-May-97; based on the ideas + * in the older xlock.h by Charles Hannum . (I had + * to redo it, since xlockmore has diverged so far from xlock...) + */ + +#if !defined(PROGCLASS) || !defined(HACK_INIT) || !defined(HACK_DRAW) +ERROR! Define PROGCLASS, HACK_INIT, and HACK_DRAW before including xlockmore.h +#endif + +#include "config.h" + +#ifndef __STDC__ +ERROR! Sorry, xlockmore.h requires ANSI C (gcc, for example.) + /* (The ansi dependency is that we use string concatenation, + and cpp-based stringification of tokens.) */ +#endif + +#include +#include +#include "xlockmoreI.h" + +#ifdef USE_GL +# include + extern GLXContext init_GL (ModeInfo *); +#endif + +/* Accessor macros for the ModeInfo structure + */ + +#define MI_DISPLAY(MI) ((MI)->dpy) +#define MI_WINDOW(MI) ((MI)->window) +#define MI_NUM_SCREENS(MI) (1) /* Only manage one screen at a time; */ +#define MI_SCREEN(MI) (0) /* this might be fragile... */ +#define MI_WIN_WHITE_PIXEL(MI) ((MI)->white) +#define MI_WIN_BLACK_PIXEL(MI) ((MI)->black) +#define MI_NPIXELS(MI) ((MI)->npixels) +#define MI_PIXEL(MI,N) ((MI)->pixels[(N)]) +#define MI_WIN_WIDTH(MI) ((MI)->xgwa.width) +#define MI_WIN_HEIGHT(MI) ((MI)->xgwa.height) +#define MI_WIN_DEPTH(MI) ((MI)->xgwa.depth) +#define MI_WIN_COLORMAP(MI) ((MI)->xgwa.colormap) +#define MI_VISUAL(MI) ((MI)->xgwa.visual) +#define MI_GC(MI) ((MI)->gc) +#define MI_PAUSE(MI) ((MI)->pause) +#define MI_WIN_IS_FULLRANDOM(MI)((MI)->fullrandom) +#define MI_WIN_IS_VERBOSE(MI) (False) +#define MI_WIN_IS_INSTALL(MI) (True) +#define MI_WIN_IS_MONO(MI) (mono_p) +#define MI_WIN_IS_INROOT(MI) ((MI)->root_p) +#define MI_WIN_IS_INWINDOW(MI) (!(MI)->root_p) +#define MI_WIN_IS_ICONIC(MI) (False) +#define MI_WIN_IS_WIREFRAME(MI) ((MI)->wireframe_p) +#define MI_WIN_IS_USE3D(MI) ((MI)->threed) +#define MI_LEFT_COLOR(MI) ((MI)->threed_left_color) +#define MI_RIGHT_COLOR(MI) ((MI)->threed_right_color) +#define MI_BOTH_COLOR(MI) ((MI)->threed_both_color) +#define MI_NONE_COLOR(MI) ((MI)->threed_none_color) +#define MI_DELTA3D(MI) ((MI)->threed_delta) +#define MI_CYCLES(MI) ((MI)->cycles) +#define MI_BATCHCOUNT(MI) ((MI)->batchcount) +#define MI_SIZE(MI) ((MI)->size) + +/* Some other utility macros. + */ +#define SINF(n) ((float)sin((double)(n))) +#define COSF(n) ((float)cos((double)(n))) +#define FABSF(n) ((float)fabs((double)(n))) + +#undef MAX +#undef MIN +#undef ABS +#define MAX(a,b)((a)>(b)?(a):(b)) +#define MIN(a,b)((a)<(b)?(a):(b)) +#define ABS(a)((a)<0 ? -(a) : (a)) + +/* Maximum possible number of colors (*not* default number of colors.) */ +#define NUMCOLORS 256 + +/* The globals that screenhack.c expects (initialized by xlockmore.c). + */ +char *defaults[100]; +XrmOptionDescRec options[100]; + +/* Prototypes for the actual drawing routines... + */ +extern void HACK_INIT(ModeInfo *); +extern void HACK_DRAW(ModeInfo *); + +#ifdef HACK_FREE + extern void HACK_FREE(ModeInfo *); +#else +# define HACK_FREE 0 +#endif + + +/* Emit code for the entrypoint used by screenhack.c, and pass control + down into xlockmore.c with the appropriate parameters. + */ + +char *progclass = PROGCLASS; + +void screenhack (Display *dpy, Window window) +{ + xlockmore_screenhack (dpy, window, + +#ifdef WRITABLE_COLORS + True, +#else + False, +#endif + +#ifdef UNIFORM_COLORS + True, +#else + False, +#endif + +#ifdef SMOOTH_COLORS + True, +#else + False, +#endif + +#ifdef BRIGHT_COLORS + True, +#else + False, +#endif + + HACK_INIT, + HACK_DRAW, + HACK_FREE); +} + + +const char *app_defaults = DEFAULTS ; diff --git a/hacks/xlockmoreI.h b/hacks/xlockmoreI.h new file mode 100644 index 00000000..20df0352 --- /dev/null +++ b/hacks/xlockmoreI.h @@ -0,0 +1,91 @@ +/* xlockmore.h --- xscreensaver compatibility layer for xlockmore modules. + * xscreensaver, Copyright (c) 1997 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. + * + * See xlockmore.h and xlockmore.c. + */ + +#ifndef __XLOCKMORE_INTERNAL_H__ +#define __XLOCKMORE_INTERNAL_H__ + +#include "screenhack.h" + +/* Compatibility with the xlockmore RNG API + (note that the xlockmore hacks never expect negative numbers.) + */ +#define LRAND() ((long) (random() & 0x7fffffff)) +#define NRAND(n) ((int) (LRAND() % (n))) +#define MAXRAND (2147483648.0) /* unsigned 1<<31 as a float */ +#define SRAND(n) /* already seeded by screenhack.c */ + + +typedef struct ModeInfo { + Display *dpy; + Window window; + Bool root_p; + int npixels; + unsigned long *pixels; + XColor *colors; + Bool writable_p; + unsigned long white; + unsigned long black; + XWindowAttributes xgwa; + GC gc; + long pause; + Bool fullrandom; + long cycles; + long batchcount; + long size; + Bool threed; + long threed_left_color; + long threed_right_color; + long threed_both_color; + long threed_none_color; + long threed_delta; + Bool wireframe_p; +} ModeInfo; + +typedef enum { t_String, t_Float, t_Int, t_Bool } xlockmore_type; + +typedef struct { + void *var; + char *name; + char *classname; + char *def; + xlockmore_type type; +} argtype; + +typedef struct { + char *opt; + char *desc; +} OptionStruct; + +typedef struct { + int numopts; + XrmOptionDescRec *opts; + int numvarsdesc; + argtype *vars; + OptionStruct *desc; +} ModeSpecOpt; + +extern void xlockmore_screenhack (Display *dpy, Window window, + Bool want_writable_colors, + Bool want_uniform_colors, + Bool want_smooth_colors, + Bool want_bright_colors, + void (*hack_init) (ModeInfo *), + void (*hack_draw) (ModeInfo *), + void (*hack_free) (ModeInfo *)); + +#ifdef USE_GL +extern Visual *get_gl_visual (Screen *screen, char *name, char *class); +#endif + +#endif /* __XLOCKMORE_INTERNAL_H__ */ diff --git a/hacks/xroger-hack.c b/hacks/xroger-hack.c new file mode 100644 index 00000000..32e1e4b3 --- /dev/null +++ b/hacks/xroger-hack.c @@ -0,0 +1,100 @@ +/* xscreensaver, Copyright (c) 1991-1994 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. + */ + +#include "screenhack.h" + +char *progclass = "XRoger"; + +char *defaults [] = { + "XRoger.background: black", + "XRoger.foreground: red", + "*delay: 5", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, + { 0, 0, 0, 0 } +}; + +extern void skull (Display *, Window, GC, GC, int, int, int, int); + +void +screenhack (dpy, window) + Display *dpy; + Window window; +{ + double delta = 0.005; + XGCValues gcv; + Colormap cmap; + GC draw_gc, erase_gc; + unsigned int fg; + XColor color, color2, color3; + int delay = get_integer_resource ("delay", "Integer"); + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + gcv.foreground = get_pixel_resource ("background", "Background", dpy, cmap); + erase_gc = XCreateGC (dpy, window, GCForeground, &gcv); + fg = get_pixel_resource ("foreground", "Foreground", dpy, cmap); + if (fg == gcv.foreground) + fg = ((gcv.foreground == WhitePixel (dpy, DefaultScreen (dpy))) + ? BlackPixel (dpy, DefaultScreen (dpy)) + : WhitePixel (dpy, DefaultScreen (dpy))); + gcv.foreground = fg; + draw_gc = XCreateGC (dpy, window, GCForeground, &gcv); + color.pixel = gcv.foreground; + XQueryColor (dpy, cmap, &color); + while (1) + { + int w, h, ww, hh, x, y; + time_t start_time; + XGetWindowAttributes (dpy, window, &xgwa); + w = xgwa.width; + h = xgwa.height; + + ww = 100 + random () % (w - 100); + hh = 100 + random () % (h - 100); + if (ww < 10) ww = 50; + if (hh < 10) hh = 50; + if (ww < hh) hh = ww; + else ww = hh; + x = random () % (w - ww); + y = random () % (h - hh); + XClearWindow (dpy, window); + skull (dpy, window, draw_gc, erase_gc, x, y, ww, hh); + XSync (dpy, True); + start_time = time ((time_t *) 0); + if (mono_p) + sleep (delay); + else + while (start_time + delay > time ((time_t *) 0)) + { + int H; + double S, V; + color2 = color; + rgb_to_hsv (color2.red, color2.green, color2.blue, &H, &S, &V); + V += delta; + if (V >= 1.0) V = 1.0, delta = -delta; + if (V <= 0.7) V = 0.7, delta = -delta; + hsv_to_rgb (H, S, V, &color2.red, &color2.green, &color2.blue); + color3 = color2; + if (XAllocColor (dpy, cmap, &color3)) + { + XSetForeground (dpy, draw_gc, color3.pixel); + color2.pixel = color3.pixel; + XFreeColors (dpy, cmap, &color.pixel, 1, 0); + } + color = color2; + usleep (20000); + } + } +} diff --git a/hacks/xroger.man b/hacks/xroger.man new file mode 100644 index 00000000..799f5005 --- /dev/null +++ b/hacks/xroger.man @@ -0,0 +1,52 @@ +.TH XScreenSaver 1 "22-mar-93" "X Version 11" +.SH NAME +xroger - throbbing X logo, of a sort +.SH SYNOPSIS +.B xroger +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] +.SH DESCRIPTION +The \fIxroger\fP program displays a replacement for the X logo with a more +accurate Look and Feel. +.SH OPTIONS +.I xroger +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. +.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 BUGS +It should also drip blood while making a horrible screeching noise. +.SH SEE ALSO +.BR X (1), +.BR xscreensaver (1) +.SH COPYRIGHT +Copyright \(co 1992, 1993 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 fnord 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 fnord this software for any purpose. It is provided "as +is" without express or fnord implied warranty. +.SH AUTHOR +Jamie Zawinski , 13-aug-92. diff --git a/install-sh b/install-sh new file mode 100755 index 00000000..ebc66913 --- /dev/null +++ b/install-sh @@ -0,0 +1,250 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# 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, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/lib/X11/app-defaults/XScreenSaver b/lib/X11/app-defaults/XScreenSaver deleted file mode 100644 index dd4fc63e..00000000 --- a/lib/X11/app-defaults/XScreenSaver +++ /dev/null @@ -1,353 +0,0 @@ -! app-defaults file for XScreenSaver by Jamie Zawinski. -! See "man xscreensaver" for more info. The latest version is always -! available at http://people.netscape.com/jwz/xscreensaver/ - -*timeout: 10 -*cycle: 10 -*lockTimeout: 0 -*passwdTimeout: 30 -*nice: 10 -*lock: False -*verbose: False -*fade: True -*unfade: False -*fadeSeconds: 3 -*fadeTicks: 20 - -*captureStderr: True -*captureStdout: True -*textForeground: Yellow -*textBackground: Black -*overlayStderr: True -*font: *-medium-r-*-140-*-m-* - -! Turning on "installColormap" interacts erratically with twm and tvtwm, -! but seems to work fine with mwm and olwm. Try it and see. If your -! screen turns some color other than black, the window manager is buggy, -! and you need to set this resource to False (or get a WM that works.) -! -*installColormap: True - - -! Any program which can draw on the root window will work as a screensaver. -! The following resource enumerates them. -! -! Programs are separated by newlines (specified in resource files with \n). -! Lines may be continued with a lone \ at the end of the line. -! -! Each line is an `sh' command. -! -! But, if the first word on the line is the name of a visual followed by a -! colon, then that visual will be used for the program, if it is available. -! If no such visual is available, then the program will be skipped. In -! this way, you can specify that you want certain programs to run only -! on color screens, and others only on mono screens, by making use of the -! magic visual names "color" and "mono". Likewise, if some hacks prefer -! colormaps, but others prefer 24-bit windows, that also can be arranged -! (in this case, by using "PseudoColor:" versus "TrueColor:".) -! -! All programs must be launched in such a way that they draw on the root -! window; they should not be spawned in the background with "&". If shell -! 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\ - attraction -root -mode balls \n\ - attraction -root -mode lines -points 3 -segments 200 \n\ - attraction -root -mode splines -segments 300 \n\ - attraction -root -mode lines -radius 300 \ - -orbit -vmult 0.5 \n\ - pyro -root \n\ - helix -root \n\ - pedal -root \n\ - rorschach -root -offset 7 \n\ - hopalong -root \n\ - greynetic -root \n\ - xroger -root \n\ - imsmap -root \n\ - slidescreen -root \n\ - decayscreen -root \n\ - hypercube -root \n\ - halo -root \n\ - maze -root \n\ - noseguy -root \n\ - flame -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\ - grav -root -trail -decay \n\ - drift -root \n\ - ifs -root \n\ - julia -root \n\ - penrose -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\ - goop -root \n\ - starfish -root \n\ - starfish -root -blob \n\ - munch -root \n\ - \ - mono: rocks -root \n\ - color: rocks -root -fg darksalmon \n\ - \ - mono: qix -root -linear -count 5 -size 200 -spread 30 \ - -segments 75 -solid -xor \n\ - \ - color: attraction -root -mode polygons \n\ - color: attraction -root -mode filled-splines -segments 0 \n\ - color: attraction -root -glow -points 10 \n\ - color: bubbles -root \n\ - \ - PseudoColor: qix -root -count 4 -solid -transparent \n\ - PseudoColor: qix -root -count 5 -solid -transparent -linear \ - -segments 250 -size 100 \n\ - \ - gears -root \n\ - superquadrics -root \n\ - escher -root \n\ - pipes -root \n\ - sproingies -root \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.) -! -! Some other programs that you might want to track down (these work as -! XScreenSaver helpers, but are not distributed with it): -! -! xdaliclock -root -builtin2 \n\ -! xswarm -r 2>&- \n\ -! xwave -root \n\ -! xbouncebits ... \n\ -! ico -r -faces -sleep 1 -obj ico \n\ -! xsplinefun \n\ -! kaleid -root \n\ -! color: xfishtank -c black -d -r 2 \n\ -! -! xtacy is ok, but it only works on the default visual. We can satisfy -! that constraint like so: -! -! default: xtacy -root -delay 100 -funky -number 3 \n\ -! default: xtacy -root -delay 100 -gravity \n\ -! 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: -! -! 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 -! ...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.) -! -! Some SGI GL programs work with XScreenSaver; most don't. -! -! Bongo works fine: -! -! /usr/demos/bin/bongo -wbongo -! -! 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! -! -! /usr/demos/bin/ep -! -! 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. - - - -!============================================================================= -! -! You probably don't want to change anything after this point. -! -!============================================================================= - - -! Resources for the Motif dialog boxes: -! -*fontList: *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1 -*demoDialog*label1.fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1 -*passwdDialog*fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1 -*XmList.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 -*XmTextField.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 -*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 - -*XmDialogShell*foreground: black -*XmDialogShell*background: gray90 -*XmDialogShell*XmTextField.foreground: black -*XmDialogShell*XmTextField.background: white -*XmDialogShell*demoList.foreground: black -*XmDialogShell*demoList.background: white -*XmDialogShell*rogerLabel.foreground: red3 -*XmDialogShell*rogerLabel.background: white - -*XmDialogShell.title: XScreenSaver -*allowShellResize: True -*autoUnmanage: False - -! This doesn't work. Motif ignores it if there is a scroll-list! -*demoDialog.maxWidth: 600 - -*label1.labelString: XScreenSaver %s -*label1.label: XScreenSaver %s -*label2.labelString: Copyright © 1991-1997 by Jamie Zawinski -*label2.label: Copyright © 1991-1997 by Jamie Zawinski -*demoList.visibleItemCount: 10 -*demoList.automaticSelection: True -*next.labelString: Run Next -*prev.labelString: Run Previous -*edit.labelString: Edit Parameters -*done.labelString: Exit Demo Mode -*restart.labelString: Reinitialize - -*resourcesLabel.labelString: XScreenSaver Parameters - -*timeoutLabel.labelString: Saver Timeout -*cycleLabel.labelString: Cycle Timeout -*fadeSecondsLabel.labelString: Fade Duration -*fadeTicksLabel.labelString: Fade Ticks -*lockLabel.labelString: Lock Timeout -*passwdLabel.labelString: Password Timeout -*resourcesForm*XmTextField.columns: 8 - -*verboseToggle.labelString: Verbose -*cmapToggle.labelString: Install Colormap -*fadeToggle.labelString: Fade Colormap -*unfadeToggle.labelString: Unfade Colormap -*lockToggle.labelString: Require Password -*resourcesDone.labelString: Done -*resourcesCancel.labelString: Cancel - -*passwdDialog.title: Password -*passwdLabel1.labelString: XScreenSaver %s -*passwdLabel2.labelString: This display is locked. -*passwdLabel3.labelString: Please type %s's password to unlock it. -*passwdDone.labelString: Done -*passwdCancel.labelString: Cancel - -*passwdLabel1.alignment: ALIGNMENT_BEGINNING -*passwdLabel2.alignment: ALIGNMENT_BEGINNING -*passwdLabel3.alignment: ALIGNMENT_BEGINNING -*rogerLabel.width: 150 - - -! Resources for the dialog boxes using the abominable Athena widgets: -! -*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 -*demo_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1 -*resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1 -*demo_dialog*List.font: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1 - -! This is a hack to make the typed password invisible. -! Surely someone can do better than this... -*passwd_dialog*passwd_form.value*font: *nil* - -*demo_dialog*foreground: black -*demo_dialog*background: gray90 -*demo_dialog*List.background: white -*demo_dialog*Scrollbar.background: gray85 -*demo_dialog*Command.background: gray85 - -*resources_dialog*foreground: black -*resources_dialog*background: gray90 -*resources_dialog*Command.background: gray85 -*resources_dialog*Toggle.background: gray85 -*resources_dialog*Text*background: white - -*resources_dialog*Dialog.value.translations: #override\n\ - Return: beginning-of-line()\n - -*passwd_dialog*foreground: black -*passwd_dialog*background: gray90 -*passwd_dialog*Text*background: white - -*demo_dialog*viewport.width: 400 -*demo_dialog*viewport.height: 200 -*Form.borderWidth: 0 -*Box.borderWidth: 0 -*Label.borderWidth: 0 -*resources_dialog*Dialog.borderWidth: 0 - -*demo_dialog*next.label: Run Next -*demo_dialog*prev.label: Run Previous -*demo_dialog*edit.label: Edit Parameters -*demo_dialog*done.label: Exit Demo Mode -*demo_dialog*restart.label: Reinitialize - -*resources_dialog*timeout.label: Saver Timeout: -*resources_dialog*cycle.label: Cycle Timeout: -*resources_dialog*fade.label: Fade Duration: -*resources_dialog*ticks.label: Fade Ticks: -*resources_dialog*lockTime.label: Lock Timeout: -*resources_dialog*passwdTime.label: Password Timeout: - -*resources_dialog*label1.label: XScreenSaver Parameters -*resources_dialog*buttonbox.verbose.label: Verbose -*resources_dialog*buttonbox.cmap.label: Install Colormap -*resources_dialog*buttonbox.fade.label: Fade Colormap -*resources_dialog*buttonbox.unfade.label: Unfade Colormap -*resources_dialog*buttonbox.lock.label: Require Password -*resources_dialog*done.label: Done -*resources_dialog*cancel.label: Cancel - -*passwd_dialog*label1.label: XScreenSaver %s -*passwd_dialog*label2.label: This display is locked. -*passwd_dialog*label3.label: Please type %s's password to unlock it. -*passwd_dialog*ok.label: Done -*passwd_dialog*cancel.label: Cancel -*passwd_dialog*passwd_form*label.label: Enter password: -*passwd_dialog*Dialog.label: Enter password: -*passwd_dialog*passwd_form*Text.width: 200 -*passwd_dialog*roger.width: 150 -*passwd_dialog*roger.height: 150 -*passwd_dialog*roger.foreground: red3 -*passwd_dialog*roger.background: white -*passwd_dialog*roger.borderWidth: 1 - - -! You probably won't need to change these. They are only used if no server -! extension is in use. -! -*pointerPollTime: 5 -*initialDelay: 30 -*windowCreationTimeout: 30 - -*bourneShell: /bin/sh diff --git a/local/bin/attraction b/local/bin/attraction deleted file mode 100755 index 47f6c708..00000000 Binary files a/local/bin/attraction and /dev/null differ diff --git a/local/bin/blitspin b/local/bin/blitspin deleted file mode 100755 index d023a3d9..00000000 Binary files a/local/bin/blitspin and /dev/null differ diff --git a/local/bin/bouboule b/local/bin/bouboule deleted file mode 100755 index cfcc80c4..00000000 Binary files a/local/bin/bouboule and /dev/null differ diff --git a/local/bin/braid b/local/bin/braid deleted file mode 100755 index 9a4e60c1..00000000 Binary files a/local/bin/braid and /dev/null differ diff --git a/local/bin/bubbles b/local/bin/bubbles deleted file mode 100755 index 275d8333..00000000 Binary files a/local/bin/bubbles and /dev/null differ diff --git a/local/bin/decayscreen b/local/bin/decayscreen deleted file mode 100755 index fde4af95..00000000 Binary files a/local/bin/decayscreen and /dev/null differ diff --git a/local/bin/deco b/local/bin/deco deleted file mode 100755 index 95d66ca4..00000000 Binary files a/local/bin/deco and /dev/null differ diff --git a/local/bin/drift b/local/bin/drift deleted file mode 100755 index 28d31ea5..00000000 Binary files a/local/bin/drift and /dev/null differ diff --git a/local/bin/escher b/local/bin/escher deleted file mode 100755 index 6d89917a..00000000 Binary files a/local/bin/escher and /dev/null differ diff --git a/local/bin/flag b/local/bin/flag deleted file mode 100755 index 13ac4d99..00000000 Binary files a/local/bin/flag and /dev/null differ diff --git a/local/bin/flame b/local/bin/flame deleted file mode 100755 index 94c27ec1..00000000 Binary files a/local/bin/flame and /dev/null differ diff --git a/local/bin/forest b/local/bin/forest deleted file mode 100755 index 152f905b..00000000 Binary files a/local/bin/forest and /dev/null differ diff --git a/local/bin/fract b/local/bin/fract deleted file mode 100755 index 0e59dd82..00000000 Binary files a/local/bin/fract and /dev/null differ diff --git a/local/bin/galaxy b/local/bin/galaxy deleted file mode 100755 index f909a1e2..00000000 Binary files a/local/bin/galaxy and /dev/null differ diff --git a/local/bin/gears b/local/bin/gears deleted file mode 100755 index c2f06655..00000000 Binary files a/local/bin/gears and /dev/null differ diff --git a/local/bin/goop b/local/bin/goop deleted file mode 100755 index faca68b2..00000000 Binary files a/local/bin/goop and /dev/null differ diff --git a/local/bin/grav b/local/bin/grav deleted file mode 100755 index ebb40c43..00000000 Binary files a/local/bin/grav and /dev/null differ diff --git a/local/bin/greynetic b/local/bin/greynetic deleted file mode 100755 index 8b4c6489..00000000 Binary files a/local/bin/greynetic and /dev/null differ diff --git a/local/bin/halo b/local/bin/halo deleted file mode 100755 index 7d536b3f..00000000 Binary files a/local/bin/halo and /dev/null differ diff --git a/local/bin/helix b/local/bin/helix deleted file mode 100755 index a52aeed0..00000000 Binary files a/local/bin/helix and /dev/null differ diff --git a/local/bin/hopalong b/local/bin/hopalong deleted file mode 100755 index 10628c3f..00000000 Binary files a/local/bin/hopalong and /dev/null differ diff --git a/local/bin/hypercube b/local/bin/hypercube deleted file mode 100755 index 66002838..00000000 Binary files a/local/bin/hypercube and /dev/null differ diff --git a/local/bin/ifs b/local/bin/ifs deleted file mode 100755 index daeb29c4..00000000 Binary files a/local/bin/ifs and /dev/null differ diff --git a/local/bin/imsmap b/local/bin/imsmap deleted file mode 100755 index 3c4114b6..00000000 Binary files a/local/bin/imsmap and /dev/null differ diff --git a/local/bin/julia b/local/bin/julia deleted file mode 100755 index df8b170d..00000000 Binary files a/local/bin/julia and /dev/null differ diff --git a/local/bin/kaleidescope b/local/bin/kaleidescope deleted file mode 100755 index efd3852d..00000000 Binary files a/local/bin/kaleidescope and /dev/null differ diff --git a/local/bin/laser b/local/bin/laser deleted file mode 100755 index eecbfb61..00000000 Binary files a/local/bin/laser and /dev/null differ diff --git a/local/bin/lightning b/local/bin/lightning deleted file mode 100755 index c6b3d867..00000000 Binary files a/local/bin/lightning and /dev/null differ diff --git a/local/bin/lisa b/local/bin/lisa deleted file mode 100755 index e99b4727..00000000 Binary files a/local/bin/lisa and /dev/null differ diff --git a/local/bin/lmorph b/local/bin/lmorph deleted file mode 100755 index 5e9fe390..00000000 Binary files a/local/bin/lmorph and /dev/null differ diff --git a/local/bin/maze b/local/bin/maze deleted file mode 100755 index 4bb9cb23..00000000 Binary files a/local/bin/maze and /dev/null differ diff --git a/local/bin/moire b/local/bin/moire deleted file mode 100755 index abfdb67b..00000000 Binary files a/local/bin/moire and /dev/null differ diff --git a/local/bin/munch b/local/bin/munch deleted file mode 100755 index a3b3d429..00000000 Binary files a/local/bin/munch and /dev/null differ diff --git a/local/bin/noseguy b/local/bin/noseguy deleted file mode 100755 index db86cf72..00000000 Binary files a/local/bin/noseguy and /dev/null differ diff --git a/local/bin/pedal b/local/bin/pedal deleted file mode 100755 index c3f9fee5..00000000 Binary files a/local/bin/pedal and /dev/null differ diff --git a/local/bin/penrose b/local/bin/penrose deleted file mode 100755 index 9be820ec..00000000 Binary files a/local/bin/penrose and /dev/null differ diff --git a/local/bin/pipes b/local/bin/pipes deleted file mode 100755 index ac25396c..00000000 Binary files a/local/bin/pipes and /dev/null differ diff --git a/local/bin/pyro b/local/bin/pyro deleted file mode 100755 index 001ca88f..00000000 Binary files a/local/bin/pyro and /dev/null differ diff --git a/local/bin/qix b/local/bin/qix deleted file mode 100755 index 5bf9b40d..00000000 Binary files a/local/bin/qix and /dev/null differ diff --git a/local/bin/rocks b/local/bin/rocks deleted file mode 100755 index 4f6f4b08..00000000 Binary files a/local/bin/rocks and /dev/null differ diff --git a/local/bin/rorschach b/local/bin/rorschach deleted file mode 100755 index 6449135f..00000000 Binary files a/local/bin/rorschach and /dev/null differ diff --git a/local/bin/sierpinski b/local/bin/sierpinski deleted file mode 100755 index f4fee0fb..00000000 Binary files a/local/bin/sierpinski and /dev/null differ diff --git a/local/bin/slidescreen b/local/bin/slidescreen deleted file mode 100755 index be11c6a7..00000000 Binary files a/local/bin/slidescreen and /dev/null differ diff --git a/local/bin/slip b/local/bin/slip deleted file mode 100755 index 2a8a7ec1..00000000 Binary files a/local/bin/slip and /dev/null differ diff --git a/local/bin/sphere b/local/bin/sphere deleted file mode 100755 index ff0a7b9c..00000000 Binary files a/local/bin/sphere and /dev/null differ diff --git a/local/bin/spiral b/local/bin/spiral deleted file mode 100755 index ee6f6cdf..00000000 Binary files a/local/bin/spiral and /dev/null differ diff --git a/local/bin/sproingies b/local/bin/sproingies deleted file mode 100755 index 5ccf4f31..00000000 Binary files a/local/bin/sproingies and /dev/null differ diff --git a/local/bin/starfish b/local/bin/starfish deleted file mode 100755 index a9c29b8c..00000000 Binary files a/local/bin/starfish and /dev/null differ diff --git a/local/bin/strange b/local/bin/strange deleted file mode 100755 index e3e7b0ed..00000000 Binary files a/local/bin/strange and /dev/null differ diff --git a/local/bin/superquadrics b/local/bin/superquadrics deleted file mode 100755 index bd65533a..00000000 Binary files a/local/bin/superquadrics and /dev/null differ diff --git a/local/bin/swirl b/local/bin/swirl deleted file mode 100755 index c41b832a..00000000 Binary files a/local/bin/swirl and /dev/null differ diff --git a/local/bin/xroger b/local/bin/xroger deleted file mode 100755 index c1b85b74..00000000 Binary files a/local/bin/xroger and /dev/null differ diff --git a/local/bin/xscreensaver b/local/bin/xscreensaver deleted file mode 100755 index 6accb194..00000000 Binary files a/local/bin/xscreensaver and /dev/null differ diff --git a/local/bin/xscreensaver-command b/local/bin/xscreensaver-command deleted file mode 100755 index d3b615c8..00000000 Binary files a/local/bin/xscreensaver-command and /dev/null differ diff --git a/local/man/cat.1/attraction.1 b/local/man/cat.1/attraction.1 deleted file mode 100644 index e8c41cad..00000000 --- a/local/man/cat.1/attraction.1 +++ /dev/null @@ -1,264 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - attraction - interactions of opposing forces - -SSYYNNOOPPSSIISS - aattttrraaccttiioonn [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-points _i_n_t] [-threshold _i_n_t] - [-mode balls | lines | polygons | splines | filled-splines - | tails ] [-size _i_n_t] [-segments _i_n_t] [-delay _u_s_e_c_s] - [-color-shift _i_n_t] [-radius _i_n_t] [-vx _i_n_t] [-vy _i_n_t] - [-glow] [-noglow] [-orbit] [-viscosity _f_l_o_a_t] [-mouse] - [-no-mouse] [-mouse-size] - -DDEESSCCRRIIPPTTIIOONN - The _a_t_t_r_a_c_t_i_o_n program has several visually different - modes of operation, all of which are based on the interac- - tions of a set of control points which attract each other - up to a certain distance, and then begin to repel each - other. The attraction/repulsion is proportional to the - distance between any two particles. - -OOPPTTIIOONNSS - _a_t_t_r_a_c_t_i_o_n accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ppooiinnttss iinntteeggeerr - How many control points should be used, or 0 to - select the number randomly. Default 0. Between 3 - and 15 works best. - - --tthhrreesshhoolldd iinntteeggeerr - The distance (in pixels) from each particle at - which the attractive force becomes repulsive. - Default 100. - - --mmooddee bbaallllss || lliinneess || ppoollyyggoonnss || ttaaiillss || sspplliinneess || ffiilllleedd-- - sspplliinneess - In _b_a_l_l_s mode (the default) the control points are - drawn as filled circles. The larger the circle, - - - -X Version 11 14-Jun-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - the more massive the particle. - - In _l_i_n_e_s mode, the control points are connected by - straight lines; the effect is something like _q_i_x. - - In _p_o_l_y_g_o_n_s mode, the control points are connected - by straight lines, and filled in. This is most - interesting in color. - - In _s_p_l_i_n_e_s mode, a closed spline is interpolated - from the control points. - - In _f_i_l_l_e_d_-_s_p_l_i_n_e_s mode, the splines are filled in - instead of being outlines. This is most interest- - ing in color. - - In _t_a_i_l_s mode, the path which each particle fol- - lows is indicated by a worm-like trail, whose - length is controlled by the _s_e_g_m_e_n_t_s parameter. - - --ssiizzee iinntteeggeerr - The size of the balls in pixels, or 0, meaning to - select the sizes randomly (the default.) If this - is specified, then all balls will be the same - size. This option has an effect in all modes, - since the ``size'' of the balls controls their - mass. - - --sseeggmmeennttss iinntteeggeerr - If in _l_i_n_e_s or _p_o_l_y_g_o_n_s mode, how many sets of - line segments or polygons should be drawn. Default - 100. This has no effect in _b_a_l_l_s mode. If _s_e_g_- - _m_e_n_t_s is 0, then no segments will ever be erased - (this is only useful in color.) - - --ddeellaayy mmiiccrroosseeccoonnddss - How much of a delay should be introduced between - steps of the animation. Default 10000, or about - 0.01 seconds. - - --ccoolloorr--sshhiifftt iinntt - If on a color display, the color of the line seg- - ments or polygons will cycle through the color - map. This specifies how many lines will be drawn - before a new color is chosen. (When a small num- - ber of colors are available, increasing this value - will yield smoother transitions.) Default 3. - This has no effect in _b_a_l_l_s mode. - - --rraaddiiuuss The size in pixels of the circle on which the - points are initially positioned. The default is - slightly smaller than the size of the window. - - --ggllooww This is consulted only in _b_a_l_l_s mode. If this is - - - -X Version 11 14-Jun-97 2 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - specified, then the saturation of the colors of - the points will vary according to their current - acceleration. This has the effect that the balls - flare brighter when they are reacting to each - other most strongly. - - In _g_l_o_w mode, all of the balls will be drawn the - same (random) color, modulo the saturation shifts. - In non-glow mode, the balls will each be drawn in - a random color that doesn't change. - - --nnooggllooww Don't do ``glowing.'' This is the default. - - --vvxx ppiixxeellss - - --vvyy ppiixxeellss - Initial velocity of the balls. This has no effect - in --oorrbbiitt mode. - - --oorrbbiitt Make the initial force on each ball be tangential - to the circle on which they are initially placed, - with the right velocity to hold them in orbit - about each other. After a while, roundoff errors - will cause the orbit to decay. - - --vvmmuulltt ffllooaatt - In orbit mode, the initial velocity of the balls - is multiplied by this; a number less than 1 will - make the balls pull closer together, and a larger - number will make them move apart. The default is - 0.9, meaning a slight inward pull. - - --vviissccoossiittyy ffllooaatt - This sets the viscosity of the hypothetical fluid - through which the control points move; the default - is 1, meaning no resistance. Values higher than 1 - aren't interesting; lower values cause less - motion. - - One interesting thing to try is - - attraction -viscosity 0.8 -points 75 \ - -mouse -geometry =500x500 - - Give it a few seconds to settle down into a stable - clump, and then move the mouse through it to make - "waves". - - --mmoouussee This will cause the mouse to be considered a con- - trol point; it will not be drawn, but it will - influence the other points, so you can wave the - mouse and influence the images being created. - - - - - -X Version 11 14-Jun-97 3 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --nnoo--mmoouussee - Turns off --mmoouussee. - - --mmoouussee--ssiizzee iinntteeggeerr - In --mmoouussee mode, this sets the mass of the mouse - (analagously to the --ssiizzee parameter.) - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992, 1993, 1997 by Jamie Zawinski. Permis- - sion to use, copy, modify, distribute, and sell this soft- - ware 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 pro- - vided "as is" without express or implied warranty. - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - Viscosity and mouse support by Philip Edward Cutone, III. - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 14-Jun-97 4 - - diff --git a/local/man/cat.1/blitspin.1 b/local/man/cat.1/blitspin.1 deleted file mode 100644 index 357b7402..00000000 --- a/local/man/cat.1/blitspin.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - blitspin - rotate a bitmap in an interesting way - -SSYYNNOOPPSSIISS - bblliittssppiinn [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-bitmap _f_i_l_e_n_a_m_e] [-delay - _u_s_e_c_s] [-delay2 _u_s_e_c_s] - -DDEESSCCRRIIPPTTIIOONN - The _b_l_i_t_s_p_i_n program repeatedly rotates a bitmap by 90 - degrees by using logical operations: the bitmap is divided - into quadrants, and the quadrants are shifted clockwise. - Then the same thing is done again with progressively - smaller quadrants, except that all sub-quadrants of a - given size are rotated in parallel. So this takes - OO((1166**lloogg22((NN)))) blits of size NxN, with the limitation that - the image must be square, and the size must be a power of - 2. - -OOPPTTIIOONNSS - _b_l_i_t_s_p_i_n accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --bbiittmmaapp _f_i_l_e_n_a_m_e - The file name of a bitmap to rotate. It need not - be square: it will be padded with the background - color. If unspecified or the string _(_d_e_f_a_u_l_t_), a - builtin bitmap is used. - - If support for the _X_P_M library was enabled at com- - pile-time, the specified file may be in _X_P_M format - as well as _X_B_M, and thus may be a color image. - - The **bbiittmmaappFFiilleePPaatthh resource will be searched if - the bitmap name is not a fully-qualified pathname. - - --ggrraabb--ssccrreeeenn - If this option is specified, then the image which - - - -X Version 11 16-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - is spun will be grabbed from the portion of the - screen underlying the blitspin window. - - - --ddeellaayy mmiiccrroosseeccoonnddss - How long to delay between steps of the rotation - process, in microseconds. Default is 500000, one- - half second. - - - --ddeellaayy22 mmiiccrroosseeccoonnddss - How long to delay between each 90-degree rotation, - in microseconds. Default is 500000, one-half sec- - ond. DDIISSPPLLAAYY to get the default host and display - number. - -EENNVVIIRROONNMMEENNTT - XXEENNVVIIRROONNMMEENNTT to get the name of a resource file that over- - rides the global resources stored in the RESOURCE_MANAGER - property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992, 1993, 1997 by Jamie Zawinski. Permis- - sion to use, copy, modify, distribute, and sell this soft- - ware 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 pro- - vided "as is" without express or implied warranty. - -AAUUTTHHOORR - Jamie Zawinski , 17-aug-92. - - Based on SmallTalk code which appeared in the August 1981 - issue of Byte magazine. - - - - - - - - - - - - - - - - - -X Version 11 16-May-97 2 - - diff --git a/local/man/cat.1/bouboule.1 b/local/man/cat.1/bouboule.1 deleted file mode 100644 index 29b7d396..00000000 --- a/local/man/cat.1/bouboule.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - bouboule - draws spinning 3D blobs - -SSYYNNOOPPSSIISS - bboouubboouullee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay - _m_i_c_r_o_s_e_c_o_n_d_s] [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] [-3d] - - -DDEESSCCRRIIPPTTIIOONN - The _b_o_u_b_o_u_l_e program draws spinning 3D blobs. - -OOPPTTIIOONNSS - _b_o_u_b_o_u_l_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors used cycle through the - hue, making N stops around the color wheel. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - - --33dd Do red/blue 3d separations (for 3d glasses.) - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - - - - -X Version 11 15-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1996 by Jeremie Petit. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - - -AAUUTTHHOORR - Jeremie Petit , 1996. - - 3D support by Henrik Theiling , - 04-Sep-96. - - VMS support by Jouk Jansen , - 01-Feb-96. - - TrueColor support by David Bagley , - 01-Feb-96. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 15-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 15-May-97 2 - - diff --git a/local/man/cat.1/braid.1 b/local/man/cat.1/braid.1 deleted file mode 100644 index f93504e5..00000000 --- a/local/man/cat.1/braid.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - braid - draws random color-cycling braids around a circle - -SSYYNNOOPPSSIISS - bbrraaiidd [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] - - -DDEESSCCRRIIPPTTIIOONN - The _b_r_a_i_d program draws random color-cycling braids around - a circle. - -OOPPTTIIOONNSS - _b_r_a_i_d accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors used cycle through the - hue, making N stops around the color wheel. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1995 by John Neil. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - John Neil , 29-Aug-95. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/bubbles.1 b/local/man/cat.1/bubbles.1 deleted file mode 100644 index 27e7ed82..00000000 --- a/local/man/cat.1/bubbles.1 +++ /dev/null @@ -1,198 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - bubbles - frying pan / soft drink simulation - -SSYYNNOOPPSSIISS - bbuubbbblleess [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-simple] [-broken] [-3D] [-file file- - name] [-directory directoryname] - -DDEESSCCRRIIPPTTIIOONN - _B_u_b_b_l_e_s sprays lots of little random bubbles all over the - window which then grow until they reach their maximum size - and go pop. The inspiration for this was watching little - globules of oil on the bottom of a frying pan and it also - looks a little like bubbles in fizzy soft drink. The - default mode uses fancy ray-traced bubbles but there is - also a mode which just draws circles in case the default - mode is too taxing on your hardware. - -OOPPTTIIOONNSS - Depending on how your _b_u_b_b_l_e_s was compiled, it accepts the - following options: - - --ffoorreeggrroouunndd - Colour of circles if _-_s_i_m_p_l_e mode is selected. - - --bbaacckkggrroouunndd - Colour of window background. - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy mmiiccrroosseeccoonnddss - How much of a delay should be introduced between - steps of the animation. Default 1, or about 1 - microsecond. Actually, this is the delay between - each group of 15 new bubbles since such a delay - between each step results in a very slow animation - rate. - - - - - -X Version 11 14-Dec-95 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --nnooddeellaayy - Same as _-_d_e_l_a_y _0. - - --ssiimmppllee Don't use the default fancy pixmap bubbles. Just - draw circles instead. This may give more bearable - performance if your hardware wasn't made for this - sort of thing. - - --bbrrookkeenn Don't hide bubbles when they pop. This was a bug - during development but the results were actually - quite attractive. (This option is only available - if you have the XPM library available and the - imake generated Makefile has defined HAVE_XPM). - - --33DD Normally, the simulation is done completely in two - dimensions. When a bubble swallows up another - bubble, the areas of each are added to get the - area of the resulting bubble. This option changes - the algorithm to instead add volume (imagining - each to be a sphere in 3D space). The whole thing - looks more realistic but I find it attracts atten- - tion to the flickering of each bubble as they are - move and are redrawn. Your mileage may vary. - - --ffiillee ffiilleennaammee - Use the pixmap definitions in the given file, - instead of the default (if one is compiled in). - This is ignored if _-_s_i_m_p_l_e is specified. If the - file is compressed (either with compress or gzip), - it is decompressed before use. (This option only - works if you have XPM compiled into your binary - and you have compiled with BUBBLES_IO set in bub- - bles.h. This is nnoott the default). - - --ddiirreeccttoorryy ddiirreeccttoorryynnaammee - Similar to _-_f_i_l_e except the file is taken randomly - from the contents of the specified directory. - (Again, this option is only available if you have - XPM and BUBBLES_IO was set when compiling. See - above). - - --qquuiieett Don't print messages explaining why one or several - command line options were ignored. This is dis- - abled by default. - -NNOOTTEESS - If you find the pace of things too slow, remember that - there is a delay even though you specify no _-_d_e_l_a_y option. - Try using _-_n_o_d_e_l_a_y although beware of the effects of irri- - tation of other users if you're on a shared system as you - bleed their CPU time away. - - Some tools to assist in creation of new bubbles are - included in the source distribution. These can either be - - - -X Version 11 14-Dec-95 2 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - loaded with the _-_f_i_l_e or _-_d_i_r_e_c_t_o_r_y options (if available) - or they can be used in place of the distributed default - bubble (bubble_default.c). You might like to copy these - scripts to a permanent location and use them. Read bub- - bles.README. - - Rendered bubbles are not supported on monochrome displays. - I'm not convinced that small bubbles, even dithered prop- - erly are going to look like anything more than a jumble of - random dots. - -BBUUGGSS - There is a delay before something appears on the screen - when using rendered bubbles. The XPM library seems to - take a lloonngg time to make pixmaps out of raw data. This - can be irritating on slower systems. - - The movement of the bubbles looks jerky if an incomplete - set of bubbles is used. - - The hide/display algorithm could do with some work to - avoid flickering when _-_n_o_d_e_l_a_y is set. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -DDIISSTTRRIIBBUUTTIIOONN PPOOLLIICCYY - This work is Copyright (C) 1995, 1996 by James Macnicol. - Distribution is allowed under the terms of the GNU General - Public License. Look at the sources for the legalese. - -AAUUTTHHOORR - James Macnicol . - - - - - - - - - - - - - - - - -X Version 11 14-Dec-95 3 - - diff --git a/local/man/cat.1/decayscreen.1 b/local/man/cat.1/decayscreen.1 deleted file mode 100644 index 7ee2ca25..00000000 --- a/local/man/cat.1/decayscreen.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - decayscreen - make a screen meltdown. - -SSYYNNOOPPSSIISS - ddeeccaayyssccrreeeenn [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-window] - [-root] [-mono] [-install] [-visual _v_i_s_u_a_l] [-delay _u_s_e_c_s] - -DDEESSCCRRIIPPTTIIOONN - The _d_e_c_a_y_s_c_r_e_e_n program creates a melting effect by ran- - domly shifting rectangles around the screen. - -OOPPTTIIOONNSS - _d_e_c_a_y_s_c_r_e_e_n accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - Slow it down. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - X(1), xscreensaver(1) - -CCOOPPYYRRIIGGHHTT - Copyright 1992 by Vivek Khera. Permission to use, copy, - modify, distribute, and sell this software and its docu- - mentation 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 per- - mission 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. - - - -X Version 11 05-aug-93 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -AAUUTTHHOORR - Vivek Khera , 05-Aug-93; based on code - by David Wald, 1988. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 05-aug-93 2 - - diff --git a/local/man/cat.1/deco.1 b/local/man/cat.1/deco.1 deleted file mode 100644 index 5826c175..00000000 --- a/local/man/cat.1/deco.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - deco - draw tacky 70s basement wall panelling - -SSYYNNOOPPSSIISS - ddeeccoo [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-delay _s_e_c_o_n_d_s] [-max-depth _i_n_t] - [-min-width _i_n_t] [-min-height _i_n_t] [-cycle] [-no-cycle] - [-cycle-delay] - -DDEESSCCRRIIPPTTIIOONN - The _d_e_c_o program subdivides and colors rectangles ran- - domly. It looks kind of like Brady-Bunch-era rec-room - wall paneling. (Raven says: "this screensaver is ugly - enough to peel paint.") - -OOPPTTIIOONNSS - _d_e_c_o accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy _s_e_c_o_n_d_s - How long to wait before starting over. Default 5 - seconds. - - --mmaaxx--ddeepptthh _i_n_t_e_g_e_r - How deep to subdivide. Default 12. Default 8. - - --mmiinn--wwiiddtthh _i_n_t_e_g_e_r - --mmiinn--hheeiigghhtt _i_n_t_e_g_e_r The size of the smallest rect- - angle to draw. Default 20x20. - - --ccyyccllee - - --nnoo--ccyyccllee - Whether to do color cycling. Default False. - - --ccyyccllee--ddeellaayy _u_s_e_c_s - If color cycling, how often to change the colors. - Default 1000000, or 1 second. - - - -X Version 11 27-Apr-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 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. - -AAUUTTHHOORR - Jamie Zawinski , 26-Apr-97, based on - code by Michael D. Bayne . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 27-Apr-97 2 - - diff --git a/local/man/cat.1/drift.1 b/local/man/cat.1/drift.1 deleted file mode 100644 index 940713b5..00000000 --- a/local/man/cat.1/drift.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - drift - draws drifting recursive fractal cosmic flames - -SSYYNNOOPPSSIISS - ddrriifftt [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-count _i_n_t_e_g_e_r] [-grow] [-no-grow] [-liss] [-no-liss] - - -DDEESSCCRRIIPPTTIIOONN - The _d_r_i_f_t program draws drifting recursive fractal cosmic - flames - -OOPPTTIIOONNSS - _d_r_i_f_t accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. The colors used cycle through the - hue, making N stops around the color wheel. - - --ccoouunntt _i_n_t_e_g_e_r - - - --ggrrooww - - --nnoo--ggrrooww - Whether fractals should grow; otherwise, they are - animated. - - - --lliissss - - --nnoo--lliissss - Whether we should use lissojous figures to get - points. - - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - ffllaammee(1), XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1991, 1995 by Scott Draves. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Scott Draves , 06-Jun-91, 01-Jun-95. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/flag.1 b/local/man/cat.1/flag.1 deleted file mode 100644 index 85c3eb85..00000000 --- a/local/man/cat.1/flag.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - flag - draws a waving flag, containing text or an image - -SSYYNNOOPPSSIISS - ffllaagg [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-size _i_n_t_e_g_e_r] [-text _s_t_r_i_n_g] [-font - _f_o_n_t] [-bitmap _x_b_m_-_f_i_l_e] - - -DDEESSCCRRIIPPTTIIOONN - The _f_l_a_g program draws a waving flag that contains text or - a bitmap. - -OOPPTTIIOONNSS - _f_l_a_g accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - - --ssiizzee _i_n_t_e_g_e_r - How large the pixels in the flag should be, from 1 - to 8. If this is a negative number, the pixel - size is chosen randomly from the range 1 to -size. - Default -7. - - --tteexxtt _t_e_x_t - The text to display in the flag. Multiple lines - of text are allowed; the lines will be displayed - centered atop one another. Default: none. If the - - - -X Version 11 24-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - text is the magic string _"_(_d_e_f_a_u_l_t_)_", then the - text used will be the local machine name; a new- - line; and the local OS version. - - --bbiittmmaapp _x_b_m_-_f_i_l_e - The bitmap to display in the flag; this must be an - XBM file (color XPMs are not allowed.) Default: - none. If the bitmap is the magic string - _"_(_d_e_f_a_u_l_t_)_", then the bitmap used will be a charm- - ing little picture of J. R. "Bob" Dobbs. - - If neither _-_t_e_x_t nor _-_b_i_t_m_a_p are specified, then - either the builtin text or the builtin bitmap will - be chosen randomly. - - --ffoonntt _f_o_n_t - The font in which to draw the text; the default is - "-*-helvetica-bold-r-*-240-*". - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1996 Charles Vidal. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - - -AAUUTTHHOORR - Charles Vidal , 1996. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r, and the - -text and -bitmap options, added by Jamie Zawinski - , 24-May-97. - - - - - - - - - - -X Version 11 24-May-97 2 - - diff --git a/local/man/cat.1/flame.1 b/local/man/cat.1/flame.1 deleted file mode 100644 index 3fd0282f..00000000 --- a/local/man/cat.1/flame.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - flame - draw weird cosmic fractals - -SSYYNNOOPPSSIISS - ffllaammee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-colors _i_n_t_e_g_e_r] [-iterations _i_n_t_e_g_e_r] - [-points _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] [-delay2 _m_i_c_r_o_s_e_c_- - _o_n_d_s] - -DDEESSCCRRIIPPTTIIOONN - The _f_l_a_m_e program generates colorful fractal displays. - -OOPPTTIIOONNSS - _f_l_a_m_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. - - --iitteerraattiioonnss _i_n_t_e_g_e_r - How many fractals to generate. Default 25. - - --ppooiinnttss _i_n_t_e_g_e_r - How many pixels to draw for each fractal. Default - 10000. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How long we should wait between drawing each frac- - tal. Default 50000, or about 1/20th second. - - --ddeellaayy22 _m_i_c_r_o_s_e_c_o_n_d_s - How long we should wait before clearing the screen - when each run ends. Default 2000000, or two sec- - onds. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1991 by Patrick J. Naughton - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Scott Graves , 06-Jun-91.n - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 18-Oct-93. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/forest.1 b/local/man/cat.1/forest.1 deleted file mode 100644 index 7187b69a..00000000 --- a/local/man/cat.1/forest.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - forest - draws a fractal forest - -SSYYNNOOPPSSIISS - ffoorreesstt [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] - - -DDEESSCCRRIIPPTTIIOONN - The _f_o_r_e_s_t program draws a fractal forest. - -OOPPTTIIOONNSS - _f_o_r_e_s_t accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 100. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - - - - - -X Version 11 27-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1995 by Pascal Pensa. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Pascal Pensa , 1995. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 27-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 27-May-97 2 - - diff --git a/local/man/cat.1/fract.1 b/local/man/cat.1/fract.1 deleted file mode 100644 index 6cef8ed5..00000000 --- a/local/man/cat.1/fract.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - fract - draws pseudo-fractal geometric patterns - -SSYYNNOOPPSSIISS - ffrraacctt [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - - -DDEESSCCRRIIPPTTIIOONN - The _f_r_a_c_t program is yet another geometric pattern genera- - tor, this one's claim to fame being a pseudo-fractal look- - ing vine like pattern that creates nifty whorls and loops. - -OOPPTTIIOONNSS - _f_r_a_c_t accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. The colors are chosen randomly. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1997 by Tracy Camp. - - Permission to use, copy, modify, and distribute this soft- - ware and its documentation for any purpose and without fee - is hereby granted, provided that the above copyright - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - notice appear in all copies and that both that copyright - notice and this permission notice appear in supporting - documentation. - -AAUUTTHHOORR - Tracy Camp , 1997. - - Tweaked by David Hansen , 21-Mar-97. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/galaxy.1 b/local/man/cat.1/galaxy.1 deleted file mode 100644 index 07dedb49..00000000 --- a/local/man/cat.1/galaxy.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - galaxy - draws spinning galaxies - -SSYYNNOOPPSSIISS - ggaallaaxxyy [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] [-size _i_n_t_e_g_e_r] - [-trail] [-no-trail] - - -DDEESSCCRRIIPPTTIIOONN - The _g_a_l_a_x_y program draws spinning galaxies. - -OOPPTTIIOONNSS - _g_a_l_a_x_y accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors used cycle through the - hue, making N stops around the color wheel. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - - --ssiizzee _i_n_t_e_g_e_r - - - --ttrraaiill - - --nnoo--ttrraaiill - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1994 by Hubert Feyrer. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Original Amiga version by Uli Siegmund - for EGS in Cluster. - - Ported from Cluster/EGS to C/Intuition by Harald Backert. - - Ported to X11 and xlockmore by Hubert Feyrer - , 30-Sep-94. - - Modified by David Bagley , 23-Oct-94. - - Modified by Dave Mitchell , 7-Apr-97. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/goop.1 b/local/man/cat.1/goop.1 deleted file mode 100644 index f95e28bb..00000000 --- a/local/man/cat.1/goop.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - goop - squishy transparent oil and bubble screenhack - -SSYYNNOOPPSSIISS - ggoooopp [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-transparent] [-non-transparent] [-addi- - tive] [-subtractive] [-xor] [-no-xor] - -DDEESSCCRRIIPPTTIIOONN - The _g_o_o_p program draws a simulation of bubbles in layers - of overlapping multicolored translucent fluid. - -OOPPTTIIOONNSS - _g_o_o_p accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ccoouunntt _i_n_t_e_g_e_r - How many bubbles to draw per layer. Default: ran- - dom. - - --llaayyeerrss _i_n_t_e_g_e_r - How many layers to draw. Default: random, based - on screen depth. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How much of a delay should be introduced between - steps of the animation. Default 100000, or about - 1/10th second. - - --ttrraannssppaarreenntt - If _-_l_a_y_e_r_s is greater than 1, then each layer will - be drawn in one color, and when they overlap, the - colors will be mixed. This only works on PPsseeuuddoo-- - CCoolloorr displays. This is the default. - - --nnoonn--ttrraannssppaarreenntt - Turns off _-_t_r_a_n_s_p_a_r_e_n_t. - - - - -X Version 11 11-Jun-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --aaddddiittiivvee - If _-_t_r_a_n_s_p_a_r_e_n_t is specified, then this option - means that the colors will be mixed using an addi- - tive color model, as if the blobs were projected - light. This is the default. - - --ssuubbttrraaccttiivvee - If _-_t_r_a_n_s_p_a_r_e_n_t is specified, then this option - means that the colors will be mixed using a sub- - tractive color model, as if the blobs were - translucent filters. - - --xxoorr Draw with xor instead of the other color tricks. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 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. - -AAUUTTHHOORR - Jamie Zawinski , 11-Jun-97. - - - - - - - - - - - - - - - - - - - -X Version 11 11-Jun-97 2 - - diff --git a/local/man/cat.1/grav.1 b/local/man/cat.1/grav.1 deleted file mode 100644 index 24c3593c..00000000 --- a/local/man/cat.1/grav.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - grav - draws a simple orbital simulation - -SSYYNNOOPPSSIISS - ggrraavv [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-count _i_n_t_e_g_e_r] [-decay] [-no-decay] [-trail] [-no-trail] - - -DDEESSCCRRIIPPTTIIOONN - The _g_r_a_v program draws a simple orbital simulation - -OOPPTTIIOONNSS - _g_r_a_v accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. The colors are chosen randomly. - - --ccoouunntt _i_n_t_e_g_e_r - Default 12. - - --ddeeccaayy - - --nnoo--eeccaayy - Whether orbits should decay. - - - --ttrraaiill - - --nnoo--ttrraaiill - Whether the objects should leave trails behind - them (makes it look vaguely like a cloud-chamber. - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1993 by Greg Bowering. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Greg Bowering , 1993. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/greynetic.1 b/local/man/cat.1/greynetic.1 deleted file mode 100644 index c87f885f..00000000 --- a/local/man/cat.1/greynetic.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - greynetic - draw random stippled/color rectangles - -SSYYNNOOPPSSIISS - ggrreeyynneettiicc [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-delay _u_s_e_c_s] - -DDEESSCCRRIIPPTTIIOONN - The _g_r_e_y_n_e_t_i_c program draws random rectangles. - -OOPPTTIIOONNSS - _g_r_e_y_n_e_t_i_c accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - Slow it down. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/halo.1 b/local/man/cat.1/halo.1 deleted file mode 100644 index 08337190..00000000 --- a/local/man/cat.1/halo.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - halo - draw circular patterns - -SSYYNNOOPPSSIISS - hhaalloo [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-count _i_n_t] [-delay _u_s_e_c_s] [-mode seuss - | ramp | random ] [-animate] [-colors _i_n_t_e_g_e_r] [-cycle] - [-no-cycle] [-cycle-delay _u_s_e_c_s] - -DDEESSCCRRIIPPTTIIOONN - The _h_a_l_o program draws cool patterns based on circles. - -OOPPTTIIOONNSS - _h_a_l_o accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ccoouunntt _i_n_t_e_g_e_r - How many circles to draw. Default 0, meaning ran- - dom. - - --mmooddee sseeuussss || rraammpp || rraannddoomm - In _s_e_u_s_s mode, alternating striped curves will be - drawn. - - In _r_a_m_p mode, a color ramp will be drawn. - - _r_a_n_d_o_m means pick the mode randomly. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How much of a delay should be introduced between - steps of the animation. Default 100000, or about - 0.1 second. - - --ccoolloorrss _i_n_t_e_g_e_r - How many colors to use. Default 100. - - --aanniimmaattee - If specified, then the centerpoints of the circles - - - -X Version 11 12-Jun-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - will bounce around. Otherwise, the circles will - be drawn once, erased, and a new set of circles - will be drawn. - - --ccyyccllee - - --nnoo--ccyyccllee - Whether to do colormap cycling. Default is to - cycle. - - --ccyyccllee--ddeellaayy - Number of microseconds between shifts of the col- - ormap; default 100000, or 1/10th second. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1993 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. - -AAUUTTHHOORR - Jamie Zawinski , 6-jul-93. - - - - - - - - - - - - - - - - - - - -X Version 11 12-Jun-97 2 - - diff --git a/local/man/cat.1/helix.1 b/local/man/cat.1/helix.1 deleted file mode 100644 index 3ecb12c3..00000000 --- a/local/man/cat.1/helix.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - helix - draw helical string-art patterns - -SSYYNNOOPPSSIISS - hheelliixx [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] - -DDEESSCCRRIIPPTTIIOONN - The _h_e_l_i_x program draws interesting patterns composed of - line segments in random colors. - -OOPPTTIIOONNSS - _h_e_l_i_x accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - - - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/hopalong.1 b/local/man/cat.1/hopalong.1 deleted file mode 100644 index 145f5579..00000000 --- a/local/man/cat.1/hopalong.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - hopalong - draw real plane fractals - -SSYYNNOOPPSSIISS - hhooppaalloonngg [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay - _m_i_c_r_o_s_e_c_o_n_d_s] [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] [-jong] - [-no-jong] [-jong] [-no-sine] - - -DDEESSCCRRIIPPTTIIOONN - The _h_o_p_a_l_o_n_g program generates real plane fractals as - described in the September 1986 issue of Scientific Ameri- - can. - -OOPPTTIIOONNSS - _h_o_p_a_l_o_n_g accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. The colors used cycle through the - hue, making N stops around the color wheel. - - --ccyycclleess _i_n_t_e_g_e_r - How long to run each batch. Default 2500 pixels. - - --ccoouunntt _i_n_t_e_g_e_r - How many pixels should be drawn before a color - change. Default 1000. - - --jjoonngg _i_n_t_e_g_e_r - - --nnoo--jjoonngg _i_n_t_e_g_e_r - Whether to use the Jong format (default is to - choose randomly.) - - - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ssiinnee _i_n_t_e_g_e_r - - --nnoo--ssiinnee _i_n_t_e_g_e_r - Whether to use the Sine format (default is to - choose randomly.) - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1988-91 by Patrick J. Naughton. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Patrick J. Naughton , 23-mar-88. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 13-aug-92, and again on - 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/hypercube.1 b/local/man/cat.1/hypercube.1 deleted file mode 100644 index b71b622c..00000000 --- a/local/man/cat.1/hypercube.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - hypercube - 2d projection of a 4d object - -SSYYNNOOPPSSIISS - hhyyppeerrccuubbee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-color[0-7] _c_o_l_o_r] [-xy _f_l_o_a_t] - [-xz _f_l_o_a_t] [-yz _f_l_o_a_t] [-xw _f_l_o_a_t] [-yw _f_l_o_a_t] [-zw - _f_l_o_a_t] [-observer-z _i_n_t] [-delay _u_s_e_c_s] [-window] [-root] - [-mono] [-install] [-visual _v_i_s_u_a_l] - -DDEESSCCRRIIPPTTIIOONN - The _h_y_p_e_r_c_u_b_e program displays a wireframe projection of a - hypercube which is rotating at user-specified rates around - any or all of its four axes. - -OOPPTTIIOONNSS - _h_y_p_e_r_c_u_b_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How much of a delay should be introduced between - steps of the animation. Default 100000, or about - 1/10th second. - - --oobbsseerrvveerr--zz _i_n_t - How far away the observer is from the center of - the cube (the cube is one unit per side.) Default - 5. - - --ccoolloorr00 _c_o_l_o_r - - --ccoolloorr11 _c_o_l_o_r - - --ccoolloorr22 _c_o_l_o_r - - --ccoolloorr33 _c_o_l_o_r - - --ccoolloorr44 _c_o_l_o_r - - - - -X Version 11 6-dec-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ccoolloorr55 _c_o_l_o_r - - --ccoolloorr66 _c_o_l_o_r - - --ccoolloorr77 _c_o_l_o_r - The colors used to draw the line segments border- - ing the eight faces of the cube. Some of the - faces have only two of their border-lines drawn in - the specified color, and some have all four. - - --xxww _f_l_o_a_t - - --xxyy _f_l_o_a_t - - --xxzz _f_l_o_a_t - - --yyww _f_l_o_a_t - - --yyzz _f_l_o_a_t - - --zzww _f_l_o_a_t - The amount that the cube should be rotated around - the specified axis at each frame of the animation, - expressed in radians. These should be small - floating-point values (less than 0.05 works best.) - Default: xy=0.01, xz=0.005, yw=0.01. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - -AAUUTTHHOORR - Jamie Zawinski , 6-dec-92. - - - - - - -X Version 11 6-dec-92 2 - - diff --git a/local/man/cat.1/ifs.1 b/local/man/cat.1/ifs.1 deleted file mode 100644 index 7e9eeb78..00000000 --- a/local/man/cat.1/ifs.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - ifs - draws spinning, colliding iterated-function-system - images - -SSYYNNOOPPSSIISS - iiffss [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - - -DDEESSCCRRIIPPTTIIOONN - The _i_f_s program draws spinning, colliding iterated-func- - tion-system images. - -OOPPTTIIOONNSS - _i_f_s accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. The colors used cycle through the - hue, making N stops around the color wheel. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1997 by Massimino Pascal. - - Permission to use, copy, modify, and distribute this soft- - ware and its documentation for any purpose and without fee - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - 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. - -AAUUTTHHOORR - Massimino Pascal , 1997. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/imsmap.1 b/local/man/cat.1/imsmap.1 deleted file mode 100644 index 40dbad6b..00000000 --- a/local/man/cat.1/imsmap.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - imsmap - generate fractal maps - -SSYYNNOOPPSSIISS - iimmssmmaapp [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t] [-delay _s_e_c_o_n_d_s] [-itera- - tions _i_n_t] [-mode h|s|v|random] [-cycle] [-no-cycle] - -DDEESSCCRRIIPPTTIIOONN - The _i_m_s_m_a_p program generates map or cloud-like patterns. - It looks quite different in monochrome and color. - -OOPPTTIIOONNSS - _i_m_s_m_a_p accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors to use. Default 50. - - --ddeellaayy _i_n_t_e_g_e_r - How long to delay between images. Default 10 sec- - onds. - - --iitteerraattiioonnss _i_n_t_e_g_e_r - A measure of the resolution of the resultant - image, from 0 to 7. Default 7. - - --mmooddee [[ hhuuee || ssaattuurraattiioonn || vvaalluuee || rraannddoomm ]] - The axis upon which colors should be interpolated - between the foreground and background color. - Default random. - - --ccyyccllee - - --nnoo--ccyyccllee - Whether to do colormap cycling. Default is to - cycle. - - - - -X Version 11 17-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ccyyccllee--ddeellaayy - Number of microseconds between shifts of the col- - ormap; default 100000, or 1/10th second. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -AAUUTTHHOORR - Juergen Nickelsen , 23-aug-92. - - Hacked on by Jamie Zawinski , 24-aug-92, - 17-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 17-May-97 2 - - diff --git a/local/man/cat.1/julia.1 b/local/man/cat.1/julia.1 deleted file mode 100644 index fe583341..00000000 --- a/local/man/cat.1/julia.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - julia - draws spinning, animating julia-set fractals - -SSYYNNOOPPSSIISS - jjuulliiaa [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] [-mouse] [-nomouse] - - -DDEESSCCRRIIPPTTIIOONN - The _j_u_l_i_a program draws spinning, animating julia-set - fractals. - - It uses ifs {w0 = sqrt(x-c), w1 = -sqrt(x-c)} with random - iteration to plot the julia set, and sinusoidially varied - parameters for the set, and plots parameters with a cir- - cle. - - One thing to note is that count is the _d_e_p_t_h of the search - tree, so the number of points computed is (2^count)-1. I - use 8 or 9 on a dx266 and it looks okay. The sinusoidal - variation of the parameter might not be as interesting as - it could, but it still gives an idea of the effect of the - parameter. - - -OOPPTTIIOONNSS - _j_u_l_i_a accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. The colors used cycle through the - hue, making N stops around the color wheel. - - --ccyycclleess _i_n_t_e_g_e_r - - - - - -X Version 11 28-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ccoouunntt _i_n_t_e_g_e_r - - - --mmoouussee - - --nnoommoouussee - If _-_m_o_u_s_e is specified, the control point of the - Julia set will be derived from the position of the - mouse in the window. When the mouse is not in the - window, the control point is chosen the normal - way. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1995 by Sean McCullough. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Sean McCullough , 1995. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - -X Version 11 28-May-97 2 - - diff --git a/local/man/cat.1/kaleidescope.1 b/local/man/cat.1/kaleidescope.1 deleted file mode 100644 index 8aa46522..00000000 --- a/local/man/cat.1/kaleidescope.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -Kaleidescpe(1) Kaleidescpe(1) - - -NNAAMMEE - Kaleidescope - rotating line segments - -SSYYNNOOPPSSIISS - kkaalleeiiddeessccooppee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-install] - [-visual _v_i_s_u_a_l] [-color_mode _m_o_n_o _| _n_i_c_e _| _g_r_e_e_d_y] - [-nsegments _i_n_t] [-ntrails _i_n_t] [-local_rotation _i_n_t] - [-global_rotation _i_n_t] [-delay _u_s_e_c_s] [-redmin _i_n_t] - [-greenmin _i_n_t] [-bluemin _i_n_t] [-redrange _i_n_t] [-green- - range _i_n_t] [-bluerange _i_n_t] - -DDEESSCCRRIIPPTTIIOONN - The _k_a_l_e_i_d_e_s_c_o_p_e program draws line segments in a symmet- - ric pattern that evolves over time. - -OOPPTTIIOONNSS - _k_a_l_e_i_d_e_s_c_o_p_e accepts the following options: - - --rroooott Draw on the root window. - - --ccoolloorr__mmooddee mmoonnoo || nniiccee || ggrreeeeddyy - Specify how kaleidescope uses colors. Mono uses - just the default foreground and background colors. - Nice uses one color for each segment (specified by - nsegments). Greedy uses (ntrails * nsegments) + 1 - colors. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnsseeggmmeennttss iinntteeggeerr - The number of segments to draw. Default is 7. - - --nnttrraaiillss iinntteeggeerr - The number of trails to draw. Default is 100. - - --llooccaall__rroottaattiioonn iinntteeggeerr - The rate at which segments rotate around their - center. Default is -59. - - --gglloobbaall__rroottaattiioonn iinntteeggeerr - The rate at which segments rotate around the cen- - ter of the window. Default is 1. - - --rreeddmmiinn,, --ggrreeeennmmiinn,, --bblluueemmiinn,, --rreeddrraannggee,, --ggrreeeennrraannggee,, - --bblluueerraannggee - All take an integer argument. When colors are ran- - domly chosen, they are chosen from the interval - - - -X Version 11 14-Dec-95 1 - - - - - -Kaleidescpe(1) Kaleidescpe(1) - - - min to min plus range. The minimums default to - 30000. The ranges default to 20000. - - --ddeellaayy mmiiccrroosseeccoonnddss - How much of a delay should be introduced between - steps of the animation. Default is 20000, or - about 5 frames a second. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), kkaalleeiiddeessccooppee(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1997 by Ron Tapia. Permission to use, copy, - modify, distribute, and sell this software and its docu- - mentation 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 per- - mission 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. - -AAUUTTHHOORR - Ron Tapia , 20-Mar-97. - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 14-Dec-95 2 - - diff --git a/local/man/cat.1/laser.1 b/local/man/cat.1/laser.1 deleted file mode 100644 index d8989e0a..00000000 --- a/local/man/cat.1/laser.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - laser - draws vaguely laser-like moving lines - -SSYYNNOOPPSSIISS - llaasseerr [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] - - -DDEESSCCRRIIPPTTIIOONN - The _l_a_s_e_r program draws vaguely laser-like moving lines - -OOPPTTIIOONNSS - _l_a_s_e_r accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors used cycle through the - hue, making N stops around the color wheel. - - --ccyycclleess _i_n_t_e_g_e_r - Default 200. - - --ccoouunntt _i_n_t_e_g_e_r - Default 10. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1995 by Pascal Pensa. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Pascal Pensa , 1995. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/lightning.1 b/local/man/cat.1/lightning.1 deleted file mode 100644 index ce2f5dc3..00000000 --- a/local/man/cat.1/lightning.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - lightning - draws fractal lightning bolts - -SSYYNNOOPPSSIISS - lliigghhttnniinngg [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay - _m_i_c_r_o_s_e_c_o_n_d_s] - - -DDEESSCCRRIIPPTTIIOONN - The _l_i_g_h_t_n_i_n_g program draws fractal lightning bolts - -OOPPTTIIOONNSS - _l_i_g_h_t_n_i_n_g accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors are chosen randomly. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1996 by Keith Romberg. - - Permission to use, copy, modify, and distribute this soft- - ware 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 - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - notice and this permission notice appear in supporting - documentation. - -AAUUTTHHOORR - Keith Romberg , 27-Jun-96. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/lisa.1 b/local/man/cat.1/lisa.1 deleted file mode 100644 index 32eb564d..00000000 --- a/local/man/cat.1/lisa.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - lisa - draws animated full-loop lisajous figures - -SSYYNNOOPPSSIISS - lliissaa [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] [-size _i_n_t_e_g_e_r] - - -DDEESSCCRRIIPPTTIIOONN - The _l_i_s_a program draws animated full-loop lisajous fig- - ures. - -OOPPTTIIOONNSS - _l_i_s_a accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. The colors are chosen randomly. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - - --ssiizzee _i_n_t_e_g_e_r - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - - - - -X Version 11 27-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1997 by Caleb Cullen. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Caleb Cullen, 1997. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 27-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 27-May-97 2 - - diff --git a/local/man/cat.1/lmorph.1 b/local/man/cat.1/lmorph.1 deleted file mode 100644 index a63c1e80..00000000 --- a/local/man/cat.1/lmorph.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -LMORPH(1) LMORPH(1) - - -NNAAMMEE - lmorph - morphing lines - -SSYYNNOOPPSSIISS - llmmoorrpphh [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-points _i_n_t] [-steps _i_n_t] [-delay _u_s_e_c_s] - -DDEESSCCRRIIPPTTIIOONN - The _l_m_o_r_p_h program morphs between simple linedrawings - using bilinear interpolation. - -OOPPTTIIOONNSS - _l_m_o_r_p_h accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ppooiinnttss _i_n_t_e_g_e_r - Number of points in each line drawing. Default is - 150 points. - - --sstteeppss _i_n_t_e_g_e_r - Interpolation steps from one drawing to the next. - Default is 0, which means a random number between - 100 and 500. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How much of a delay should be introduced between - steps of the animation. Default 50000. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - - - - xscreensaver hack 1 - - - - - -LMORPH(1) LMORPH(1) - - -AAUUTTHHOORR - Sverre H. Huseby and Glenn T. Lines - , built on top of the screen saver rou- - tines by Jamie Zawinski . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - xscreensaver hack 2 - - diff --git a/local/man/cat.1/maze.1 b/local/man/cat.1/maze.1 deleted file mode 100644 index 354ec46a..00000000 --- a/local/man/cat.1/maze.1 +++ /dev/null @@ -1,198 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - maze - an automated X11 demo repeatedly creating and solv- - ing a random maze - -SSYYNNOOPPSSIISS - mmaazzee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-install] [-visual - _v_i_s_u_a_l] [-grid-size _p_i_x_e_l_s] [-live-color _c_o_l_o_r] - [-dead-color _c_o_l_o_r] [-solve-delay _u_s_e_c_s] [-pre-delay - _u_s_e_c_s] [-post-delay _u_s_e_c_s] - -DDEESSCCRRIIPPTTIIOONN - The _m_a_z_e program creates a "random" maze and then solves - it with graphical feedback. - -OOPPTTIIOONNSS - _m_a_z_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ggrriidd--ssiizzee _p_i_x_e_l_s - The size of each block of the maze, in pixels; - default is 0, meaning pick a random grid size. - - --lliivvee--ccoolloorr _c_o_l_o_r - The color of the path. - - --ddeeaadd--ccoolloorr _c_o_l_o_r - The color of the failed path (it is also stippled - with a 50% pattern.) - - --ssoollvvee--ddeellaayy _i_n_t_e_g_e_r - Delay (in microseconds) between each step of the - solution path. Default 5000, or about 1/200th - second. - - --pprree--ddeellaayy _i_n_t_e_g_e_r - Delay (in microseconds) between generating a maze - and starting to solve it. Default 2000000 (2 sec- - onds.) - - --ppoosstt--ddeellaayy _i_n_t_e_g_e_r - Delay (in microseconds) after solving a maze and - - - -X Version 11 7-mar-93 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - before generating a new one. Default 4000000 (4 - seconds.) - - Clicking the mouse in the maze window controls it. - - LLeeffttBBuuttttoonn Clears the window and restarts maze. - - MMiiddddlleeBBuuttttoonn Pause or unpause the program. - - RRiigghhttBBuuttttoonn Exit. - -BBUUGGSS - Expose events force a restart of maze. - - Mouse actions are based on "raw" values (Button1, Button2 - and Button3) instead of using the pointer map. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1988 by Sun Microsystems, Inc. Mountain - View, CA. - - All Rights Reserved - - Permission to use, copy, modify, and distribute this soft- - ware 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, and that the names of Sun or MIT not be - used in advertising or publicity pertaining to distribu- - tion of the software without specific prior written per- - mission. Sun and M.I.T. make no representations about the - suitability of this software for any purpose. It is pro- - vided "as is" without any express or implied warranty. - - SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE - LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA - OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - - -X Version 11 7-mar-93 2 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -AAUUTTHHOORR((ss)) - Jim Randell [ XScreenSaver version ] jmr@mddjmr.fc.hp.com - HPLabs, Bristol - Richard Hess [ X11 extensions ] {...}!uunet!cimshop!rhess - Consilium, Mountain View, CA - Dave Lemke [ X11 version ] lemke@sun.COM - Sun MicroSystems, Mountain View, CA - Martin Weiss [ SunView version ] - Sun MicroSystems, Mountain View, CA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 7-mar-93 3 - - diff --git a/local/man/cat.1/moire.1 b/local/man/cat.1/moire.1 deleted file mode 100644 index be5b7a8f..00000000 --- a/local/man/cat.1/moire.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - halo - draw circular interference patterns - -SSYYNNOOPPSSIISS - hhaalloo [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-delay _s_e_c_o_n_d_s] [-random _b_o_o_l_e_a_n] - [-ncolors _i_n_t] [-offset _i_n_t] - -DDEESSCCRRIIPPTTIIOONN - The _m_o_i_r_e program draws cool circular interference pat- - terns. - -OOPPTTIIOONNSS - _m_o_i_r_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy _s_e_c_o_n_d_s - How long to wait before starting over. Default 5 - seconds. - - --rraannddoomm _b_o_o_l_e_a_n - Whether to ignore the foreground/background col- - ors, and pick them randomly instead. - - --ooffffsseett _i_n_t_e_g_e_r - The maximum random radius increment to use. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be allocated in the color - ramp (note that this value interacts with _o_f_f_s_e_t.) - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - - - -X Version 11 27-Apr-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 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. - -AAUUTTHHOORR - Jamie Zawinski , 27-Apr-97, based on - code by Michael D. Bayne . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 27-Apr-97 2 - - diff --git a/local/man/cat.1/munch.1 b/local/man/cat.1/munch.1 deleted file mode 100644 index 452f8a28..00000000 --- a/local/man/cat.1/munch.1 +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - munch - munching squares screen hack - -SSYYNNOOPPSSIISS - ddeeccoo [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-delay _s_e_c_o_n_d_s] [-xor] [-noxor] [-shift] - [-noshift] [-logminwidth _m_i_n_i_m_u_m _w_i_d_t_h] - -DDEESSCCRRIIPPTTIIOONN - The _m_u_n_c_h program preforms the munching squares hack until - killed. It picks square size, position, and gravity ran- - domly; configurable options are listed below. - - The munching squares hack cosists of drawing Y = X XOR T - for a range of X and T over and over until all the possi- - ble combinations of X and T have come up. It was report- - edly discovered by Jackson Wright in 1962 and took 5 - instructions of PDP-6 code. - -OOPPTTIIOONNSS - _m_u_n_c_h accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy _s_e_c_o_n_d_s - How long to wait before starting over. Default 5 - seconds. - - --xxoorr Use the XOR drawing function. (Default.) - - --nnoo--xxoorr Don't use the XOR drawing function. - - --sshhiifftt Start drawing the square at weird starting points. - (Default.) - - --nnoo--sshhiifftt - Don't shift and start drawing the square at weird - starting points. - - - - -X Version 11 17-Jun-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --llooggmmiinnwwiiddtthh _m_i_n_i_m_u_m_-_w_i_d_t_h - The logarithm (base 2) of the minimum with of a - square (must be a power of 2, or some parts of the - square aren't.) - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), - hhttttpp::////wwwwww..iinnwwaapp..ccoomm//ppddpp1100//hhbbaakkeerr//hhaakkmmeemm//hhaakkmmeemm..hhttmmll,, - hhttttpp::////wwwwww..ccoommeeddiiaa..ccoomm//HHoott//jjaarrggoonn__33..00//JJAARRGGOONN__MM//MMUUNNCCHH-- - SSQQRR..HHTTMMLL - -HHIISSTTOORRYY - Quoted from HAKMEM, for historical interest. As that doc- - ument says, "Unless otherwise stated, all computer pro- - grams are in PDP-6/10 assembly language." - - ITEM 146: MUNCHING SQUARES - Another simple display program. It is thought that - this was discovered by Jackson Wright on the RLE - PDP-1 circa 1962. - - DATAI 2 - ADDB 1,2 - ROTC 2,-22 - XOR 1,2 - JRST .-4 - - 2=X, 3=Y. Try things like 1001002 in data - switches. This also does interesting things with - operations other than XOR, and rotations other - than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT - -14, -9, -20, ...) - - ITEM 147 (Schroeppel): - Munching squares is just views of the graph Y = X - XOR T for consecutive values of T = time. - - ITEM 148 (Cohen, Beeler): - A modification to munching squares which reveals - them in frozen states through opening and closing - curtains: insert FADR 2,1 before the XOR. Try data - switches = - - 4000,,4 1000,,2002 2000,,4 0,,1002 - - (Notation: ,,) - - - -X Version 11 17-Jun-97 2 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - Also try the FADR after the XOR, switches = - 1001,,1. - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1997 by Tim Showalter. 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. - -AAUUTTHHOORR - Tim Showalter , 17-Jun-97, based on - what's in the Jargon File and stealing stuff from existing - xscreensaver modules. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 17-Jun-97 3 - - diff --git a/local/man/cat.1/noseguy.1 b/local/man/cat.1/noseguy.1 deleted file mode 100644 index cf5aefe0..00000000 --- a/local/man/cat.1/noseguy.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - noseguy - a little guy with a big nose wanders around - being witty - -SSYYNNOOPPSSIISS - nnoosseegguuyy [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-text-foreground _c_o_l_o_r] [-text-back- - ground _c_o_l_o_r] [-font _f_o_n_t] [-window] [-root] [-install] - [-visual _v_i_s_u_a_l] [-mode _m_o_d_e] [-program _p_r_o_g_r_a_m] [-file- - name le_] _[_-_t_e_x_t _t_e_x_t_] - -DDEESSCCRRIIPPTTIIOONN - A little man with a big nose and a hat runs around spewing - out messages to the screen. This code (and its bitmaps) - were extracted from the _x_n_l_o_c_k program. - -OOPPTTIIOONNSS - _n_o_s_e_g_u_y accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ffoonntt _f_o_n_t - The font used for the messages. - - --mmooddee [[ pprrooggrraamm || ffiillee || ssttrriinngg ]] - In _p_r_o_g_r_a_m mode, the messages are gotten by run- - ning a program. The program used is controlled by - the _-_p_r_o_g_r_a_m option, and the _._p_r_o_g_r_a_m resource. - - In _f_i_l_e_n_a_m_e mode, the message used is the contents - of a file. The file used is controlled by the - _-_f_i_l_e option, and the _._f_i_l_e_n_a_m_e resource. - - In _s_t_r_i_n_g mode, the message is whatever was speci- - fied on the command line as the _-_t_e_x_t option, or - in the resource database as the _._t_e_x_t resource. - - --pprrooggrraamm _p_r_o_g_r_a_m - If _m_o_d_e is _p_r_o_g_r_a_m (the default), then this pro- - gram will be run periodically, and its output will - be the text of the messages. The default program - is _"_f_o_r_t_u_n_e _-_s_", but _y_o_w is also a good choice. - - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ffiilleennaammee _f_i_l_e - If _m_o_d_e is _f_i_l_e, then the contents of this file - will be used for all messages. - - --tteexxtt _s_t_r_i_n_g - If _m_o_d_e is _s_t_r_i_n_g, then this text will be used for - all messages. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxnnlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright 1985, 1990 by Dan Heller . - -AAUUTTHHOORR - Dan Heller , 1985. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 13-aug-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/pedal.1 b/local/man/cat.1/pedal.1 deleted file mode 100644 index b31f6b80..00000000 --- a/local/man/cat.1/pedal.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - pedal - pretty geometric picture program - -SSYYNNOOPPSSIISS - ppeeddaall [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-delay _s_e_c_o_n_d_s] - [-maxlines _n_u_m_b_e_r] [-fadedelay _u_s_e_c_o_n_d_s] [-mono] - [-install] [-visual _v_i_s_u_a_l] - -DDEESSCCRRIIPPTTIIOONN - The _p_e_d_a_l program displays pretty geometric pictures. - -OOPPTTIIOONNSS - _p_e_d_a_l accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --ffoorreeggrroouunndd _c_o_l_o_r - The color for the foreground. Default is white. - - --bbaacckkggrroouunndd _c_o_l_o_r - The color for the background. Default is black. - - --ddeellaayy _s_e_c_o_n_d_s - The number of seconds to pause between each pic- - ture. - - --mmaaxxlliinneess _n_u_m_b_e_r - The maximum number of lines in the drawing. Good - values are between 20 and 2000. Maximum value is - 16K. - - --ffaaddeeddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - The number of micro seconds to take when fading in - and out. - - --mmoonnoo Don't do fading. Pretend we're on a monochrome - display. - - To make your X server grunt under load, and to impress - your friends, try _p_e_d_a_l _-_m_o_n_o _-_d_e_l_a_y _0 _-_m_a_x_l_i_n_e_s _1_0_0_. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - - - - - -X Version 11 24-Jun-94 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1994, by Carnegie Mellon University. Per- - mission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby - granted without fee, provided fnord that the above copy- - right notice appear in all copies and that both that copy- - right notice and this permission notice appear in support- - ing documentation. No representations are made about the - suitability of fnord this software for any purpose. It is - provided "as is" without express or implied warranty. - -AAUUTTHHOORR - Dale Moore , 24-Jun-1994. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 24-Jun-94 2 - - diff --git a/local/man/cat.1/penrose.1 b/local/man/cat.1/penrose.1 deleted file mode 100644 index 5b12ad38..00000000 --- a/local/man/cat.1/penrose.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - penrose - draws quasiperiodic tilings - -SSYYNNOOPPSSIISS - ppeennrroossee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-size _i_n_t_e_g_e_r] [-ammann] [-no-ammann] - - -DDEESSCCRRIIPPTTIIOONN - The _p_e_n_r_o_s_e program draws quasiperiodic tilings. - - See Onoda, Steinhardt, DiVincenzo and Socolar in Phys. - Rev. Lett. 60, #25, 1988 or Strandburg in Computers in - Physics, Sep/Oct 1991. - - This implementation uses the simpler version of the growth - algorithm, i.e., if there are no forced vertices, a ran- - domly chosen tile is added to a randomly chosen vertex (no - preference for those 108 degree angles). - - There are two essential differences to the algorithm pre- - sented in the literature: First, we do not allow the - tiling to enclose an untiled area. Whenever this is in - danger of happening, we just do not add the tile, hoping - for a better random choice the next time. Second, when - choosing a vertex randomly, we will take one that lies - withing the viewport if available. If this seems to cause - enclosures in the forced rule case, we will allow invisi- - ble vertices to be chosen. - - Tiling is restarted whenever one of the following happens: - there are no incomplete vertices within the viewport or - the tiling has extended a window's length beyond the edge - of the window horizontally or vertically or forced rule - choice has failed 100 times due to areas about to become - enclosed. - - -OOPPTTIIOONNSS - _p_e_n_r_o_s_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors are chosen randomly. - - --ssiizzee _i_n_t_e_g_e_r - How big the tiles should be. Default 40 pixels. - - - --aammmmaannnn _i_n_t_e_g_e_r - - --nnoo--aammmmaannnn _i_n_t_e_g_e_r - Whether Ammann lines should be added. - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1996 by Timo Korvola. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Timo Korvola , 1996. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/pyro.1 b/local/man/cat.1/pyro.1 deleted file mode 100644 index c60884a8..00000000 --- a/local/man/cat.1/pyro.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - pyro - simulate fireworks - -SSYYNNOOPPSSIISS - ppyyrroo [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-count _i_n_t_e_g_e_r] [-frequency _i_n_t_e_g_e_r] - [-scatter _i_n_t_e_g_e_r] - -DDEESSCCRRIIPPTTIIOONN - The _p_y_r_o program simulates fireworks, in a way similar to - a Macintosh program of the same name. - -OOPPTTIIOONNSS - _p_y_r_o accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ccoouunntt _i_n_t_e_g_e_r - How many particles should be allowed on the screen - at once. Default 100. - - --ffrreeqquueennccyy _i_n_t_e_g_e_r - How often new missiles should launch. Default 30. - - --ssccaatttteerr _i_n_t_e_g_e_r - How many particles should appear when a missile - explodes. Default 20. The actual number used is - between _N and _N_+_(_N_/_2_). - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/qix.1 b/local/man/cat.1/qix.1 deleted file mode 100644 index ad894db9..00000000 --- a/local/man/cat.1/qix.1 +++ /dev/null @@ -1,198 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - qix - bounce colored lines around a window - -SSYYNNOOPPSSIISS - qqiixx [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-segments _i_n_t] [-spread _p_i_x_e_l_s] [-size - _p_i_x_e_l_s] [-count _i_n_t] [-color-shift _d_e_g_r_e_e_s] [-delay _u_s_e_c_s] - [-random] [-linear] [-solid] [-hollow] [-xor] [-no-xor] - [-transparent] [-non-transparent] [-additive] [-subtrac- - tive] [-poly _i_n_t] [-gravity] [-no-gravity] - -DDEESSCCRRIIPPTTIIOONN - The _q_i_x program bounces a series of line segments around - its window. This is truly the swiss army chainsaw of qix - programs. If you know of one with more display modes, I - want to know about it. - -OOPPTTIIOONNSS - _q_i_x accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --sseeggmmeennttss _i_n_t_e_g_e_r - How many line segments should be drawn. Default - 50. - - --sspprreeaadd _i_n_t_e_g_e_r - How far apart the endpoints of one segment should - be from the next. Default 8. - - --ssiizzee _i_n_t_e_g_e_r - The maximum distance one endpoint of a segment is - allowed to be from the opposite end of that seg- - ment. Default 0, meaning unlimited. - - --ccoouunntt _i_n_t_e_g_e_r - How many qixes to draw. Default 1. - - - - - -X Version 11 27-Apr-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ccoolloorr--sshhiifftt _d_e_g_r_e_e_s - If on a color display, the color of the line seg- - ments will cycle through the spectrum. This spec- - ifies how far the hue of each segment should be - from the next, in degrees on the HSV wheel. - Default 3. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How much of a delay should be introduced between - steps of the animation. Default 25000, or about - 0.025 seconds. - - --rraannddoomm The _q_i_x will wander around the screen semi-ran- - domly. This is the default. - - --lliinneeaarr The opposite of _-_r_a_n_d_o_m: the _q_i_x will travel in - straight lines until it reaches a wall, and then - it will bounce. - - --ssoolliidd If this is specified, then the area between the - line segments will be filled in with the appropri- - ate color, instead of the _q_i_x simply being com- - posed of one-pixel-wide line segments. This - option looks really good in color. - - --hhoollllooww The opposite of _-_s_o_l_i_d; this is the default. - - --xxoorr If this is specified, then qix segments will be - drawn and erased with xor, instead of being drawn - in some color and erased in the background color. - This implies _-_m_o_n_o, in that only two colors can be - used. - - --ttrraannssppaarreenntt - If this is specified, and _-_c_o_u_n_t is greater than - 1, then each qix will be drawn in one color, and - when they overlap, the colors will be mixed. This - only works on PPsseeuuddooCCoolloorr displays. This looks - best in conjuction with _-_s_o_l_i_d. - - --nnoonn--ttrraannssppaarreenntt - Turns off _-_t_r_a_n_s_p_a_r_e_n_t. - - --aaddddiittiivvee - If _-_t_r_a_n_s_p_a_r_e_n_t is specified, then this option - means that the colors will be mixed using an addi- - tive color model, as if the qixes were projected - light. This is the default. - - --ssuubbttrraaccttiivvee - If _-_t_r_a_n_s_p_a_r_e_n_t is specified, then this option - means that the colors will be mixed using a sub- - tractive color model, as if the qixes were - translucent filters. - - - -X Version 11 27-Apr-97 2 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ppoollyy _i_n_t - How many vertices each qix-line should have: the - default is 2, meaning the traditional qix line - shape. Three will yield triangles, and so on. - - --ggrraavviittyy - - --nnoo--ggrraavviittyy - Whether there should be downward attraction. For - example, the options --ggrraavviittyy --lliinneeaarr will make - everything move in nice smooth parabolas. Gravity - is off by default. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - Thanks to Ariel Scolnicov for the -poly and -gravity - options. - - - - - - - - - - - - - - - - - -X Version 11 27-Apr-97 3 - - diff --git a/local/man/cat.1/rocks.1 b/local/man/cat.1/rocks.1 deleted file mode 100644 index 4336c9db..00000000 --- a/local/man/cat.1/rocks.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - rocks - animation of flying through an asteroid field - -SSYYNNOOPPSSIISS - rroocckkss [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-install] [-visual - _v_i_s_u_a_l] [-count _i_n_t_e_g_e_r] [-delay _u_s_e_c_s] [-speed _i_n_t_e_g_e_r] - [-norotate] [-nomove] [-3d] - -DDEESSCCRRIIPPTTIIOONN - The _r_o_c_k_s program draws an animation of an asteroid field - moving past the observer (or vice versa). Sometimes the - observer picks up spin on Z axis. - -OOPPTTIIOONNSS - _r_o_c_k_s accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ccoouunntt _i_n_t_e_g_e_r - Maximum number of rocks to draw on the screen at - once. Default 100. - - --ssppeeeedd _i_n_t_e_g_e_r - A measure of the speed with which the observer and - the rocks pass each other, from 1 to 100. Default - 100, meaning ``very fast.'' If you're on a slow - display connection (the animation looks jerky) - then try making this number smaller, and/or - decreasing the number of rocks. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - Number of microseconds to delay between each - frame. Default 50000, meaning about 1/20th sec- - ond. Compare and contrast with _-_s_p_e_e_d, above. - - --nnoorroottaattee - Don't rotate the observer; just fly through the - field on the level. - - --nnoommoovvee Don't turn the observer; just fly straight ahead - through the field. - - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --33dd Do red/blue 3d separations: if you look at the - screen with 3d glasses, the rocks will be _j_u_m_p_i_n_g - right _o_u_t at you. Oooooh, scaaary! - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -BBUUGGSS - There should be an option to display doppler shift (a - gravity rainbow.) - - Speed of rotation should be settable. - - Default speed of rotation should be relative to forward - velocity. - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - -AAUUTTHHOORR - Based on Lisp Machine code copyright 1988 John Nguyen - . - - Ported to C and X by Jamie Zawinski , - 13-aug-92. - - Steering code by Jeremie Petit; 3D code by theil- - ing@coli.uni-sb.de. - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/rorschach.1 b/local/man/cat.1/rorschach.1 deleted file mode 100644 index 1b43ba49..00000000 --- a/local/man/cat.1/rorschach.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - rorschach - simulate ink-blot patterns - -SSYYNNOOPPSSIISS - rroorrsscchhaacchh [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-iterations _i_n_t_e_g_e_r] [-offset - _i_n_t_e_g_e_r] [-xsymmetry] [-ysymmetry] - -DDEESSCCRRIIPPTTIIOONN - The _r_o_r_s_c_h_a_c_h program draws random patterns reminiscent of - the psychological test of same name. - -OOPPTTIIOONNSS - _r_o_r_s_c_h_a_c_h accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --iitteerraattiioonnss _i_n_t_e_g_e_r - How many dots should be drawn each time. Default - 4000. - - --ooffffsseett _i_n_t_e_g_e_r - How far apart the dots should be. Default 4 pix- - els. - - --xxssyymmmmeettrryy - Whether the images should be horizontally symmet- - rical. Default true. - - --yyssyymmmmeettrryy - Whether the images should be vertically symmetri- - cal. Default false. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - RESOURCE_MANAGER property. - -BBUUGGSS - May call your sanity into question. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/sierpinski.1 b/local/man/cat.1/sierpinski.1 deleted file mode 100644 index 610314db..00000000 --- a/local/man/cat.1/sierpinski.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - sierpinski - draws Sierpinski triangle fractals - -SSYYNNOOPPSSIISS - ssiieerrppiinnsskkii [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay - _m_i_c_r_o_s_e_c_o_n_d_s] [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] - - -DDEESSCCRRIIPPTTIIOONN - The _s_i_e_r_p_i_n_s_k_i program draws Sierpinski triangle fractals. - -OOPPTTIIOONNSS - _s_i_e_r_p_i_n_s_k_i accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors are chosen randomly. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - - - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1996 by Desmond Daignault. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Desmond Daignault , 05-Sep-96. - (Original xlock version was called tri.c.) - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. (Renamed to - sierpinski.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/slidescreen.1 b/local/man/cat.1/slidescreen.1 deleted file mode 100644 index 889bb37a..00000000 --- a/local/man/cat.1/slidescreen.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - slidescreen - permute the screen image like an 8-puzzle - -SSYYNNOOPPSSIISS - sslliiddeessccrreeeenn [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-background - _c_o_l_o_r] [-grid-size _p_i_x_e_l_s] [-ibw _p_i_x_e_l_s] [-increment _p_i_x_- - _e_l_s] [-delay _u_s_e_c_s] [-delay2 _u_s_e_c_s] [-window] [-root] - [-install] [-visual _v_i_s_u_a_l] - -DDEESSCCRRIIPPTTIIOONN - The _s_l_i_d_e_s_c_r_e_e_n program takes an image of the screen, - divides it into a grid, deletes a random square of that - grid, and then randomly slides one of the neighbors of - this "hole" into the hole (and repeat.) - -OOPPTTIIOONNSS - _s_l_i_d_e_s_c_r_e_e_n accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ggrriidd--ssiizzee _p_i_x_e_l_s - The size of the grid cells. Default 70 pixels. - - --iibbww _p_i_x_e_l_s - The size of the "gutter" between grid cells. - Default 1 pixel. - - --iinnccrreemmeenntt _p_i_x_e_l_s - How many pixels by which a piece should be moved - when sliding to a new location. Default 10 pix- - els. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How much of a delay should be introduced between - steps of the animation of the motion of each seg- - ment. Default 50000, which is 0.05 seconds. This - is closely related to the _-_i_n_c_r_e_m_e_n_t parameter. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - 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. - - - -X Version 11 3-dec-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 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. - -AAUUTTHHOORR - Jamie Zawinski , 3-dec-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 3-dec-92 2 - - diff --git a/local/man/cat.1/slip.1 b/local/man/cat.1/slip.1 deleted file mode 100644 index ace68e09..00000000 --- a/local/man/cat.1/slip.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - flame - sucks your screen into a jet engine - -SSYYNNOOPPSSIISS - ffllaammee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-iterations _i_n_t_e_g_e_r] - [-points _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] [-delay2 _m_i_c_r_o_s_e_c_- - _o_n_d_s] - -DDEESSCCRRIIPPTTIIOONN - The _s_l_i_p program does lots of blits and chews up your - screen image. - -OOPPTTIIOONNSS - _f_l_a_m_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 128. The colors used cycle through the - hue, making N stops around the color wheel. - - --iitteerraattiioonnss _i_n_t_e_g_e_r - How many fractals to generate. Default 25. - - --ppooiinnttss _i_n_t_e_g_e_r - How many pixels to draw for each fractal. Default - 10000. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How long we should wait between drawing each frac- - tal. Default 50000, or about 1/20th second. - - --ccyycclleess _i_n_t_e_g_e_r - How long to frobnicate. Default 50. - - - - - - -X Version 11 13-aug-92 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - --ccoouunntt _i_n_t_e_g_e_r - How many whooziwhatsis. Default 35. - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992 by Scott Draves. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Scott Graves . - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 18-Oct-93. - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-aug-92 2 - - diff --git a/local/man/cat.1/sphere.1 b/local/man/cat.1/sphere.1 deleted file mode 100644 index 746799ec..00000000 --- a/local/man/cat.1/sphere.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - sphere - draws shaded spheres - -SSYYNNOOPPSSIISS - sspphheerree [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - - -DDEESSCCRRIIPPTTIIOONN - The _s_p_h_e_r_e program draws shaded spheres. - -OOPPTTIIOONNSS - _s_p_h_e_r_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors are chosen randomly. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1988 by Sun Microsystems, Inc. - - Permission to use, copy, modify, and distribute this soft- - ware 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 - - - -X Version 11 27-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - documentation. - -AAUUTTHHOORR - Sun Microsystems, Inc, 1988. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 27-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 27-May-97 2 - - diff --git a/local/man/cat.1/spiral.1 b/local/man/cat.1/spiral.1 deleted file mode 100644 index 300eaada..00000000 --- a/local/man/cat.1/spiral.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - spiral - draws moving circular spiral patterns - -SSYYNNOOPPSSIISS - ssppiirraall [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-count _i_n_t_e_g_e_r] - - -DDEESSCCRRIIPPTTIIOONN - The _s_p_i_r_a_l program draws moving circular spiral patterns - -OOPPTTIIOONNSS - _s_p_i_r_a_l accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors are chosen randomly. - - --ccoouunntt _i_n_t_e_g_e_r - Default 40. - - --ccyycclleess _i_n_t_e_g_e_r - Default 350. - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1994 by Darrick Brown. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - -AAUUTTHHOORR - Darrick Brown, 1994. - - Improved by Peter Schmitzberger , - 24-Jul-95. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/starfish.1 b/local/man/cat.1/starfish.1 deleted file mode 100644 index 75aad184..00000000 --- a/local/man/cat.1/starfish.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - starfish - radially-symmetric throbbing colormap-hacking - graphics demo - -SSYYNNOOPPSSIISS - ssttaarrffiisshh [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground - _c_o_l_o_r] [-background _c_o_l_o_r] [-window] [-root] [-mono] - [-install] [-visual _v_i_s_u_a_l] [-delay _u_s_e_c_s] [-delay2 _s_e_c_s] - [-cycle-delay2 _u_s_e_c_s] [-thickness _p_i_x_e_l_s] [-rotation - _d_e_g_r_e_e_s] [-duration _s_e_c_o_n_d_s] [-colors _i_n_t] [-cycle] - [-no-cycle] [-blob] [-no-blob] - -DDEESSCCRRIIPPTTIIOONN - The _s_t_a_r_f_i_s_h program draws radially symmetric objects, - which expand, contract, rotate, and turn inside out. It - uses these shapes to lay down a field of smooth colors, - and then rotates the colormap. - -OOPPTTIIOONNSS - _s_t_a_r_f_i_s_h accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How much of a delay should be introduced between - steps of the animation. Default 10000, or about - 1/100th second. - - --ccyyccllee--ddeellaayy _m_i_c_r_o_s_e_c_o_n_d_s - How long to wait between shifing the colormap by - one step. Default 100000, or about 1/10th second. - - --tthhiicckknneessss _p_i_x_e_l_s - How wide each color band should be. Default 0, - meaning random (the chosen value will be between 0 - and 15.) - - --rroottaattiioonn _d_e_g_r_e_e_s - How quickly the objects should rotate at each - step. Default 0, meaning random (the chosen value - - - -X Version 11 14-Jun-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - will be between 0 and 12 degrees.) - - --ccoolloorrss _i_n_t - How many colors to use. Default 200. The more - colors, the smoother the transitions will be, and - the nicer the resultant images. - - --ccyyccllee - - --nnoo--ccyyccllee - Whether to do colormap cycling. Default true. - - --dduurraattiioonn _s_e_c_o_n_d_s - How long to run before choosing a new shape. - Default 30 seconds. - - --ddeellaayy22 _s_e_c_o_n_d_s - When _d_u_r_a_t_i_o_n expires, how long to wait before - starting a new run. Default 5 seconds. - - --bblloobb - - --nnoo--bblloobb - If _b_l_o_b option is specified, then the raw shapes - will be shown, instead of a field of colors gener- - ated from them. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 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. - -AAUUTTHHOORR - Jamie Zawinski , 14-Jun-97. - - - - - - -X Version 11 14-Jun-97 2 - - diff --git a/local/man/cat.1/strange.1 b/local/man/cat.1/strange.1 deleted file mode 100644 index e30c934d..00000000 --- a/local/man/cat.1/strange.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - strange - draws strange attractors - -SSYYNNOOPPSSIISS - ssttrraannggee [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - - -DDEESSCCRRIIPPTTIIOONN - The _s_t_r_a_n_g_e program draws strange attractors - -OOPPTTIIOONNSS - _s_t_r_a_n_g_e accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 64. The colors are chosen randomly. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1997 by Massimino Pascal. - - Permission to use, copy, modify, and distribute this soft- - ware 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 - - - -X Version 11 10-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - documentation. - -AAUUTTHHOORR - Massimino Pascal , 1997. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 10-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 10-May-97 2 - - diff --git a/local/man/cat.1/swirl.1 b/local/man/cat.1/swirl.1 deleted file mode 100644 index aba7c706..00000000 --- a/local/man/cat.1/swirl.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - swirl - draws swirly color-cycling patterns - -SSYYNNOOPPSSIISS - sswwiirrll [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] [-ncolors _i_n_t_e_g_e_r] [-delay _m_i_c_r_o_s_e_c_o_n_d_s] - [-cycles _i_n_t_e_g_e_r] [-count _i_n_t_e_g_e_r] - - -DDEESSCCRRIIPPTTIIOONN - The _s_w_i_r_l program draws swirly color-cycling patterns. - -OOPPTTIIOONNSS - _s_w_i_r_l accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - - --nnccoolloorrss _i_n_t_e_g_e_r - How many colors should be used (if possible). - Default 200. - - --ccyycclleess _i_n_t_e_g_e_r - - - --ccoouunntt _i_n_t_e_g_e_r - - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1), xxlloocckk(1) - - - - - -X Version 11 13-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1994 M. Dobie. - - Permission to use, copy, modify, and distribute this soft- - ware 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. - - -AAUUTTHHOORR - M.Dobie , 1994. - - Ability to run standalone or with _x_s_c_r_e_e_n_s_a_v_e_r added by - Jamie Zawinski , 13-May-97. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 13-May-97 2 - - diff --git a/local/man/cat.1/xroger.1 b/local/man/cat.1/xroger.1 deleted file mode 100644 index c993bc8f..00000000 --- a/local/man/cat.1/xroger.1 +++ /dev/null @@ -1,132 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - xroger - throbbing X logo, of a sort - -SSYYNNOOPPSSIISS - xxrrooggeerr [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-foreground _c_o_l_o_r] - [-background _c_o_l_o_r] [-window] [-root] [-mono] [-install] - [-visual _v_i_s_u_a_l] - -DDEESSCCRRIIPPTTIIOONN - The _x_r_o_g_e_r program displays a replacement for the X logo - with a more accurate Look and Feel. - -OOPPTTIIOONNSS - _x_r_o_g_e_r accepts the following options: - - --wwiinnddooww Draw on a newly-created window. This is the - default. - - --rroooott Draw on the root window. - - --mmoonnoo If on a color display, pretend we're on a - monochrome display. - - --iinnssttaallll - Install a private colormap for the window. - - --vviissuuaall _v_i_s_u_a_l - 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. - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -BBUUGGSS - It should also drip blood while making a horrible screech- - ing noise. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992, 1993 by Jamie Zawinski. Permission to - use, copy, modify, distribute, and sell this software and - its documentation for any purpose is hereby granted with- - out fee, provided fnord that the above copyright notice - appear in all copies and that both that copyright notice - and this permission notice appear in supporting documenta- - tion. No representations are made about the suitability - - - -X Version 11 22-mar-93 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - of fnord this software for any purpose. It is provided - "as is" without express or fnord implied warranty. - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 22-mar-93 2 - - diff --git a/local/man/cat.1/xscreensaver-command.1 b/local/man/cat.1/xscreensaver-command.1 deleted file mode 100644 index 60013404..00000000 --- a/local/man/cat.1/xscreensaver-command.1 +++ /dev/null @@ -1,198 +0,0 @@ - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - xscreensaver-command - control a running xscreensaver pro- - cess - -SSYYNNOOPPSSIISS - xxssccrreeeennssaavveerr--ccoommmmaanndd [-help] [-demo] [-activate] [-deacti- - vate] [-lock] [-cycle] [-next] [-prev] [-exit] [-restart] - [-version] [-time] - -DDEESSCCRRIIPPTTIIOONN - The _x_s_c_r_e_e_n_s_a_v_e_r_-_c_o_m_m_a_n_d program controls a running - _x_s_c_r_e_e_n_s_a_v_e_r process by sending it client-messages. - -OOPPTTIIOONNSS - _x_s_c_r_e_e_n_s_a_v_e_r_-_c_o_m_m_a_n_d accepts the following options: - - --hheellpp Prints a brief summary of command-line options. - - --ddeemmoo Cause the screensaver to enter its interactive - demo mode, in which one can experiment with the - various graphics hacks available. See xxssccrreeeenn-- - ssaavveerr(1) for details. - - --aaccttiivvaattee - Tell the screensaver to turn on immediately (that - is, pretend that the user been idle for long - enough.) It will turn off as soon as there is any - user activity, as usual. - - It is useful to run this from a menu; you may wish - to run it as - - sleep 5 ; xscreensaver-command -activate - - to be sure that you have time to remove your hand - from the mouse before the screensaver comes on. - - --ddeeaaccttiivvaattee - Tell the screensaver to turn off, as if there had - been user activity. If locking is enabled, then - the screensaver will prompt for a password as - usual. - - --lloocckk Like _-_a_c_t_i_v_a_t_e, but a password will be required - before the screensaver turns off, even if the - screensaver's _l_o_c_k resource is false. The display - will be locked immediately even if the screen- - saver's _l_o_c_k_T_i_m_e_o_u_t resource is non-zero. - - --ccyyccllee Tell the screensaver to change which graphics hack - it is running, just as if the ``cycle'' timer had - expired. A new hack will be chosen randomly. - - --nneexxtt This is like either _-_a_c_t_i_v_a_t_e or _-_c_y_c_l_e, depending - - - -X Version 11 31-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - on which is more appropriate, except that the - screenhack that will be run is the next one in the - list of programs, instead of a randomly-chosen - one. Repeatedly executing this will cycle through - each hack in turn (though using the _-_d_e_m_o option - is probably an easier way to accomplish that.) - - --pprreevv This is like _-_n_e_x_t, but cycles in the other direc- - tion. - - --eexxiitt Causes the screensaver process to exit gracefully. - This is a safer and easier way to kill the screen- - saver than by using _k_i_l_l. - - WWaarrnniinngg:: never use _k_i_l_l _-_9 with _x_s_c_r_e_e_n_s_a_v_e_r while - the screensaver is active. If you are using a - virtual root window manager, that can leave things - in an inconsistent state, and you may need to - restart your window manager to repair the damage. - - --rreessttaarrtt - Causes the screensaver process to exit and then - restart with the same command line arguments. - This is a good way of causing the screensaver to - re-read the resource database. - - If the screensaver is run from _x_d_m_(_1_) (that is, it - is already running before you log in) then you may - want to issue the ``restart'' command from one of - your startup scripts, so that the screensaver gets - your resource settings instead of the default - ones. - - --vveerrssiioonn - Print (on stdout) the version number of the - xscreensaver program that is running on $DISPLAY. - (To see the version number of _x_s_c_r_e_e_n_s_a_v_e_r_-_c_o_m_m_a_n_d - itself, use the _-_h_e_l_p option.) - - --ttiimmee This option prints on stdout the time at which the - screensaver last activated (blanked the screen) or - deactivated (restored the screen.) Note that the - activation-time is not the last time at which the - user was active, but is some time later (it is the - time at which either: xscreensaver decided that - the user has been idle long enough; or, the user - explicitly activated the screensaver or locker.) - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the host and display number of the screen - whose saver is to be manipulated. - - PPAATTHH to find the executable to restart (for the - _-_r_e_s_t_a_r_t command). Note that this variable is - - - -X Version 11 31-May-97 2 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - consulted in the environment of the _x_s_c_r_e_e_n_s_a_v_e_r - process, not the _x_s_c_r_e_e_n_s_a_v_e_r_-_c_o_m_m_a_n_d process. - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr(1) - -BBUUGGSS - Some diagnostics are reported on the stderr of the - _x_s_c_r_e_e_n_s_a_v_e_r process, not this process, so the caller of - _x_s_c_r_e_e_n_s_a_v_e_r_-_c_o_m_m_a_n_d may not see the error messages. - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1992, 1993, 1997 by Jamie Zawinski. Permis- - sion to use, copy, modify, distribute, and sell this soft- - ware 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 pro- - vided "as is" without express or implied warranty. - -AAUUTTHHOORR - Jamie Zawinski , 13-aug-92. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X Version 11 31-May-97 3 - - diff --git a/local/man/cat.1/xscreensaver.1 b/local/man/cat.1/xscreensaver.1 deleted file mode 100644 index bca55603..00000000 --- a/local/man/cat.1/xscreensaver.1 +++ /dev/null @@ -1,990 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - -NNAAMMEE - xscreensaver - graphics hack and screen locker, launched - when the user is idle - -SSYYNNOOPPSSIISS - xxssccrreeeennssaavveerr [-display _h_o_s_t_:_d_i_s_p_l_a_y_._s_c_r_e_e_n] [-timeout _i_n_t] - [-cycle _i_n_t] [-nice _i_n_t] [-lock] [-no-lock] [-lock-timeout - _i_n_t] [-demo] [-visual _v_i_s_u_a_l] [-install] [-no-install] - [-verbose] [-silent] [-xidle-extension] [-no-xidle-exten- - sion] [-sgi-extension] [-no-sgi-extension] [-mit-exten- - sion] [-no-mit-extension] [-xrm _r_e_s_o_u_r_c_e_s] - -DDEESSCCRRIIPPTTIIOONN - The _x_s_c_r_e_e_n_s_a_v_e_r program waits until the keyboard and - mouse have been idle for a period, and then runs a graph- - ics demo chosen at random. It turns off as soon as there - is any mouse or keyboard activity. - - This program can lock your terminal in order to prevent - others from using it, though its default mode of operation - is merely to display pretty pictures on your screen when - it is not in use. - - The benefit that this program has over the combination of - the xxlloocckk(1) and xxaauuttoolloocckk(1) 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. - -OOPPTTIIOONNSS - _x_s_c_r_e_e_n_s_a_v_e_r accepts the following command line options: - - --ttiimmeeoouutt _m_i_n_u_t_e_s - The screensaver will activate after the keyboard - and mouse have been idle for this many minutes. - Default 10. - - --ccyyccllee _m_i_n_u_t_e_s - After the screensaver has been running for this - many minutes, the currently running graphics hack - sub-process will be killed (with SSIIGGTTEERRMM), and a - new one started. If this is 0, then the graphics - hack will not be changed: only one demo will run - until the screensaver is deactivated by user - activity. Default 10. - - --nniiccee _i_n_t_e_g_e_r - The sub-processes created by _x_s_c_r_e_e_n_s_a_v_e_r will be - ``niced'' to this level, so that they are given - lower priority than other processes on the system, - and don't increase the load unnecessarily. The - default is 20. - - (Higher numbers mean lower priority; see nniiccee(1) - - - -X Version 11 31-May-97 1 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - for details.) - - --lloocckk Enable locking: before the screensaver will turn - off, it requires you to type the password of the - person who launched the screensaver, or the root - password. (Note: this doesn't work if the screen- - saver is launched by xxddmm(1) because it can't know - the user-id of the logged-in user.) - - --nnoo--lloocckk - Disable locking. This is the default. - - --lloocckk--ttiimmeeoouutt _m_i_n_u_t_e_s - This is how long after the screensaver activates - that locking is enabled. For example, if this is - 5, and _-_t_i_m_e_o_u_t is 10, then after 10 minutes, the - screen would blank. If there was user activity at - 12 minutes, no password would be required. But, - if there was user activity at 15 minutes or later - (_-_l_o_c_k_-_t_i_m_e_o_u_t minutes after activation) then a - password would be required. The default is 0, - meaning that if locking is enabled, then a pass- - word will be required as soon as the screensaver - activates. - - --ddeemmoo Enter the interactive demo mode immediately after - startup. Normally demo mode is invoked via the - xxssccrreeeennssaavveerr--ccoommmmaanndd(1) program, but this is a - shortcut for new users. See below for a descrip- - tion of how demo-mode works. - - --vviissuuaall _v_i_s_u_a_l - Specify which X visual to use by default. Legal - values are: - - ddeeffaauulltt Use the screen's default visual (the - visual of the root window.) This is the - default. - - bbeesstt 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. - - mmoonnoo Use a monochrome visual, if there is one. - - ggrraayy Use a grayscale or staticgray visual, if - there is one and it has more than one - plane (that is, it's not monochrome.) - - ccoolloorr Use the best of the color visuals, if - there are any. - - - - -X Version 11 31-May-97 2 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - _c_l_a_s_s where _c_l_a_s_s is one - - of SSttaattiiccGGrraayy, SSttaattiiccCCoolloorr, TTrruueeCCoolloorr, - GGrraayySSccaallee, PPsseeuuddooCCoolloorr, or DDiirreeccttCCoolloorr. - Selects the deepest visual of the given - class. - - _n_u_m_b_e_r where _n_u_m_b_e_r (decimal or hex) is inter- - preted as a visual id number, as reported - by the xxddppyyiinnffoo(1) program; in this way - you can have finer control over exactly - which visual gets used, for example, to - select a shallower one than would other- - wise have been chosen. - - Note that this option specifies only the _d_e_f_a_u_l_t - visual that will be used: the visual used may be - overridden on a program-by-program basis. See the - description of the pprrooggrraammss resource, below. - - --iinnssttaallll - 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 pos- - sible. 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.) - - --nnoo--iinnssttaallll - Use the default colormap. - - --vveerrbboossee - Print diagnostics. - - --ssiilleenntt - - --xxiiddllee--eexxtteennssiioonn - Use the XXIIDDLLEE server extension to decide whether - the user is idle. This is the default if _x_s_c_r_e_e_n_- - _s_a_v_e_r has been compiled with support for this - extension. On X11R4 or X11R5 systems, the XIdle - method is faster and more reliable than what will - be done otherwise, so use it if you can. - - --nnoo--xxiiddllee--eexxtteennssiioonn - Don't use the XXIIDDLLEE server extension. - - --ssggii--eexxtteennssiioonn - Use the SGI SSCCRREEEENN__SSAAVVEERR server extension to - decide whether the user is idle. This is the - default if _x_s_c_r_e_e_n_s_a_v_e_r has been compiled with - support for this extension (which is the default - on SGI systems.). If it is available, the - - - -X Version 11 31-May-97 3 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - SSCCRREEEENN__SSAAVVEERR method is faster and more reliable - than what will be done otherwise, so use it if you - can. - - --nnoo--ssggii--eexxtteennssiioonn - Don't use the SGI SSCCRREEEENN__SSAAVVEERR server extension. - - --mmiitt--eexxtteennssiioonn - Use the MMIITT--SSCCRREEEENN--SSAAVVEERR server extension to - decide whether the user is idle. This is the - default if _x_s_c_r_e_e_n_s_a_v_e_r has been compiled with - support for this extension. However, this exten- - sion is flaky, so it's use is not really recom- - mended. (It also makes the _f_a_d_e option not work - properly.) - - --nnoo--mmiitt--eexxtteennssiioonn - Don't use the MMIITT--SSCCRREEEENN--SSAAVVEERR server extension. - -XX RREESSOOUURRCCEESS - _x_s_c_r_e_e_n_s_a_v_e_r understands the following resources: - - - ttiimmeeoouutt (class TTiimmee) - Same as the _-_t_i_m_e_o_u_t command-line option. Default - 10 minutes. - - ccyyccllee (class TTiimmee) - Same as the _-_c_y_c_l_e command-line option. Default - 10 minutes. - - nniiccee (class NNiiccee) - Same as the _-_n_i_c_e command-line option. Default - 10. - - lloocckk (class BBoooolleeaann) - Same as the _-_l_o_c_k command-line option. - - lloocckkTTiimmeeoouutt (class TTiimmee) - Same as the _-_l_o_c_k_-_t_i_m_e_o_u_t command-line option. - - ppaasssswwddTTiimmeeoouutt (class TTiimmee) - If the screen is locked, then this is how many - seconds the password dialog box should be left on - the screen before giving up (default 30.) This - should not be too large: the X server is grabbed - for the duration that the password dialog box is - up (for security purposes) and leaving the server - grabbed for too long can cause problems. - - vveerrbboossee (class BBoooolleeaann) - Same as the _-_v_e_r_b_o_s_e command-line option. - - - - - -X Version 11 31-May-97 4 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - xxiiddllee (class BBoooolleeaann) - Same as the _-_x_i_d_l_e command-line option. - - ffaaddee (class BBoooolleeaann) - If this is true, then when the screensaver acti- - vates, the current contents of the screen will - fade to black instead of simply winking out. This - only works on displays with writable colormaps, - that is, if the screen's default visual is a Pseu- - doColor visual. Default true. A fade will also - be done when switching graphics hacks (when the - _c_y_c_l_e timer expires.) - - uunnffaaddee (class BBoooolleeaann) - If this is true, then when the screensaver deacti- - vates, the original contents of the screen will - fade in from black instead of appearing immedi- - ately. This only works on displays with writable - colormaps, and if _f_a_d_e is true as well. Default - false. - - ffaaddeeSSeeccoonnddss (class TTiimmee) - If _f_a_d_e is true, this is how long the fade will be - in seconds (default 3.) - - ffaaddeeTTiicckkss (class IInntteeggeerr) - If _f_a_d_e is true, this is how many times a second - the colormap will be changed to effect a fade. - Higher numbers yield smoother fades, but may make - the fades take longer than the specified _f_a_d_e_S_e_c_- - _o_n_d_s if your server isn't fast enough to keep up. - Default 20. - - vviissuuaallIIDD (class VViissuuaallIIDD) - Same as the _-_v_i_s_u_a_l command-line option. Default - ddeeffaauulltt. - - iinnssttaallllCCoolloorrmmaapp (class BBoooolleeaann) - Same as the _-_i_n_s_t_a_l_l command-line option. Default - true. - - ccaappttuurreeSSttddeerrrr (class BBoooolleeaann) - Whether _x_s_c_r_e_e_n_s_a_v_e_r should redirect its standard- - error stream to the window itself. Since its - nature is to take over the screen, you would not - normally see error messages generated by the - screensaver or the programs it runs; this resource - will cause the output of all relevant programs to - be drawn on the screensaver window itself instead - of written to the controlling terminal of the - screensaver driver process. Default true. - - ccaappttuurreeSSttddoouutt (class BBoooolleeaann) - Like ccaappttuurreeSSttddeerrrr but for the standard-output - - - -X Version 11 31-May-97 5 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - stream. Default true. - - ffoonntt (class FFoonntt) - The font used for the stdout/stderr text, if ccaapp-- - ttuurreeSSttddoouutt or ccaappttuurreeSSttddeerrrr are true. Default - **--mmeeddiiuumm--rr--**--114400--**--mm--** (a 14 point fixed-width - font.) - - tteexxttFFoorreeggrroouunndd (class FFoorreeggrroouunndd) - The foreground color used for the stdout/stderr - text, if ccaappttuurreeSSttddoouutt or ccaappttuurreeSSttddeerrrr are true. - Default: Yellow. - - tteexxttBBaacckkggrroouunndd (class BBaacckkggrroouunndd) - The background color used for the stdout/stderr - text, if ccaappttuurreeSSttddoouutt or ccaappttuurreeSSttddeerrrr are true. - Default: Black. - - pprrooggrraammss (class PPrrooggrraammss) - The graphics hacks which _x_s_c_r_e_e_n_s_a_v_e_r runs when - the user is idle. The value of this resource is a - string, one _s_h-syntax command per line. Each line - must contain exactly one command -- no semicolons, - no ampersands. - - When the screensaver starts up, one of these is - selected at random, and run. After the _c_y_c_l_e - period expires, it is killed, and another is - selected and run. - - If the value of this resource is empty, then no - programs will be run; the screen will simply be - made black. - - If the display has multiple screens, then a dif- - ferent program will be run for each screen. - - Note that you must escape the newlines; here is an - example of how you might set this in your _._X_d_e_- - _f_a_u_l_t_s file: - - xscreensaver.programs: \ - qix -root \n\ - ico -r -faces -sleep 1 -obj ico \n\ - xdaliclock -builtin2 -root \n\ - xv -root -rmode 5 image.gif -quit \n - - To use a program as a screensaver, two things are - required: that that program draw on the root win- - dow (or be able to be configured to draw on the - root window); and that that program understand - ``virtual root'' windows, as used by virtual win- - dow managers such as _t_v_t_w_m. (Generally, this is - accomplished by just including the _"_v_r_o_o_t_._h_" - - - -X Version 11 31-May-97 6 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - header file in the program's source.) - - If there are some programs that you want to run - only when using a color display, and others that - you want to run only when using a monochrome dis- - play, you can specify that like this: - - mono: mono-program -root \n\ - color: color-program -root \n\ - - More generally, you can specify the kind of visual - that should be used for the window on which the - program will be drawing. For example, if one pro- - gram works best if it has a colormap, but another - works best if it has a 24-bit visual, both can be - accomidated: - - PseudoColor: cmap-program -root \n\ - TrueColor: 24bit-program -root \n\ - - (This sort of thing used to be accomplished with - the _c_o_l_o_r_P_r_o_g_r_a_m_s and _m_o_n_o_P_r_o_g_r_a_m_s resources, but - those resources have now been removed; a warning - will be issued if they are used.) - - 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 arrange for appropriate - hacks to be run on each. For example, if one - screen is color and the other is monochrome, hacks - that look good in mono can be run on one, and - hacks that only look good in color will show up on - the other. - - - Normally you won't need to change the following resources: - - bboouurrnneeSShheellll (class BBoouurrnneeSShheellll) - The pathname of the shell that _x_s_c_r_e_e_n_s_a_v_e_r uses - to start subprocesses. This must be whatever your - local variant of //bbiinn//sshh is -- in particular, it - must not be ccsshh. - - wwiinnddoowwCCrreeaattiioonnTTiimmeeoouutt (class TTiimmee) - When server extensions are not in use, this con- - trols the delay between when windows are created - and when _x_s_c_r_e_e_n_s_a_v_e_r selects events on them. - Default 30 seconds. - - ppooiinntteerrPPoollllTTiimmee (class TTiimmee) - When server extensions are not in use, this con- - trols how frequently _x_s_c_r_e_e_n_s_a_v_e_r checks to see if - - - -X Version 11 31-May-97 7 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - the mouse position or buttons have changed. - Default 5 seconds. - - iinniittiiaallDDeellaayy (class TTiimmee) - When server extensions are not in use, _x_s_c_r_e_e_n_- - _s_a_v_e_r will wait this many seconds before selecting - events on existing windows, under the assumption - that _x_s_c_r_e_e_n_s_a_v_e_r is started during your login - procedure, and the window state may be in flux. - Default 30 seconds. - - oovveerrllaayySSttddeerrrr (class BBoooolleeaann) - If ccaappttuurreeSSttddeerrrr or ccaappttuurreeSSttddoouutt are True, and - your server supports ``overlay'' visuals, then the - text will be written into one of the higher layers - instead of into the same layer as the running - screenhack. Set this to False to disable that - (though you shouldn't need to.) - -HHOOWW IITT WWOORRKKSS - When it is time to activate the screensaver, a full-screen - black window is created on each screen of the display. - The window or windows is given the appropriate properties - so that, to any subsequently-created programs, it will - appear to be a ``virtual root'' window. Because of this, - any program which draws on the root window (and which - understands virtual roots) can be used as a screensaver. - - When the user becomes active again, the screensaver win- - dows are unmapped and the running subprocesses are killed - by sending them SSIIGGTTEERRMM. This is also how the subpro- - cesses are killed when the screensaver decides that it's - time to run a different demo: the old one is killed and a - new one is launched. - - Before launching a subprocess, _x_s_c_r_e_e_n_s_a_v_e_r stores an - appropriate value for $$DDIISSPPLLAAYY in the environment that the - child will recieve. (This is so that if you start - _x_s_c_r_e_e_n_s_a_v_e_r with a _-_d_i_s_p_l_a_y argument, the programs which - _x_s_c_r_e_e_n_s_a_v_e_r launches will draw on the same display; and - so that the child will end up drawing on the appropriate - screen of a multi-headed display.) - - When the screensaver turns off, or is killed, care is - taken to restore the ``real'' virtual root window if there - is one. Because of this, it is important that you not - kill the screensaver process with _k_i_l_l _-_9 if you are run- - ning a virtual-root window manager. If you kill it with - -9, you may need to restart your window manager to repair - the damage. This isn't an issue if you aren't running a - virtual-root window manager. - - For all the gory details, see the commentary at the top of - xscreensaver.c. - - - -X Version 11 31-May-97 8 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - You can control a running screensaver process by using the - xxssccrreeeennssaavveerr--ccoommmmaanndd(1) program (which see.) - -UUSSIINNGG XXDDMM((11)) - You can run _x_s_c_r_e_e_n_s_a_v_e_r from your xdm session, so that - the screensaver will run even when nobody is logged in on - the console. Simply add ""xxssccrreeeennssaavveerr &&"" to your - _/_u_s_r_/_l_i_b_/_X_1_1_/_x_d_m_/_X_s_e_t_u_p file. Because _x_d_m grabs the key- - board, keypresses will not make the screensaver deacti- - vate, but any mouse activity will. - - (If your system does not seem to be executing the _X_s_e_t_u_p - file, you may need to configure it to do so -- the tradi- - tional way to do this is to make that file the value of - the _D_i_s_p_l_a_y_M_a_n_a_g_e_r_*_s_e_t_u_p resource in the _x_d_m_-_c_o_n_f_i_g file. - See the man page for xxddmm(1) for more details.) - - Users may want to add ""xxssccrreeeennssaavveerr--ccoommmmaanndd --rreessttaarrtt"" to - their startup scripts, so that the screensaver will be - reinitialized with their private resource settings when - they log in. - - It is safe to run this program as root (as _x_d_m is likely - to do.) If run as root, _x_s_c_r_e_e_n_s_a_v_e_r changes its effec- - tive user and group ids to something safe (like _"_n_o_b_o_d_y_") - before connecting to the X server or launching user-speci- - fied programs. - - Locking doesn't work if the screensaver is launched by - _x_d_m. To get around this, you can run the screensaver from - _x_d_m without locking, and kill and restart it from your - personal X startup script to enable locking; for example: - - xscreensaver-command -exit ; xscreensaver - - -DDEEMMOO MMOODDEE - If _x_s_c_r_e_e_n_s_a_v_e_r receives the DDEEMMOO ClientMessage, which is - done by running the xxssccrreeeennssaavveerr--ccoommmmaanndd program with the - --ddeemmoo option, the screensaver will black the screen and - pop up a dialog box from which you can examine and experi- - ment 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 pro- - gram 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- - - - -X Version 11 31-May-97 9 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - time changes and won't be remembered; to make the changes - permanent, you need to edit your X resource file.) - - The buttons are: - - RRuunn NNeexxtt - 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. - - RRuunn PPrreevviioouuss - Opposite of Run Next; at the top, it scrolls - around to the bottom. - - EEddiitt PPaarraammeetteerrss - 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 _x_s_c_r_e_e_n_s_a_v_e_r process; to - make the changes permanent, you need to edit your - X resource file. - - EExxiitt DDeemmoo MMooddee - Returns to normal screensaver operation. - - RReeiinniittiiaalliizzee - 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 _-_r_e_s_t_a_r_t argu- - ment to xxssccrreeeennssaavveerr--ccoommmmaanndd(1) except that when - executed from this button, the screensaver will - automatically return to demo mode after restart- - ing. - -BBUUGGSS - (This is not a bug, but) note that as of release 1.32, the - ccoolloorrPPrrooggrraammss and mmoonnooPPrrooggrraammss resources are no longer - used: they have been supplanted by the extended syntax of - the pprrooggrraammss resource (see above.) - - Extensions - If you are not making use of one of the server - extensions (XXIIDDLLEE, SSCCRREEEENN__SSAAVVEERR, or MMIITT--SSCCRREEEENN-- - SSAAVVEERR), then it is possible, in rare situations, - for _x_s_c_r_e_e_n_s_a_v_e_r to interfere with event propaga- - tion and make another X program malfunction. For - this to occur, that other application would need - to _n_o_t select KKeeyyPPrreessss events on its non-leaf win- - dows within the first 30 seconds of their - - - -X Version 11 31-May-97 10 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - existence, but then select for them later. In - this case, that client _m_i_g_h_t fail to receive those - events. This isn't very likely, since programs - generally select a constant set of events immedi- - ately 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 shortcom- - ing in the X protocol. - - Machine Load - Although this program ``nices'' the subprocesses - that it starts, graphics-intensive subprograms can - still overload the machine by causing the X server - process itself (which is not ``niced'') to suck a - lot of cycles. Care should be taken to slow down - programs intended for use as screensavers by - inserting strategic calls to sslleeeepp(3) or uusslleeeepp(3) - (or making liberal use of any _-_d_e_l_a_y options which - the programs may provide.) - - Also, an active screensaver will cause your X - server to be pretty much permanently swapped in; - but the same is true of any program that draws - periodically, like xxcclloocckk(1) or xxllooaadd(1). - - Latency and Responsiveness - If the subprocess is drawing too quickly and the - connection to the X server is a slow one (such as - an X terminal running over a phone line) then the - screensaver might not turn off right away when the - user becomes active again (the iiccoo(1) demo has - this problem if being run in full-speed mode). - This can be alleviated by inserting strategic - calls to XXSSyynncc(3) in code intended for use as a - screensaver. This prevents too much graphics - activity from being buffered up. - - Locking and XDM - Locking doesn't work if the screensaver is - launched by _x_d_m. The reason for this is that when - it is launched by _x_d_m, the screensaver process is - owned by some standard user id (such as _r_o_o_t or - _d_a_e_m_o_n) instead of the user who is logged in on - the console: because the screensaver was started - _b_e_f_o_r_e anyone was logged in. In order for the - screensaver to prompt for the password of the per- - son who had logged in from _x_d_m, it would need to - know who that user was, and there is no reliable - and safe way to figure that out. (And even if - there was, there would be some other security - issues here as well.) - - So if you want to use it as a locker, you must - - - -X Version 11 31-May-97 11 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - start it with your user id. If it has already - been started by _x_d_m, you can kill it with xxssccrreeeenn-- - ssaavveerr--ccoommmmaanndd --eexxiitt, and then start it again as - you. - - Passwords - If you get an error message like ``couldn't get - password of _u_s_e_r'' then this probably means that - you're on a system in which the ggeettppwweenntt(3) - library routine can only be effectively used by - root. If this is the case, then _x_s_c_r_e_e_n_s_a_v_e_r must - be installed as setuid to root. Care has been - taken to make this a safe thing to do. - - It also may mean that your system uses shadow - passwords instead of the standard _g_e_t_p_w_e_n_t inter- - face; in that case, you may need to change some - options in _c_o_n_f_i_g_._h and recompile. - - TWM and Colormaps - The iinnssttaallllCCoolloorrmmaapp option doesn't work very well - with the ttwwmm(1) window manager and its descen- - dants. - - There is a race condition between the screensaver - and this window manager, which can result in the - screensaver's colormap not getting installed prop- - erly, meaning the graphics hacks will appear in - essentially random colors. (If the screen goes - white instead of black, this is probably why.) - - The mmwwmm(1) and oollwwmm(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, ttwwmm responds to - the CCoolloorrmmaappNNoottiiffyy event that is generated by re- - instaling the default colormap. Apparently, ttwwmm - doesn't _a_l_w_a_y_s do this; it seems to do it regu- - larly if the screensaver is activated from a menu - item, but seems to not do it if the screensaver - comes on of its own volition, or is activated from - another console. Any thoughts on this problem are - welcome... - - XView Clients - Apparently there are some problems with XView pro- - grams getting confused and thinking that the - screensaver window is the real root window even - when the screensaver is not active: ClientMessages - intended for the window manager are sent to the - - - -X Version 11 31-May-97 12 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - 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. - - MIT Extension and Fading - When using the MMIITT--SSCCRREEEENN--SSAAVVEERR extension in con- - junction with the ffaaddee option, you may notice an - unattractive flicker just before the fade begins. - This is because the server maps a black window - just before it tells the _x_s_c_r_e_e_n_s_a_v_e_r process to - activate. The _x_s_c_r_e_e_n_s_a_v_e_r process immediately - unmaps that window, but this results in a flicker. - I haven't figured a way to get around this; it - seems to be a fundamental property of the (mis-) - design of this server extension. - - LessTif (Motif Clone) - Rumor has it that demo mode is buggy if XScreen- - Saver was compiled with the GNU LessTif reimple- - mentation 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. - - Red Hot Lava - There need to be a lot more graphics hacks. In - particular, there should be a simulation of a - Lavalite (tm). - -EENNVVIIRROONNMMEENNTT - DDIISSPPLLAAYY to get the default host and display number, and to - inform the sub-programs of the screen on which to - draw. - - XXEENNVVIIRROONNMMEENNTT - to get the name of a resource file that overrides - the global resources stored in the RESOURCE_MAN- - AGER property. - -UUPPGGRRAADDEESS - The latest version can always be found at http://peo- - ple.netscape.com/jwz/xscreensaver/ - -SSEEEE AALLSSOO - XX(1), xxssccrreeeennssaavveerr--ccoommmmaanndd(1), xxlloocckk(1), xxnnlloocckk(1), xxaauu-- - ttoolloocckk(1), xxddmm(1), aattttrraaccttiioonn(1), ggrreeyynneettiicc(1), hheelliixx(1), - hhooppaalloonngg(1), nnoosseegguuyy(1), ppyyrroo(1), xxrrooggeerr(1), qqiixx(1), - rroocckkss(1), rroorrsscchhaacchh(1), bblliittssppiinn(1), iimmssmmaapp(1), - sslliiddeessccrreeeenn(1), ddeeccaayyssccrreeeenn(1), mmaazzee(1), hhyyppeerrccuubbee(1), - hhaalloo(1), ffllaammee(1), ppeeddaall(1), llmmoorrpphh(1), ddeeccoo(1), mmooiirree(1), - kkaalleeiiddeessccooppee(1), bbuubbbblleess(1), lliigghhttnniinngg(1), ssttrraannggee(1), - - - -X Version 11 31-May-97 13 - - - - - -XScreenSaver(1) XScreenSaver(1) - - - ffrraacctt(1), ssppiirraall(1), llaasseerr(1), ggrraavv(1), ddrriifftt(1), iiffss(1), - jjuulliiaa(1), ppeennrroossee(1), ssiieerrppiinnsskkii(1), hhooppaalloonngg(1), - bbrraaiidd(1), bboouubboouullee(1), ggaallaaxxyy(1), ffllaagg(1), ffoorreesstt(1), - sspphheerree(1), lliissaa(1), xxddaalliicclloocckk(1), xxbboouunncceebbiittss(1), iiccoo(1), - xxsswwaarrmm(1), xxwwaavvee(1), xxvv(1), xxttaaccyy(1), bboonnggoo(1), xxffiisshh-- - ttaannkk(1) - -CCOOPPYYRRIIGGHHTT - Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997 by - Jamie Zawinski. Permission to use, copy, modify, dis- - tribute, 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. - -AAUUTTHHOORR - Jamie Zawinski . Written in late 1991; - first posted to comp.sources.x on 13-Aug-1992. - - Please let me know if you find any bugs or make any - improvements. - - Thanks to David Wojtowicz for implementing _l_o_c_k_T_i_m_e_o_u_t. - - Thanks to Martin Kraemer for adding support for shadow - passwords and locking-disabled diagnostics. - - Thanks to the many people who have contributed graphics - demos to the package. - - Thanks to Patrick Moreau for the VMS port. - - 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. - - - - - - - - - - - - - - - - - - -X Version 11 31-May-97 14 - - diff --git a/local/man/man.1/attraction.1 b/local/man/man.1/attraction.1 deleted file mode 100644 index 9f5e98f7..00000000 --- a/local/man/man.1/attraction.1 +++ /dev/null @@ -1,178 +0,0 @@ -.de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. -.TH XScreenSaver 1 "14-Jun-97" "X Version 11" -.SH NAME -attraction - interactions of opposing forces -.SH SYNOPSIS -.B attraction -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-threshold \fIint\fP] [\-mode balls | lines | polygons | splines | filled-splines | tails ] [\-size \fIint\fP] [\-segments \fIint\fP] [\-delay \fIusecs\fP] [\-color-shift \fIint\fP] [\-radius \fIint\fP] [\-vx \fIint\fP] [\-vy \fIint\fP] [\-glow] [\-noglow] [\-orbit] [\-viscosity \fIfloat\fP] [\-mouse] [\-no-mouse] [\-mouse-size] -.SH DESCRIPTION -The \fIattraction\fP program has several visually different modes of -operation, all of which are based on the interactions of a set of control -points which attract each other up to a certain distance, and then begin -to repel each other. The attraction/repulsion is proportional to the -distance between any two particles. -.SH OPTIONS -.I attraction -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 \-points integer -How many control points should be used, or 0 to select the number randomly. -Default 0. Between 3 and 15 works best. -.TP 8 -.B \-threshold integer -The distance (in pixels) from each particle at which the attractive force -becomes repulsive. Default 100. -.TP 8 -.B \-mode "balls | lines | polygons | tails | splines | filled-splines" -In \fIballs\fP mode (the default) the control points are drawn as filled -circles. The larger the circle, the more massive the particle. - -In \fIlines\fP mode, the control points are connected by straight lines; -the effect is something like \fIqix\fP. - -In \fIpolygons\fP mode, the control points are connected by straight -lines, and filled in. This is most interesting in color. - -In \fIsplines\fP mode, a closed spline is interpolated from the control -points. - -In \fIfilled-splines\fP mode, the splines are filled in instead of being -outlines. This is most interesting in color. - -In \fItails\fP mode, the path which each particle follows is indicated -by a worm-like trail, whose length is controlled by the \fIsegments\fP -parameter. -.TP 8 -.B \-size integer -The size of the balls in pixels, or 0, meaning to select the sizes -randomly (the default.) If this is specified, then all balls will be -the same size. This option has an effect in all modes, since the ``size'' -of the balls controls their mass. -.TP 8 -.B \-segments integer -If in \fIlines\fP or \fIpolygons\fP mode, how many sets of line segments -or polygons should be drawn. Default 100. This has no effect in \fIballs\fP -mode. If \fIsegments\fP is 0, then no segments will ever be erased (this -is only useful in color.) -.TP 8 -.B \-delay microseconds -How much of a delay should be introduced between steps of the animation. -Default 10000, or about 0.01 seconds. -.TP 8 -.B \-color-shift int -If on a color display, the color of the line segments or polygons will -cycle through the color map. This specifies how many lines will be drawn -before a new color is chosen. (When a small number of colors are available, -increasing this value will yield smoother transitions.) Default 3. -This has no effect in \fIballs\fP mode. -.TP 8 -.B \-radius -The size in pixels of the circle on which the points are initially positioned. -The default is slightly smaller than the size of the window. -.TP 8 -.B \-glow -This is consulted only in \fIballs\fP mode. If this is specified, then -the saturation of the colors of the points will vary according to their -current acceleration. This has the effect that the balls flare brighter -when they are reacting to each other most strongly. - -In \fIglow\fP mode, all of the balls will be drawn the same (random) -color, modulo the saturation shifts. In non-glow mode, the balls will -each be drawn in a random color that doesn't change. -.TP 8 -.B \-noglow -Don't do ``glowing.'' This is the default. -.TP 8 -.B \-vx pixels -.TP 8 -.B \-vy pixels -Initial velocity of the balls. This has no effect in \fB\-orbit\fP mode. -.TP 8 -.B \-orbit -Make the initial force on each ball be tangential to the circle on which -they are initially placed, with the right velocity to hold them in orbit -about each other. After a while, roundoff errors will cause the orbit -to decay. -.TP 8 -.B \-vmult float -In orbit mode, the initial velocity of the balls is multiplied by this; -a number less than 1 will make the balls pull closer together, and a larger -number will make them move apart. The default is 0.9, meaning a slight -inward pull. -.TP 8 -.B \-viscosity float -This sets the viscosity of the hypothetical fluid through which the control -points move; the default is 1, meaning no resistance. Values higher than 1 -aren't interesting; lower values cause less motion. - -One interesting thing to try is -.EX -attraction -viscosity 0.8 -points 75 \\ - -mouse -geometry =500x500 -.EE -Give it a few seconds to settle down into a stable clump, and then move -the mouse through it to make "waves". -.TP 8 -.B \-mouse -This will cause the mouse to be considered a control point; it will not be -drawn, but it will influence the other points, so you can wave the mouse -and influence the images being created. -.TP 8 -.B \-no-mouse -Turns off \fB\-mouse\fP. -.TP 8 -.B \-mouse-size integer -In \fB\-mouse\fP mode, this sets the mass of the mouse (analagously to the -\fB\-size\fP parameter.) -.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 1992, 1993, 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 , 13-aug-92. - -Viscosity and mouse support by Philip Edward Cutone, III. diff --git a/local/man/man.1/blitspin.1 b/local/man/man.1/blitspin.1 deleted file mode 100644 index d7e87d30..00000000 --- a/local/man/man.1/blitspin.1 +++ /dev/null @@ -1,81 +0,0 @@ -.TH XScreenSaver 1 "16-May-97" "X Version 11" -.SH NAME -blitspin - rotate a bitmap in an interesting way -.SH SYNOPSIS -.B blitspin -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-bitmap \fIfilename\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP] -.SH DESCRIPTION -The \fIblitspin\fP program repeatedly rotates a bitmap by 90 degrees by -using logical operations: the bitmap is divided into quadrants, and the -quadrants are shifted clockwise. Then the same thing is done again with -progressively smaller quadrants, except that all sub-quadrants of a -given size are rotated in parallel. So this takes \fBO(16*log2(N))\fP -blits of size NxN, with the limitation that the image must be square, -and the size must be a power of 2. -.SH OPTIONS -.I blitspin -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 \-bitmap \fIfilename\fP -The file name of a bitmap to rotate. It need not be square: it -will be padded with the background color. If unspecified or the -string \fI(default)\fP, a builtin bitmap is used. - -If support for the \fIXPM\fP library was enabled at compile-time, -the specified file may be in \fIXPM\fP format as well as \fIXBM\fP, and -thus may be a color image. - -The \fB*bitmapFilePath\fP resource will be searched if the bitmap -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. -.PP -.TP 8 -.B \-delay microseconds -How long to delay between steps of the rotation process, in microseconds. -Default is 500000, one-half second. -.PP -.TP 8 -.B \-delay2 microseconds -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 ENVIRONMENT -.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 1992, 1993, 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 , 17-aug-92. - -Based on SmallTalk code which appeared in the August 1981 issue of Byte -magazine. diff --git a/local/man/man.1/bouboule.1 b/local/man/man.1/bouboule.1 deleted file mode 100644 index cdffed43..00000000 --- a/local/man/man.1/bouboule.1 +++ /dev/null @@ -1,76 +0,0 @@ -.TH XScreenSaver 1 "15-May-97" "X Version 11" -.SH NAME -bouboule - draws spinning 3D blobs -.SH SYNOPSIS -.B bouboule -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-3d] - -.SH DESCRIPTION -The \fIbouboule\fP program draws spinning 3D blobs. -.SH OPTIONS -.I bouboule -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 64. -The colors used cycle through the hue, making N stops around -the color wheel. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.TP 8 -.B \-3d -Do red/blue 3d separations (for 3d glasses.) - -.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 1996 by Jeremie Petit. - -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 -Jeremie Petit , 1996. - -3D support by Henrik Theiling , 04-Sep-96. - -VMS support by Jouk Jansen , 01-Feb-96. - -TrueColor support by David Bagley , 01-Feb-96. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 15-May-97. diff --git a/local/man/man.1/braid.1 b/local/man/man.1/braid.1 deleted file mode 100644 index 3310616d..00000000 --- a/local/man/man.1/braid.1 +++ /dev/null @@ -1,65 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -braid - draws random color-cycling braids around a circle -.SH SYNOPSIS -.B braid -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] - -.SH DESCRIPTION -The \fIbraid\fP program draws random color-cycling braids around a circle. -.SH OPTIONS -.I braid -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 64. -The colors used cycle through the hue, making N stops around -the color wheel. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.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 1995 by John Neil. - -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 -John Neil , 29-Aug-95. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/bubbles.1 b/local/man/man.1/bubbles.1 deleted file mode 100644 index c9016e64..00000000 --- a/local/man/man.1/bubbles.1 +++ /dev/null @@ -1,142 +0,0 @@ -.de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. -.TH XScreenSaver 1 "14-Dec-95" "X Version 11" -.SH NAME -bubbles - frying pan / soft drink simulation -.SH SYNOPSIS -.B bubbles -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-simple] [\-broken] [\-3D] [\-file filename] [\-directory directoryname] -.SH DESCRIPTION -\fIBubbles\fP sprays lots of little random bubbles all over the window which -then grow until they reach their maximum size and go pop. The inspiration -for this was watching little globules of oil on the bottom of a frying pan -and it also looks a little like bubbles in fizzy soft drink. The default -mode uses fancy ray-traced bubbles but there is also a mode which just draws -circles in case the default mode is too taxing on your hardware. -.SH OPTIONS -Depending on how your -.I bubbles -was compiled, it accepts the following options: -.TP 8 -.B \-foreground -Colour of circles if \fI\-simple\fP mode is selected. -.TP 8 -.B \-background -Colour of window background. -.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 \-delay microseconds -How much of a delay should be introduced between steps of the animation. -Default 1, or about 1 microsecond. Actually, this is the delay between each -group of 15 new bubbles since such a delay between each step results in a -very slow animation rate. -.TP 8 -.B \-nodelay -Same as \fI\-delay 0\fP. -.TP 8 -.B \-simple -Don't use the default fancy pixmap bubbles. Just draw circles instead. -This may give more bearable performance if your hardware wasn't made for -this sort of thing. -.TP 8 -.B \-broken -Don't hide bubbles when they pop. This was a bug during development -but the results were actually quite attractive. (This option is only -available if you have the XPM library available and the imake generated -Makefile has defined HAVE_XPM). -.TP 8 -.B \-3D -Normally, the simulation is done completely in two dimensions. When a -bubble swallows up another bubble, the areas of each are added to get -the area of the resulting bubble. This option changes the algorithm -to instead add volume (imagining each to be a sphere in 3D space). The -whole thing looks more realistic but I find it attracts attention to -the flickering of each bubble as they are move and are redrawn. Your -mileage may vary. -.TP 8 -.B \-file filename -Use the pixmap definitions in the given file, instead of the default (if -one is compiled in). This is ignored if \fI\-simple\fP is specified. If -the file is compressed (either with compress or gzip), it is decompressed -before use. (This option only works if you have XPM compiled into your -binary and you have compiled with BUBBLES_IO set in bubbles.h. This is -\fBnot\fP the default). -.TP 8 -.B \-directory directoryname -Similar to \fI-file\fP except the file is taken randomly from the -contents of the specified directory. (Again, this option is only available -if you have XPM and BUBBLES_IO was set when compiling. See above). -.TP 8 -.B \-quiet -Don't print messages explaining why one or several command line options -were ignored. This is disabled by default. -.SH NOTES -If you find the pace of things too slow, remember that there is a delay -even though you specify no \fI\-delay\fP option. Try using \fI\-nodelay\fP -although beware of the effects of irritation of other users if you're on a -shared system as you bleed their CPU time away. - -Some tools to assist in creation of new bubbles are included in the source -distribution. These can either be loaded with the \fI\-file\fP or -\fI\-directory\fP options (if available) or they can be used in place -of the distributed default bubble (bubble_default.c). -You might like to copy these scripts to a permanent location and -use them. Read bubbles.README. - -Rendered bubbles are not supported on monochrome displays. I'm not -convinced that small bubbles, even dithered properly are going to look -like anything more than a jumble of random dots. -.SH BUGS -There is a delay before something appears on the screen when using -rendered bubbles. The XPM library seems to take a \fBlong\fP time to make -pixmaps out of raw data. This can be irritating on slower systems. - -The movement of the bubbles looks jerky if an incomplete set of bubbles -is used. - -The hide/display algorithm could do with some work to avoid flickering -when \fI\-nodelay\fP is set. -.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 DISTRIBUTION POLICY -This work is Copyright \(co 1995, 1996 by James Macnicol. Distribution is -allowed under the terms of the GNU General Public License. Look at the -sources for the legalese. -.SH AUTHOR -James Macnicol . diff --git a/local/man/man.1/decayscreen.1 b/local/man/man.1/decayscreen.1 deleted file mode 100644 index 007301bc..00000000 --- a/local/man/man.1/decayscreen.1 +++ /dev/null @@ -1,53 +0,0 @@ -.TH XScreenSaver 1 "05-aug-93" "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] -.SH DESCRIPTION -The \fIdecayscreen\fP program creates a melting effect by randomly -shifting rectangles around the screen. -.SH OPTIONS -.I decayscreen -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 \-delay \fImicroseconds\fP -Slow it down. -.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" -X(1), -xscreensaver(1) -.SH COPYRIGHT -Copyright 1992 by Vivek Khera. 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 -Vivek Khera , 05-Aug-93; based on code by David Wald, 1988. diff --git a/local/man/man.1/deco.1 b/local/man/man.1/deco.1 deleted file mode 100644 index e9f61c54..00000000 --- a/local/man/man.1/deco.1 +++ /dev/null @@ -1,72 +0,0 @@ -.TH XScreenSaver 1 "27-Apr-97" "X Version 11" -.SH NAME -deco - draw tacky 70s basement wall panelling -.SH SYNOPSIS -.B deco -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-max\-depth \fIint\fP] [\-min\-width \fIint\fP] [\-min\-height \fIint\fP] [\-cycle] [\-no\-cycle] [\-cycle\-delay] -.SH DESCRIPTION -The \fIdeco\fP program subdivides and colors rectangles randomly. -It looks kind of like Brady-Bunch-era rec-room wall paneling. -(Raven says: "this screensaver is ugly enough to peel paint.") -.SH OPTIONS -.I deco -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 \-delay \fIseconds\fP -How long to wait before starting over. Default 5 seconds. -.TP 8 -.B \-max\-depth \fIinteger\fP -How deep to subdivide. Default 12. -Default 8. -.TP 8 -.B \-min-width \fIinteger\fP -.B \-min-height \fIinteger\fP -The size of the smallest rectangle to draw. Default 20x20. -.TP 8 -.B \-cycle -.TP 8 -.B \-no\-cycle -Whether to do color cycling. Default False. -.TP 8 -.B \-cycle\-delay \fIusecs\fP -If color cycling, how often to change the colors. Default 1000000, -or 1 second. -.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 , 26-Apr-97, based on code by -Michael D. Bayne . diff --git a/local/man/man.1/drift.1 b/local/man/man.1/drift.1 deleted file mode 100644 index 5cc69775..00000000 --- a/local/man/man.1/drift.1 +++ /dev/null @@ -1,75 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -drift - draws drifting recursive fractal cosmic flames -.SH SYNOPSIS -.B drift -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-count \fIinteger\fP] [\-grow] [\-no\-grow] [\-liss] [\-no\-liss] - -.SH DESCRIPTION -The \fIdrift\fP program draws drifting recursive fractal cosmic flames -.SH OPTIONS -.I drift -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 used cycle through the hue, making N stops around -the color wheel. -.TP 8 -.B \-count \fIinteger\fP - -.TP 8 -.B \-grow -.TP 8 -.B \-no\-grow -Whether fractals should grow; otherwise, they are animated. - -.TP 8 -.B \-liss -.TP 8 -.B \-no\-liss -Whether we should use lissojous figures to get points. - -.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 flame (1), -.BR X (1), -.BR xscreensaver (1), -.BR xlock (1) -.SH COPYRIGHT -Copyright \(co 1991, 1995 by Scott Draves. - -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 -Scott Draves , 06-Jun-91, 01-Jun-95. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/flag.1 b/local/man/man.1/flag.1 deleted file mode 100644 index 897a1f25..00000000 --- a/local/man/man.1/flag.1 +++ /dev/null @@ -1,88 +0,0 @@ -.TH XScreenSaver 1 "24-May-97" "X Version 11" -.SH NAME -flag - draws a waving flag, containing text or an image -.SH SYNOPSIS -.B flag -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-size \fIinteger\fP] [\-text \fIstring\fP] [\-font \fIfont\fP] [\-bitmap \fIxbm-file\fP] - -.SH DESCRIPTION -The \fIflag\fP program draws a waving flag that contains text or a bitmap. -.SH OPTIONS -.I flag -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. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.TP 8 -.B \-size \fIinteger\fP -How large the pixels in the flag should be, from 1 to 8. -If this is a negative number, the pixel size is chosen randomly -from the range 1 to -size. Default -7. -.TP 8 -.B \-text \fItext\fP -The text to display in the flag. Multiple lines of text are allowed; -the lines will be displayed centered atop one another. Default: none. -If the text is the magic string \fI"(default)"\fP, then the text used -will be the local machine name; a newline; and the local OS version. -.TP 8 -.B \-bitmap \fIxbm-file\fP -The bitmap to display in the flag; this must be an XBM file (color XPMs -are not allowed.) Default: none. If the bitmap is the magic -string \fI"(default)"\fP, then the bitmap used will be a charming -little picture of J. R. "Bob" Dobbs. - -If neither \fI\-text\fP nor \fI\-bitmap\fP are specified, then either -the builtin text or the builtin bitmap will be chosen randomly. -.TP 8 -.B \-font \fIfont\fP -The font in which to draw the text; the default is -"-*-helvetica-bold-r-*-240-*". -.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 1996 Charles Vidal. - -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 -Charles Vidal , 1996. - -Ability to run standalone or with \fIxscreensaver\fP, and the \-text -and \-bitmap options, added by Jamie Zawinski , 24-May-97. diff --git a/local/man/man.1/flame.1 b/local/man/man.1/flame.1 deleted file mode 100644 index 5c3f7b66..00000000 --- a/local/man/man.1/flame.1 +++ /dev/null @@ -1,70 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -flame - draw weird cosmic fractals -.SH SYNOPSIS -.B flame -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-colors \fIinteger\fP] [\-iterations \fIinteger\fP] [\-points \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-delay2 \fImicroseconds\fP] -.SH DESCRIPTION -The \fIflame\fP program generates colorful fractal displays. -.SH OPTIONS -.I flame -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 \-colors \fIinteger\fP -How many colors should be used (if possible). Default 64. -.TP 8 -.B \-iterations \fIinteger\fP -How many fractals to generate. Default 25. -.TP 8 -.B \-points \fIinteger\fP -How many pixels to draw for each fractal. Default 10000. -.TP 8 -.B \-delay \fImicroseconds\fP -How long we should wait between drawing each fractal. Default 50000, -or about 1/20th second. -.TP 8 -.B \-delay2 \fImicroseconds\fP -How long we should wait before clearing the screen when each run ends. -Default 2000000, or two seconds. -.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 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. -.SH AUTHOR -Scott Graves , 06-Jun-91.n - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 18-Oct-93. diff --git a/local/man/man.1/forest.1 b/local/man/man.1/forest.1 deleted file mode 100644 index a584cf7b..00000000 --- a/local/man/man.1/forest.1 +++ /dev/null @@ -1,63 +0,0 @@ -.TH XScreenSaver 1 "27-May-97" "X Version 11" -.SH NAME -forest - draws a fractal forest -.SH SYNOPSIS -.B forest -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] - -.SH DESCRIPTION -The \fIforest\fP program draws a fractal forest. -.SH OPTIONS -.I forest -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 100. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.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 1995 by Pascal Pensa. - -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 -Pascal Pensa , 1995. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 27-May-97. diff --git a/local/man/man.1/fract.1 b/local/man/man.1/fract.1 deleted file mode 100644 index 8f80f8f4..00000000 --- a/local/man/man.1/fract.1 +++ /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 , 1997. - -Tweaked by David Hansen , 21-Mar-97. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/galaxy.1 b/local/man/man.1/galaxy.1 deleted file mode 100644 index 8a4fe4c5..00000000 --- a/local/man/man.1/galaxy.1 +++ /dev/null @@ -1,83 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -galaxy - draws spinning galaxies -.SH SYNOPSIS -.B galaxy -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-size \fIinteger\fP] [\-trail] [\-no\-trail] - -.SH DESCRIPTION -The \fIgalaxy\fP program draws spinning galaxies. -.SH OPTIONS -.I galaxy -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 64. -The colors used cycle through the hue, making N stops around -the color wheel. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.TP 8 -.B \-size \fIinteger\fP - -.TP 8 -.B \-trail -.TP 8 -.B \-no\-trail - -.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 1994 by Hubert Feyrer. - -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 -Original Amiga version by Uli Siegmund - for EGS in Cluster. - -Ported from Cluster/EGS to C/Intuition by Harald Backert. - -Ported to X11 and xlockmore by -Hubert Feyrer , 30-Sep-94. - -Modified by David Bagley , 23-Oct-94. - -Modified by Dave Mitchell , 7-Apr-97. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/goop.1 b/local/man/man.1/goop.1 deleted file mode 100644 index e7f4c3da..00000000 --- a/local/man/man.1/goop.1 +++ /dev/null @@ -1,81 +0,0 @@ -.TH XScreenSaver 1 "11-Jun-97" "X Version 11" -.SH NAME -goop - squishy transparent oil and bubble screenhack -.SH SYNOPSIS -.B goop -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-transparent] [\-non\-transparent] [\-additive] [\-subtractive] [\-xor] [\-no\-xor] -.SH DESCRIPTION -The \fIgoop\fP program draws a simulation of bubbles in layers of -overlapping multicolored translucent fluid. -.SH OPTIONS -.I goop -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 \-count \fIinteger\fP -How many bubbles to draw per layer. Default: random. -.TP 8 -.B \-layers \fIinteger\fP -How many layers to draw. Default: random, based on screen depth. -.TP 8 -.B \-delay \fImicroseconds\fP -How much of a delay should be introduced between steps of the animation. -Default 100000, or about 1/10th second. -.TP 8 -.B \-transparent -If \fI\-layers\fP is greater than 1, then each layer will be drawn in one -color, and when they overlap, the colors will be mixed. This only works -on \fBPseudoColor\fP displays. This is the default. -.TP 8 -.B \-non\-transparent -Turns off \fI\-transparent\fP. -.TP 8 -.B \-additive -If \fI\-transparent\fP is specified, then this option means that the colors -will be mixed using an additive color model, as if the blobs were projected -light. This is the default. -.TP 8 -.B \-subtractive -If \fI\-transparent\fP is specified, then this option means that the -colors will be mixed using a subtractive color model, as if the blobs were -translucent filters. -.TP 8 -.B \-xor -Draw with xor instead of the other color tricks. -.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 , 11-Jun-97. diff --git a/local/man/man.1/grav.1 b/local/man/man.1/grav.1 deleted file mode 100644 index 2a53938d..00000000 --- a/local/man/man.1/grav.1 +++ /dev/null @@ -1,74 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -grav - draws a simple orbital simulation -.SH SYNOPSIS -.B grav -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-count \fIinteger\fP] [\-decay] [\-no\-decay] [\-trail] [\-no\-trail] - -.SH DESCRIPTION -The \fIgrav\fP program draws a simple orbital simulation -.SH OPTIONS -.I grav -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. -.TP 8 -.B \-count \fIinteger\fP -Default 12. -.TP 8 -.B \-decay -.TP 8 -.B \-no-\decay -Whether orbits should decay. - -.TP 8 -.B \-trail -.TP 8 -.B \-no\-trail -Whether the objects should leave trails behind them (makes it look vaguely -like a cloud-chamber. - -.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 1993 by Greg Bowering. - -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 -Greg Bowering , 1993. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/greynetic.1 b/local/man/man.1/greynetic.1 deleted file mode 100644 index 86381123..00000000 --- a/local/man/man.1/greynetic.1 +++ /dev/null @@ -1,52 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -greynetic - draw random stippled/color rectangles -.SH SYNOPSIS -.B greynetic -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP] -.SH DESCRIPTION -The \fIgreynetic\fP program draws random rectangles. -.SH OPTIONS -.I greynetic -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 \-delay \fImicroseconds\fP -Slow it down. -.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 1992 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 , 13-aug-92. diff --git a/local/man/man.1/halo.1 b/local/man/man.1/halo.1 deleted file mode 100644 index 0d3d4e01..00000000 --- a/local/man/man.1/halo.1 +++ /dev/null @@ -1,80 +0,0 @@ -.TH XScreenSaver 1 "12-Jun-97" "X Version 11" -.SH NAME -halo - draw circular patterns -.SH SYNOPSIS -.B halo -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-count \fIint\fP] [\-delay \fIusecs\fP] [\-mode seuss | ramp | random ] [\-animate] [\-colors \fIinteger\fP] [\-cycle] [\-no\-cycle] [\-cycle\-delay \fIusecs\fP] -.SH DESCRIPTION -The \fIhalo\fP program draws cool patterns based on circles. -.SH OPTIONS -.I halo -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 \-count \fIinteger\fP -How many circles to draw. Default 0, meaning random. -.TP 8 -.B \-mode "seuss | ramp | random" -In \fIseuss\fP mode, alternating striped curves will be drawn. - -In \fIramp\fP mode, a color ramp will be drawn. - -\fIrandom\fP means pick the mode randomly. -.TP 8 -.B \-delay \fImicroseconds\fP -How much of a delay should be introduced between steps of the animation. -Default 100000, or about 0.1 second. -.TP 8 -.B \-colors \fIinteger\fP -How many colors to use. Default 100. -.TP 8 -.B \-animate -If specified, then the centerpoints of the circles will bounce around. -Otherwise, the circles will be drawn once, erased, and a new set of -circles will be drawn. -.TP 8 -.B \-cycle -.TP 8 -.B \-no\-cycle -Whether to do colormap cycling. Default is to cycle. -.TP 8 -.B \-cycle\-delay -Number of microseconds between shifts of the colormap; default 100000, -or 1/10th second. -.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 1993 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 , 6-jul-93. diff --git a/local/man/man.1/helix.1 b/local/man/man.1/helix.1 deleted file mode 100644 index 76c7cfef..00000000 --- a/local/man/man.1/helix.1 +++ /dev/null @@ -1,50 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -helix - draw helical string-art patterns -.SH SYNOPSIS -.B helix -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] -.SH DESCRIPTION -The \fIhelix\fP program draws interesting patterns composed of line segments -in random colors. -.SH OPTIONS -.I helix -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. -.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 1992 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 , 13-aug-92. diff --git a/local/man/man.1/hopalong.1 b/local/man/man.1/hopalong.1 deleted file mode 100644 index bbb15be0..00000000 --- a/local/man/man.1/hopalong.1 +++ /dev/null @@ -1,78 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -hopalong - draw real plane fractals -.SH SYNOPSIS -.B hopalong -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-jong] [\-no\-jong] [\-jong] [\-no\-sine] - -.SH DESCRIPTION -The \fIhopalong\fP program generates real plane fractals as described in -the September 1986 issue of Scientific American. -.SH OPTIONS -.I hopalong -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 used cycle through the hue, making N stops around -the color wheel. -.TP 8 -.B \-cycles \fIinteger\fP -How long to run each batch. Default 2500 pixels. -.TP 8 -.B \-count \fIinteger\fP -How many pixels should be drawn before a color change. Default 1000. -.TP 8 -.B \-jong \fIinteger\fP -.TP 8 -.B \-no\-jong \fIinteger\fP -Whether to use the Jong format (default is to choose randomly.) - -.TP 8 -.B \-sine \fIinteger\fP -.TP 8 -.B \-no\-sine \fIinteger\fP -Whether to use the Sine format (default is to choose 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 1988-91 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. -.SH AUTHOR -Patrick J. Naughton , 23-mar-88. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 13-aug-92, and again on 10-May-97. diff --git a/local/man/man.1/hypercube.1 b/local/man/man.1/hypercube.1 deleted file mode 100644 index daa66899..00000000 --- a/local/man/man.1/hypercube.1 +++ /dev/null @@ -1,93 +0,0 @@ -.TH XScreenSaver 1 "6-dec-92" "X Version 11" -.SH NAME -hypercube - 2d projection of a 4d object -.SH SYNOPSIS -.B hypercube -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-color[0-7] \fIcolor\fP] [\-xy \fIfloat\fP] [\-xz \fIfloat\fP] [\-yz \fIfloat\fP] [\-xw \fIfloat\fP] [\-yw \fIfloat\fP] [\-zw \fIfloat\fP] [\-observer-z \fIint\fP] [\-delay \fIusecs\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] -.SH DESCRIPTION -The \fIhypercube\fP program displays a wireframe projection of a hypercube -which is rotating at user-specified rates around any or all of its four axes. -.SH OPTIONS -.I hypercube -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 \-delay \fImicroseconds\fP -How much of a delay should be introduced between steps of the animation. -Default 100000, or about 1/10th second. -.TP 8 -.B \-observer-z \fIint\fP -How far away the observer is from the center of the cube (the cube is one -unit per side.) Default 5. -.TP 8 -.B \-color0 \fIcolor\fP -.TP 8 -.B \-color1 \fIcolor\fP -.TP 8 -.B \-color2 \fIcolor\fP -.TP 8 -.B \-color3 \fIcolor\fP -.TP 8 -.B \-color4 \fIcolor\fP -.TP 8 -.B \-color5 \fIcolor\fP -.TP 8 -.B \-color6 \fIcolor\fP -.TP 8 -.B \-color7 \fIcolor\fP -The colors used to draw the line segments bordering the eight faces of -the cube. Some of the faces have only two of their border-lines drawn in -the specified color, and some have all four. -.TP 8 -.B \-xw \fIfloat\fP -.TP 8 -.B \-xy \fIfloat\fP -.TP 8 -.B \-xz \fIfloat\fP -.TP 8 -.B \-yw \fIfloat\fP -.TP 8 -.B \-yz \fIfloat\fP -.TP 8 -.B \-zw \fIfloat\fP -The amount that the cube should be rotated around the specified axis at -each frame of the animation, expressed in radians. These should be small -floating-point values (less than 0.05 works best.) Default: xy=0.01, -xz=0.005, yw=0.01. -.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 1992 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 , 6-dec-92. diff --git a/local/man/man.1/ifs.1 b/local/man/man.1/ifs.1 deleted file mode 100644 index 39e12d15..00000000 --- a/local/man/man.1/ifs.1 +++ /dev/null @@ -1,59 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -ifs - draws spinning, colliding iterated-function-system images -.SH SYNOPSIS -.B ifs -[\-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 \fIifs\fP program draws spinning, colliding iterated-function-system images. -.SH OPTIONS -.I ifs -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 used cycle through the hue, making N stops around -the color wheel. -.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 Massimino Pascal. - -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 -Massimino Pascal , 1997. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/imsmap.1 b/local/man/man.1/imsmap.1 deleted file mode 100644 index d0ea4183..00000000 --- a/local/man/man.1/imsmap.1 +++ /dev/null @@ -1,66 +0,0 @@ -.TH XScreenSaver 1 "17-May-97" "X Version 11" -.SH NAME -imsmap - generate fractal maps -.SH SYNOPSIS -.B imsmap -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIint\fP] [\-delay \fIseconds\fP] [\-iterations \fIint\fP] [\-mode h|s|v|random] [\-cycle] [\-no\-cycle] -.SH DESCRIPTION -The \fIimsmap\fP program generates map or cloud-like patterns. It looks -quite different in monochrome and color. -.SH OPTIONS -.I imsmap -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 to use. Default 50. -.TP 8 -.B \-delay \fIinteger\fP -How long to delay between images. Default 10 seconds. -.TP 8 -.B \-iterations \fIinteger\fP -A measure of the resolution of the resultant image, from 0 to 7. Default 7. -.TP 8 -.B \-mode [ hue | saturation | value | random ] -The axis upon which colors should be interpolated between the foreground -and background color. Default random. -.TP 8 -.B \-cycle -.TP 8 -.B \-no\-cycle -Whether to do colormap cycling. Default is to cycle. -.TP 8 -.B \-cycle\-delay -Number of microseconds between shifts of the colormap; default 100000, -or 1/10th second. -.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 AUTHOR -Juergen Nickelsen , 23-aug-92. - -Hacked on by Jamie Zawinski , 24-aug-92, 17-May-97. diff --git a/local/man/man.1/julia.1 b/local/man/man.1/julia.1 deleted file mode 100644 index 8b40e487..00000000 --- a/local/man/man.1/julia.1 +++ /dev/null @@ -1,83 +0,0 @@ -.TH XScreenSaver 1 "28-May-97" "X Version 11" -.SH NAME -julia - draws spinning, animating julia-set fractals -.SH SYNOPSIS -.B julia -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-mouse] [\-nomouse] - -.SH DESCRIPTION -The \fIjulia\fP program draws spinning, animating julia-set fractals. - -It uses ifs {w0 = sqrt(x-c), w1 = -sqrt(x-c)} with random iteration -to plot the julia set, and sinusoidially varied parameters for the set, -and plots parameters with a circle. - -One thing to note is that count is the \fIdepth\fP of the search tree, -so the number of points computed is (2^count)-1. I use 8 or 9 on a -dx266 and it looks okay. The sinusoidal variation of the parameter -might not be as interesting as it could, but it still gives an idea -of the effect of the parameter. - -.SH OPTIONS -.I julia -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 used cycle through the hue, making N stops around -the color wheel. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.TP 8 -.B \-mouse -.TP 8 -.B \-nomouse -If \fI\-mouse\fP is specified, the control point of the Julia set will -be derived from the position of the mouse in the window. When the mouse -is not in the window, the control point is chosen the normal way. -.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 1995 by Sean McCullough. - -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 -Sean McCullough , 1995. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/kaleidescope.1 b/local/man/man.1/kaleidescope.1 deleted file mode 100644 index 6eca5e33..00000000 --- a/local/man/man.1/kaleidescope.1 +++ /dev/null @@ -1,85 +0,0 @@ -.de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. -.TH Kaleidescpe 1 "14-Dec-95" "X Version 11" -.SH NAME -Kaleidescope - rotating line segments -.SH SYNOPSIS -.B kaleidescope -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-color_mode \fImono | nice | greedy\fP] [-nsegments \fIint\fP] [\-ntrails \fIint\fP] [\-local_rotation \fIint\fP] [\-global_rotation \fIint\fP] [\-delay \fIusecs\fP] [\-redmin \fIint\fP] [\-greenmin \fIint\fP] [\-bluemin \fIint\fP] [\-redrange \fIint\fP] [\-greenrange \fIint\fP] [\-bluerange \fIint\fP] -.SH DESCRIPTION -The \fIkaleidescope\fP program draws line segments in a symmetric pattern -that evolves over time. -.SH OPTIONS -.I kaleidescope -accepts the following options: -.TP 8 -.B \-root -Draw on the root window. -.TP 8 -.B \-color_mode "mono | nice | greedy" -Specify how kaleidescope uses colors. Mono uses -just the default foreground and background colors. Nice uses one -color for each segment (specified by nsegments). Greedy uses (ntrails * nsegments) + 1 colors. -.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 \-nsegments integer -The number of segments to draw. Default is 7. -.TP 8 -.B \-ntrails integer -The number of trails to draw. Default is 100. -.TP 8 -.B \-local_rotation integer -The rate at which segments rotate around their center. Default is -59. -.TP 8 -.B \-global_rotation integer -The rate at which segments rotate around the center of the window. -Default is 1. -.TP 8 -.B \-redmin, \-greenmin, \-bluemin, \-redrange, \-greenrange, \-bluerange -All take an integer argument. When colors are randomly chosen, they -are chosen from the interval min to min plus range. The minimums default -to 30000. The ranges default to 20000. -.TP 8 -.B \-delay microseconds -How much of a delay should be introduced between steps of the animation. -Default is 20000, or about 5 frames a second. -.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 kaleidescope (1) -.SH COPYRIGHT -Copyright \(co 1997 by Ron Tapia. 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 -Ron Tapia , 20-Mar-97. - diff --git a/local/man/man.1/laser.1 b/local/man/man.1/laser.1 deleted file mode 100644 index c219bfc7..00000000 --- a/local/man/man.1/laser.1 +++ /dev/null @@ -1,64 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -laser - draws vaguely laser-like moving lines -.SH SYNOPSIS -.B laser -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] - -.SH DESCRIPTION -The \fIlaser\fP program draws vaguely laser-like moving lines -.SH OPTIONS -.I laser -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 64. -The colors used cycle through the hue, making N stops around the color wheel. -.TP 8 -.B \-cycles \fIinteger\fP -Default 200. -.TP 8 -.B \-count \fIinteger\fP -Default 10. -.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 1995 by Pascal Pensa. - -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 -Pascal Pensa , 1995. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/lightning.1 b/local/man/man.1/lightning.1 deleted file mode 100644 index 7e602bfb..00000000 --- a/local/man/man.1/lightning.1 +++ /dev/null @@ -1,58 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -lightning - draws fractal lightning bolts -.SH SYNOPSIS -.B lightning -[\-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 \fIlightning\fP program draws fractal lightning bolts -.SH OPTIONS -.I lightning -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 64. -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 1996 by Keith Romberg. - -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 -Keith Romberg , 27-Jun-96. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/lisa.1 b/local/man/man.1/lisa.1 deleted file mode 100644 index 0e9aeeba..00000000 --- a/local/man/man.1/lisa.1 +++ /dev/null @@ -1,67 +0,0 @@ -.TH XScreenSaver 1 "27-May-97" "X Version 11" -.SH NAME -lisa - draws animated full-loop lisajous figures -.SH SYNOPSIS -.B lisa -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] [\-size \fIinteger\fP] - -.SH DESCRIPTION -The \fIlisa\fP program draws animated full-loop lisajous figures. -.SH OPTIONS -.I lisa -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. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.TP 8 -.B \-size \fIinteger\fP - -.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 Caleb Cullen. - -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 -Caleb Cullen, 1997. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 27-May-97. diff --git a/local/man/man.1/lmorph.1 b/local/man/man.1/lmorph.1 deleted file mode 100644 index a631f24c..00000000 --- a/local/man/man.1/lmorph.1 +++ /dev/null @@ -1,54 +0,0 @@ -.TH LMORPH 1 "xscreensaver hack" -.SH NAME -lmorph \- morphing lines -.SH SYNOPSIS -.B lmorph -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-steps \fIint\fP] [\-delay \fIusecs\fP] -.SH DESCRIPTION -The \fIlmorph\fP program morphs between simple linedrawings using bilinear -interpolation. -.SH OPTIONS -.I lmorph -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 \-points \fIinteger\fP -Number of points in each line drawing. Default is 150 points. -.TP 8 -.B \-steps \fIinteger\fP -Interpolation steps from one drawing to the next. Default is 0, which -means a random number between 100 and 500. -.TP 8 -.B \-delay \fImicroseconds\fP -How much of a delay should be introduced between steps of the animation. -Default 50000. -.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 AUTHOR -Sverre H. Huseby and Glenn T. Lines , -built on top of the screen saver routines by Jamie Zawinski . diff --git a/local/man/man.1/maze.1 b/local/man/man.1/maze.1 deleted file mode 100644 index f93a70f4..00000000 --- a/local/man/man.1/maze.1 +++ /dev/null @@ -1,107 +0,0 @@ -.TH XScreenSaver 1 "7-mar-93" "X Version 11" -.SH NAME -maze \- an automated X11 demo repeatedly creating and solving a random maze -.SH SYNOPSIS -.B maze -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-grid\-size \fIpixels\fP] [\-live\-color \fIcolor\fP] [\-dead\-color \fIcolor\fP] [\-solve\-delay \fIusecs\fP] [\-pre\-delay \fIusecs\fP] [\-post\-delay \fIusecs\fP] -.SH DESCRIPTION -The \fImaze\fP program creates a "random" maze and then solves it with -graphical feedback. -.SH OPTIONS -.I maze -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 \-grid\-size \fIpixels\fP -The size of each block of the maze, in pixels; default is 0, meaning -pick a random grid size. -.TP 8 -.B \-live\-color \fIcolor\fP -The color of the path. -.TP 8 -.B \-dead\-color \fIcolor\fP -The color of the failed path (it is also stippled with a 50% pattern.) -.TP 8 -.B \-solve\-delay \fIinteger\fP -Delay (in microseconds) between each step of the solution path. -Default 5000, or about 1/200th second. -.TP 8 -.B \-pre\-delay \fIinteger\fP -Delay (in microseconds) between generating a maze and starting to solve it. -Default 2000000 (2 seconds.) -.TP 8 -.B \-post\-delay \fIinteger\fP -Delay (in microseconds) after solving a maze and before generating a new one. -Default 4000000 (4 seconds.) -.PP -Clicking the mouse in the maze window controls it. -.TP 16 -.B "LeftButton -Clears the window and restarts maze. -.TP 16 -.B MiddleButton -Pause or unpause the program. -.TP 16 -.B RightButton -Exit. -.SH BUGS -Expose events force a restart of maze. - -Mouse actions are based on "raw" values (Button1, Button2 and Button3) -instead of using the pointer map. -.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 -.PP -Copyright \(co 1988 by Sun Microsystems, Inc. Mountain View, CA. -.PP -All Rights Reserved -.PP -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, and that -the names of Sun or MIT not be used in advertising or publicity pertaining to -distribution of the software without specific prior written permission. Sun -and M.I.T. make no representations about the suitability of this software for -any purpose. It is provided "as is" without any express or implied warranty. -.PP -SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN -NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.SH AUTHOR(s) -.nf -Jim Randell [ XScreenSaver version ] jmr@mddjmr.fc.hp.com - HPLabs, Bristol -Richard Hess [ X11 extensions ] {...}!uunet!cimshop!rhess - Consilium, Mountain View, CA -Dave Lemke [ X11 version ] lemke@sun.COM - Sun MicroSystems, Mountain View, CA -Martin Weiss [ SunView version ] - Sun MicroSystems, Mountain View, CA -.fi diff --git a/local/man/man.1/moire.1 b/local/man/man.1/moire.1 deleted file mode 100644 index 4304710d..00000000 --- a/local/man/man.1/moire.1 +++ /dev/null @@ -1,64 +0,0 @@ -.TH XScreenSaver 1 "27-Apr-97" "X Version 11" -.SH NAME -halo - draw circular interference patterns -.SH SYNOPSIS -.B halo -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-random \fIboolean\fP] [\-ncolors \fIint\fP] [\-offset \fIint\fP] -.SH DESCRIPTION -The \fImoire\fP program draws cool circular interference patterns. -.SH OPTIONS -.I moire -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 \-delay \fIseconds\fP -How long to wait before starting over. Default 5 seconds. -.TP 8 -.B \-random \fIboolean\fP -Whether to ignore the foreground/background colors, and pick them randomly -instead. -.TP 8 -.B \-offset \fIinteger\fP -The maximum random radius increment to use. -.TP 8 -.B \-ncolors \fIinteger\fP -How many colors should be allocated in the color ramp (note that this -value interacts with \fIoffset\fP.) -.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 , 27-Apr-97, based on code by -Michael D. Bayne . diff --git a/local/man/man.1/munch.1 b/local/man/man.1/munch.1 deleted file mode 100644 index 87721c02..00000000 --- a/local/man/man.1/munch.1 +++ /dev/null @@ -1,133 +0,0 @@ -..de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. -.TH XScreenSaver 1 "17-Jun-97" "X Version 11" -.SH NAME -munch - munching squares screen hack -.SH SYNOPSIS -.B deco -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] -[\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] -[\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-xor] [\-noxor] [\-shift] -[\-noshift] [\-logminwidth \fIminimum width\fP] -.SH DESCRIPTION -The -.I munch -program preforms the munching squares hack until killed. It picks square -size, position, and gravity randomly; configurable options are listed -below. -.PP -The munching squares hack cosists of drawing Y = X XOR T for a range of X -and T over and over until all the possible combinations of X and T have -come up. It was reportedly discovered by Jackson Wright in 1962 and took 5 -instructions of PDP-6 code. -.SH OPTIONS -.I munch -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 \-delay \fIseconds\fP -How long to wait before starting over. Default 5 seconds. -.TP 8 -.B \-xor -Use the XOR drawing function. (Default.) -.TP 8 -.B \-no\-xor -Don't use the XOR drawing function. -.TP 8 -.B \-shift -Start drawing the square at weird starting points. (Default.) -.TP 8 -.B \-no\-shift -Don't shift and start drawing the square at weird starting points. -.TP 8 -.B \-logminwidth \fIminimum\-width\fP -The logarithm (base 2) of the minimum with of a square (must be a power of -2, or some parts of the square aren't.) -.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 http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html, -.BR http://www.comedia.com/Hot/jargon_3.0/JARGON_M/MUNCHSQR.HTML -.SH HISTORY -Quoted from HAKMEM, for historical interest. As that document says, "Unless -otherwise stated, all computer programs are in PDP-6/10 assembly language." -.TP 8 -ITEM 146: MUNCHING SQUARES -Another simple display program. It is thought that this was discovered by -Jackson Wright on the RLE PDP-1 circa 1962. - -.EX - DATAI 2 - ADDB 1,2 - ROTC 2,-22 - XOR 1,2 - JRST .-4 -.EE -.RS 8 -2=X, 3=Y. Try things like 1001002 in data switches. This also does -interesting things with operations other than XOR, and rotations other -than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT -14, -9, -20, ...) -.RE -.TP 8 -ITEM 147 (Schroeppel): -Munching squares is just views of the graph Y = X XOR T for consecutive -values of T = time. -.TP 8 -ITEM 148 (Cohen, Beeler): -A modification to munching squares which reveals them in frozen states -through opening and closing curtains: insert FADR 2,1 before the XOR. Try -data switches = - -.EX - 4000,,4 1000,,2002 2000,,4 0,,1002 -.EE -.RS 8 -(Notation: ,,) - -Also try the FADR after the XOR, switches = 1001,,1. -.SH COPYRIGHT -Copyright \(co 1997 by Tim Showalter. 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 -Tim Showalter , 17-Jun-97, based on what's in the -Jargon File and stealing stuff from existing xscreensaver modules. diff --git a/local/man/man.1/noseguy.1 b/local/man/man.1/noseguy.1 deleted file mode 100644 index fe18d8df..00000000 --- a/local/man/man.1/noseguy.1 +++ /dev/null @@ -1,74 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -noseguy - a little guy with a big nose wanders around being witty -.SH SYNOPSIS -.B noseguy -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-text-foreground \fIcolor\fP] [\-text-background \fIcolor\fP] [\-font \fIfont\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-mode \fImode\fP] [\-program \fIprogram\fP] [\-filename \file\fP] [\-text \fItext\fP] -.SH DESCRIPTION -A little man with a big nose and a hat runs around spewing out messages to -the screen. This code (and its bitmaps) were extracted from the \fIxnlock\fP -program. -.SH OPTIONS -.I noseguy -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 \-font \fIfont\fP -The font used for the messages. -.TP 8 -.B \-mode [ program | file | string ] -In \fIprogram\fP mode, the messages are gotten by running a program. -The program used is controlled by the \fI\-program\fP option, and -the \fI.program\fP resource. - -In \fIfilename\fP mode, the message used is the contents of a file. -The file used is controlled by the \fI\-file\fP option, and -the \fI.filename\fP resource. - -In \fIstring\fP mode, the message is whatever was specified on the -command line as the \fI\-text\fP option, or in the resource database -as the \fI.text\fP resource. -.TP 8 -.B \-program \fIprogram\fP -If \fImode\fP is \fIprogram\fP (the default), then this program will be -run periodically, and its output will be the text of the messages. The -default program is \fI"fortune -s"\fP, but \fIyow\fP is also a good choice. -.TP 8 -.B \-filename \fIfile\fP -If \fImode\fP is \fIfile\fP, then the contents of this file will be used -for all messages. -.TP 8 -.B \-text \fIstring\fP -If \fImode\fP is \fIstring\fP, then this text will be used for all messages. -.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 xnlock (1) -.SH COPYRIGHT -Copyright 1985, 1990 by Dan Heller . -.SH AUTHOR -Dan Heller , 1985. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 13-aug-92. diff --git a/local/man/man.1/pedal.1 b/local/man/man.1/pedal.1 deleted file mode 100644 index 7a0c3e5b..00000000 --- a/local/man/man.1/pedal.1 +++ /dev/null @@ -1,62 +0,0 @@ -.TH XScreenSaver 1 "24-Jun-94" "X Version 11" -.SH NAME -pedal - pretty geometric picture program -.SH SYNOPSIS -.B pedal -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-delay \fIseconds\fP] [-maxlines \fInumber\fP] [-fadedelay \fIuseconds\fP] [-mono] [\-install] [\-visual \fIvisual\fP] -.SH DESCRIPTION -The \fIpedal\fP program displays pretty geometric pictures. -.SH OPTIONS -.I pedal -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 \-foreground \fIcolor\fP -The color for the foreground. Default is white. -.TP 8 -.B \-background \fIcolor\fP -The color for the background. Default is black. -.TP 8 -.B \-delay \fIseconds\fP -The number of seconds to pause between each picture. -.TP 8 -.B \-maxlines \fInumber\fP -The maximum number of lines in the drawing. Good values are -between 20 and 2000. Maximum value is 16K. -.TP 8 -.B \-fadedelay \fImicroseconds\fP -The number of micro seconds to take when fading in and out. -.TP 8 -.B \-mono -Don't do fading. Pretend we're on a monochrome display. -.PP -To make your X server grunt under load, and to impress your -friends, try \fIpedal -mono -delay 0 -maxlines 100\fp. -.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 1994, by Carnegie Mellon University. Permission to use, -copy, modify, distribute, and sell this software and its documentation -for any purpose is hereby granted without fee, provided fnord 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 fnord this software -for any purpose. It is provided "as is" without express or implied -warranty. -.SH AUTHOR -Dale Moore , 24-Jun-1994. diff --git a/local/man/man.1/penrose.1 b/local/man/man.1/penrose.1 deleted file mode 100644 index 7460e39e..00000000 --- a/local/man/man.1/penrose.1 +++ /dev/null @@ -1,93 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -penrose - draws quasiperiodic tilings -.SH SYNOPSIS -.B penrose -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-size \fIinteger\fP] [\-ammann] [\-no\-ammann] - -.SH DESCRIPTION -The \fIpenrose\fP program draws quasiperiodic tilings. - -See Onoda, Steinhardt, DiVincenzo and Socolar in -Phys. Rev. Lett. 60, #25, 1988 or -Strandburg in Computers in Physics, Sep/Oct 1991. - -This implementation uses the simpler version of the growth -algorithm, i.e., if there are no forced vertices, a randomly chosen -tile is added to a randomly chosen vertex (no preference for those -108 degree angles). - -There are two essential differences to the algorithm presented in -the literature: First, we do not allow the tiling to enclose an -untiled area. Whenever this is in danger of happening, we just -do not add the tile, hoping for a better random choice the next -time. Second, when choosing a vertex randomly, we will take -one that lies withing the viewport if available. If this seems to -cause enclosures in the forced rule case, we will allow invisible -vertices to be chosen. - -Tiling is restarted whenever one of the following happens: there -are no incomplete vertices within the viewport or the tiling has -extended a window's length beyond the edge of the window -horizontally or vertically or forced rule choice has failed 100 -times due to areas about to become enclosed. - -.SH OPTIONS -.I penrose -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 64. -The colors are chosen randomly. -.TP 8 -.B \-size \fIinteger\fP -How big the tiles should be. Default 40 pixels. - -.TP 8 -.B \-ammann \fIinteger\fP -.TP 8 -.B \-no\-ammann \fIinteger\fP -Whether Ammann lines should be added. - -.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 1996 by Timo Korvola. - -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 -Timo Korvola , 1996. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/pyro.1 b/local/man/man.1/pyro.1 deleted file mode 100644 index 8edb9669..00000000 --- a/local/man/man.1/pyro.1 +++ /dev/null @@ -1,60 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -pyro - simulate fireworks -.SH SYNOPSIS -.B pyro -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-count \fIinteger\fP] [\-frequency \fIinteger\fP] [\-scatter \fIinteger\fP] -.SH DESCRIPTION -The \fIpyro\fP program simulates fireworks, in a way similar to a Macintosh -program of the same name. -.SH OPTIONS -.I pyro -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 \-count \fIinteger\fP -How many particles should be allowed on the screen at once. Default 100. -.TP 8 -.B \-frequency \fIinteger\fP -How often new missiles should launch. Default 30. -.TP 8 -.B \-scatter \fIinteger\fP -How many particles should appear when a missile explodes. Default 20. -The actual number used is between \fIN\fP and \fIN+(N/2)\fP. -.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 1992 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 , 13-aug-92. diff --git a/local/man/man.1/qix.1 b/local/man/man.1/qix.1 deleted file mode 100644 index 7d046fbf..00000000 --- a/local/man/man.1/qix.1 +++ /dev/null @@ -1,129 +0,0 @@ -.TH XScreenSaver 1 "27-Apr-97" "X Version 11" -.SH NAME -qix - bounce colored lines around a window -.SH SYNOPSIS -.B qix -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-segments \fIint\fP] [\-spread \fIpixels\fP] [\-size \fIpixels\fP] [\-count \fIint\fP] [\-color-shift \fIdegrees\fP] [\-delay \fIusecs\fP] [\-random] [\-linear] [\-solid] [\-hollow] [\-xor] [\-no\-xor] [\-transparent] [\-non\-transparent] [\-additive] [\-subtractive] [\-poly \fIint\fP] [\-gravity] [\-no\-gravity] -.SH DESCRIPTION -The \fIqix\fP program bounces a series of line segments around its window. -This is truly the swiss army chainsaw of qix programs. If you know of one -with more display modes, I want to know about it. -.SH OPTIONS -.I qix -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 \-segments \fIinteger\fP -How many line segments should be drawn. Default 50. -.TP 8 -.B \-spread \fIinteger\fP -How far apart the endpoints of one segment should be from the next. -Default 8. -.TP 8 -.B \-size \fIinteger\fP -The maximum distance one endpoint of a segment is allowed to be from -the opposite end of that segment. Default 0, meaning unlimited. -.TP 8 -.B \-count \fIinteger\fP -How many qixes to draw. Default 1. -.TP 8 -.B \-color\-shift \fIdegrees\fP -If on a color display, the color of the line segments will cycle through -the spectrum. This specifies how far the hue of each segment should be -from the next, in degrees on the HSV wheel. Default 3. -.TP 8 -.B \-delay \fImicroseconds\fP -How much of a delay should be introduced between steps of the animation. -Default 25000, or about 0.025 seconds. -.TP 8 -.B \-random -The \fIqix\fP will wander around the screen semi-randomly. This is the -default. -.TP 8 -.B \-linear -The opposite of \fI\-random\fP: the \fIqix\fP will travel in straight lines -until it reaches a wall, and then it will bounce. -.TP 8 -.B \-solid -If this is specified, then the area between the line segments will be filled -in with the appropriate color, instead of the \fIqix\fP simply being composed -of one-pixel-wide line segments. This option looks really good in color. -.TP 8 -.B \-hollow -The opposite of \fI\-solid\fP; this is the default. -.TP 8 -.B \-xor -If this is specified, then qix segments will be drawn and erased with xor, -instead of being drawn in some color and erased in the background color. -This implies \fI\-mono\fP, in that only two colors can be used. -.TP 8 -.B \-transparent -If this is specified, and \fI\-count\fP is greater than 1, then each qix -will be drawn in one color, and when they overlap, the colors will be mixed. -This only works on \fBPseudoColor\fP displays. This looks best in -conjuction with \fI\-solid\fP. -.TP 8 -.B \-non\-transparent -Turns off \fI\-transparent\fP. -.TP 8 -.B \-additive -If \fI\-transparent\fP is specified, then this option means that the colors -will be mixed using an additive color model, as if the qixes were projected -light. This is the default. -.TP 8 -.B \-subtractive -If \fI\-transparent\fP is specified, then this option means that the -colors will be mixed using a subtractive color model, as if the qixes were -translucent filters. -.TP 8 -.B \-poly \fIint\fP -How many vertices each qix-line should have: the default is 2, meaning the -traditional qix line shape. Three will yield triangles, and so on. -.TP 8 -.B \-gravity -.TP 8 -.B \-no\-gravity -Whether there should be downward attraction. For example, the -options -.B \-gravity \-linear -will make everything move in nice smooth parabolas. -Gravity is off by default. -.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 1992 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 , 13-aug-92. - -Thanks to Ariel Scolnicov for the \-poly and \-gravity options. diff --git a/local/man/man.1/rocks.1 b/local/man/man.1/rocks.1 deleted file mode 100644 index 37a163b9..00000000 --- a/local/man/man.1/rocks.1 +++ /dev/null @@ -1,80 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -rocks - animation of flying through an asteroid field -.SH SYNOPSIS -.B rocks -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-count \fIinteger\fP] [\-delay \fIusecs\fP] [\-speed \fIinteger\fP] [\-norotate] [\-nomove] [\-3d] -.SH DESCRIPTION -The \fIrocks\fP program draws an animation of an asteroid field moving past -the observer (or vice versa). Sometimes the observer picks up spin on Z axis. -.SH OPTIONS -.I rocks -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 \-count \fIinteger\fP -Maximum number of rocks to draw on the screen at once. Default 100. -.TP 8 -.B \-speed \fIinteger\fP -A measure of the speed with which the observer and the rocks pass each other, -from 1 to 100. Default 100, meaning ``very fast.'' If you're on a slow -display connection (the animation looks jerky) then try making this number -smaller, and/or decreasing the number of rocks. -.TP 8 -.B \-delay \fImicroseconds\fP -Number of microseconds to delay between each frame. Default 50000, meaning -about 1/20th second. Compare and contrast with \fI\-speed\fP, above. -.TP 8 -.B \-norotate -Don't rotate the observer; just fly through the field on the level. -.TP 8 -.B \-nomove -Don't turn the observer; just fly straight ahead through the field. -.TP 8 -.B \-3d -Do red/blue 3d separations: if you look at the screen with 3d glasses, -the rocks will be \fIjumping\fP right \fIout\fP at you. Oooooh, scaaary! -.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 BUGS -There should be an option to display doppler shift (a gravity rainbow.) - -Speed of rotation should be settable. - -Default speed of rotation should be relative to forward velocity. -.SH COPYRIGHT -Copyright \(co 1992 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 -Based on Lisp Machine code copyright 1988 John Nguyen . - -Ported to C and X by Jamie Zawinski , 13-aug-92. - -Steering code by Jeremie Petit; 3D code by theiling@coli.uni-sb.de. diff --git a/local/man/man.1/rorschach.1 b/local/man/man.1/rorschach.1 deleted file mode 100644 index 4619f0ff..00000000 --- a/local/man/man.1/rorschach.1 +++ /dev/null @@ -1,64 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -rorschach - simulate ink-blot patterns -.SH SYNOPSIS -.B rorschach -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-iterations \fIinteger\fP] [\-offset \fIinteger\fP] [\-xsymmetry] [\-ysymmetry] -.SH DESCRIPTION -The \fIrorschach\fP program draws random patterns reminiscent of the -psychological test of same name. -.SH OPTIONS -.I rorschach -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 \-iterations \fIinteger\fP -How many dots should be drawn each time. Default 4000. -.TP 8 -.B \-offset \fIinteger\fP -How far apart the dots should be. Default 4 pixels. -.TP 8 -.B \-xsymmetry -Whether the images should be horizontally symmetrical. Default true. -.TP 8 -.B \-ysymmetry -Whether the images should be vertically symmetrical. Default false. -.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 BUGS -May call your sanity into question. -.SH SEE ALSO -.BR X (1), -.BR xscreensaver (1) -.SH COPYRIGHT -Copyright \(co 1992 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 , 13-aug-92. diff --git a/local/man/man.1/sierpinski.1 b/local/man/man.1/sierpinski.1 deleted file mode 100644 index e2bc41a6..00000000 --- a/local/man/man.1/sierpinski.1 +++ /dev/null @@ -1,65 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -sierpinski - draws Sierpinski triangle fractals -.SH SYNOPSIS -.B sierpinski -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] - -.SH DESCRIPTION -The \fIsierpinski\fP program draws Sierpinski triangle fractals. -.SH OPTIONS -.I sierpinski -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 64. -The colors are chosen randomly. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.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 1996 by Desmond Daignault. - -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 -Desmond Daignault , 05-Sep-96. (Original -xlock version was called tri.c.) - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. (Renamed to sierpinski.) diff --git a/local/man/man.1/slidescreen.1 b/local/man/man.1/slidescreen.1 deleted file mode 100644 index 3d03dc50..00000000 --- a/local/man/man.1/slidescreen.1 +++ /dev/null @@ -1,68 +0,0 @@ -.TH XScreenSaver 1 "3-dec-92" "X Version 11" -.SH NAME -slidescreen - permute the screen image like an 8-puzzle -.SH SYNOPSIS -.B slidescreen -[\-display \fIhost:display.screen\fP] [\-background \fIcolor\fP] [\-grid-size \fIpixels\fP] [\-ibw \fIpixels\fP] [\-increment \fIpixels\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] -.SH DESCRIPTION -The \fIslidescreen\fP program takes an image of the screen, divides it into -a grid, deletes a random square of that grid, and then randomly slides -one of the neighbors of this "hole" into the hole (and repeat.) -.SH OPTIONS -.I slidescreen -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 \-grid-size \fIpixels\fP -The size of the grid cells. Default 70 pixels. -.TP 8 -.B \-ibw \fIpixels\fP -The size of the "gutter" between grid cells. Default 1 pixel. -.TP 8 -.B \-increment \fIpixels\fP -How many pixels by which a piece should be moved when sliding to a new -location. Default 10 pixels. -.TP 8 -.B \-delay \fImicroseconds\fP -How much of a delay should be introduced between steps of the animation of -the motion of each segment. Default 50000, which is 0.05 seconds. This -is closely related to the \fI\-increment\fP parameter. -.TP 8 -.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. -.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 1992 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 , 3-dec-92. diff --git a/local/man/man.1/slip.1 b/local/man/man.1/slip.1 deleted file mode 100644 index 569e1a12..00000000 --- a/local/man/man.1/slip.1 +++ /dev/null @@ -1,76 +0,0 @@ -.TH XScreenSaver 1 "13-aug-92" "X Version 11" -.SH NAME -flame - sucks your screen into a jet engine -.SH SYNOPSIS -.B flame -[\-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 -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 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. -.TP 8 -.B \-points \fIinteger\fP -How many pixels to draw for each fractal. Default 10000. -.TP 8 -.B \-delay \fImicroseconds\fP -How long we should wait between drawing each fractal. Default 50000, -or about 1/20th second. -.TP 8 -.B \-cycles \fIinteger\fP -How long to frobnicate. Default 50. - -.TP 8 -.B \-count \fIinteger\fP -How many whooziwhatsis. Default 35. - -.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 1992 by Scott Draves. - -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 -Scott Graves . - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 18-Oct-93. diff --git a/local/man/man.1/sphere.1 b/local/man/man.1/sphere.1 deleted file mode 100644 index 89189884..00000000 --- a/local/man/man.1/sphere.1 +++ /dev/null @@ -1,58 +0,0 @@ -.TH XScreenSaver 1 "27-May-97" "X Version 11" -.SH NAME -sphere - draws shaded spheres -.SH SYNOPSIS -.B sphere -[\-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 \fIsphere\fP program draws shaded spheres. -.SH OPTIONS -.I sphere -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 64. -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 1988 by Sun Microsystems, Inc. - -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 -Sun Microsystems, Inc, 1988. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 27-May-97. diff --git a/local/man/man.1/spiral.1 b/local/man/man.1/spiral.1 deleted file mode 100644 index eeb8850b..00000000 --- a/local/man/man.1/spiral.1 +++ /dev/null @@ -1,67 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -spiral - draws moving circular spiral patterns -.SH SYNOPSIS -.B spiral -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-count \fIinteger\fP] - -.SH DESCRIPTION -The \fIspiral\fP program draws moving circular spiral patterns -.SH OPTIONS -.I spiral -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 64. -The colors are chosen randomly. -.TP 8 -.B \-count \fIinteger\fP -Default 40. -.TP 8 -.B \-cycles \fIinteger\fP -Default 350. - -.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 1994 by Darrick Brown. - -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 -Darrick Brown, 1994. - -Improved by Peter Schmitzberger , 24-Jul-95. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/starfish.1 b/local/man/man.1/starfish.1 deleted file mode 100644 index 461349fe..00000000 --- a/local/man/man.1/starfish.1 +++ /dev/null @@ -1,89 +0,0 @@ -.TH XScreenSaver 1 "14-Jun-97" "X Version 11" -.SH NAME -starfish - radially-symmetric throbbing colormap-hacking graphics demo -.SH SYNOPSIS -.B starfish -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP] [\-delay2 \fIsecs\fP] [\-cycle\-delay2 \fIusecs\fP] [\-thickness \fIpixels\fP] [\-rotation \fIdegrees\fP] [\-duration \fIseconds\fP] [\-colors \fIint\fP] [\-cycle] [\-no\-cycle] [\-blob] [\-no\-blob] -.SH DESCRIPTION -The \fIstarfish\fP program draws radially symmetric objects, which expand, -contract, rotate, and turn inside out. It uses these shapes to lay down a -field of smooth colors, and then rotates the colormap. -.SH OPTIONS -.I starfish -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 \-delay \fImicroseconds\fP -How much of a delay should be introduced between steps of the animation. -Default 10000, or about 1/100th second. -.TP 8 -.B \-cycle\-delay \fImicroseconds\fP -How long to wait between shifing the colormap by one step. -Default 100000, or about 1/10th second. -.TP 8 -.B \-thickness \fIpixels\fP -How wide each color band should be. Default 0, meaning random (the chosen -value will be between 0 and 15.) -.TP 8 -.B \-rotation \fIdegrees\fP -How quickly the objects should rotate at each step. Default 0, meaning -random (the chosen value will be between 0 and 12 degrees.) -.TP 8 -.B \-colors \fIint\fP -How many colors to use. Default 200. The more colors, the smoother the -transitions will be, and the nicer the resultant images. -.TP 8 -.B \-cycle -.TP 8 -.B \-no\-cycle -Whether to do colormap cycling. Default true. -.TP 8 -.B \-duration \fIseconds\fP -How long to run before choosing a new shape. Default 30 seconds. -.TP 8 -.B \-delay2 \fIseconds\fP -When \fIduration\fP expires, how long to wait before starting a new run. -Default 5 seconds. -.TP 8 -.B \-blob -.TP 8 -.B \-no\-blob -If \fIblob\fP option is specified, then the raw shapes will be shown, -instead of a field of colors generated from them. -.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 , 14-Jun-97. diff --git a/local/man/man.1/strange.1 b/local/man/man.1/strange.1 deleted file mode 100644 index ff278d39..00000000 --- a/local/man/man.1/strange.1 +++ /dev/null @@ -1,58 +0,0 @@ -.TH XScreenSaver 1 "10-May-97" "X Version 11" -.SH NAME -strange - draws strange attractors -.SH SYNOPSIS -.B strange -[\-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 \fIstrange\fP program draws strange attractors -.SH OPTIONS -.I strange -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 64. -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 Massimino Pascal. - -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 -Massimino Pascal , 1997. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 10-May-97. diff --git a/local/man/man.1/swirl.1 b/local/man/man.1/swirl.1 deleted file mode 100644 index 76374613..00000000 --- a/local/man/man.1/swirl.1 +++ /dev/null @@ -1,64 +0,0 @@ -.TH XScreenSaver 1 "13-May-97" "X Version 11" -.SH NAME -swirl - draws swirly color-cycling patterns -.SH SYNOPSIS -.B swirl -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-cycles \fIinteger\fP] [\-count \fIinteger\fP] - -.SH DESCRIPTION -The \fIswirl\fP program draws swirly color-cycling patterns. -.SH OPTIONS -.I swirl -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. -.TP 8 -.B \-cycles \fIinteger\fP - -.TP 8 -.B \-count \fIinteger\fP - -.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 1994 M. Dobie. - -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 -M.Dobie , 1994. - -Ability to run standalone or with \fIxscreensaver\fP added by -Jamie Zawinski , 13-May-97. diff --git a/local/man/man.1/xroger.1 b/local/man/man.1/xroger.1 deleted file mode 100644 index 799f5005..00000000 --- a/local/man/man.1/xroger.1 +++ /dev/null @@ -1,52 +0,0 @@ -.TH XScreenSaver 1 "22-mar-93" "X Version 11" -.SH NAME -xroger - throbbing X logo, of a sort -.SH SYNOPSIS -.B xroger -[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] -.SH DESCRIPTION -The \fIxroger\fP program displays a replacement for the X logo with a more -accurate Look and Feel. -.SH OPTIONS -.I xroger -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. -.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 BUGS -It should also drip blood while making a horrible screeching noise. -.SH SEE ALSO -.BR X (1), -.BR xscreensaver (1) -.SH COPYRIGHT -Copyright \(co 1992, 1993 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 fnord 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 fnord this software for any purpose. It is provided "as -is" without express or fnord implied warranty. -.SH AUTHOR -Jamie Zawinski , 13-aug-92. diff --git a/local/man/man.1/xscreensaver-command.1 b/local/man/man.1/xscreensaver-command.1 deleted file mode 100644 index 1416fe8c..00000000 --- a/local/man/man.1/xscreensaver-command.1 +++ /dev/null @@ -1,132 +0,0 @@ -.de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. -.TH XScreenSaver 1 "31-May-97" "X Version 11" -.SH NAME -xscreensaver-command - control a running xscreensaver process -.SH SYNOPSIS -.B xscreensaver-command -[\-help] [\-demo] [\-activate] [\-deactivate] [\-lock] [\-cycle] [\-next] [\-prev] [\-exit] [\-restart] [\-version] [\-time] -.SH DESCRIPTION -The \fIxscreensaver\-command\fP program controls a running \fIxscreensaver\fP -process by sending it client-messages. -.SH OPTIONS -.I xscreensaver-command -accepts the following options: -.TP 8 -.B \-help -Prints a brief summary of command-line options. -.TP 8 -.B \-demo -Cause the screensaver to enter its interactive demo mode, in which one -can experiment with the various graphics hacks available. See -.BR xscreensaver (1) -for details. -.TP 8 -.B \-activate -Tell the screensaver to turn on immediately (that is, pretend that the -user been idle for long enough.) It will turn off as soon as there is -any user activity, as usual. - -It is useful to run this from a menu; you may wish to run it as -.EX -sleep 5 ; xscreensaver-command -activate -.EE -to be sure that you have time to remove your hand from the mouse before -the screensaver comes on. -.TP 8 -.B \-deactivate -Tell the screensaver to turn off, as if there had been user activity. -If locking is enabled, then the screensaver will prompt for a password -as usual. -.TP 8 -.B \-lock -Like \fI\-activate\fP, but a password will be required before the screensaver -turns off, even if the screensaver's \fIlock\fP resource is false. The -display will be locked immediately even if the screensaver's \fIlockTimeout\fP -resource is non-zero. -.TP 8 -.B \-cycle -Tell the screensaver to change which graphics hack it is running, just -as if the ``cycle'' timer had expired. A new hack will be chosen randomly. -.TP 8 -.B \-next -This is like either \fI\-activate\fP or \fI\-cycle\fP, depending on which is -more appropriate, except that the screenhack that will be run is the next -one in the list of programs, instead of a randomly-chosen one. Repeatedly -executing this will cycle through each hack in turn (though using -the \fI\-demo\fP option is probably an easier way to accomplish that.) -.TP 8 -.B \-prev -This is like \fI\-next\fP, but cycles in the other direction. -.TP 8 -.B \-exit -Causes the screensaver process to exit gracefully. This is a safer and -easier way to kill the screensaver than by using \fIkill\fP. - -.B Warning: -never use \fIkill -9\fP with \fIxscreensaver\fP while the screensaver is -active. If you are using a virtual root window manager, that can leave -things in an inconsistent state, and you may need to restart your window -manager to repair the damage. -.TP 8 -.B \-restart -Causes the screensaver process to exit and then restart with the same command -line arguments. This is a good way of causing the screensaver to re-read the -resource database. - -If the screensaver is run from \fIxdm(1)\fP (that is, it is already running -before you log in) then you may want to issue the ``restart'' command from -one of your startup scripts, so that the screensaver gets your resource -settings instead of the default ones. -.TP 8 -.B \-version -Print (on stdout) the version number of the xscreensaver program that is -running on $DISPLAY. (To see the version number of \fIxscreensaver-command\fP -itself, use the \fI\-help\fP option.) -.TP 8 -.B \-time -This option prints on stdout the time at which the screensaver last activated -(blanked the screen) or deactivated (restored the screen.) Note that the -activation-time is not the last time at which the user was active, but is -some time later (it is the time at which either: xscreensaver decided that -the user has been idle long enough; or, the user explicitly activated the -screensaver or locker.) -.SH ENVIRONMENT -.PP -.TP 8 -.B DISPLAY -to get the host and display number of the screen whose saver is -to be manipulated. -.TP 8 -.B PATH -to find the executable to restart (for the \fI\-restart\fP command). -Note that this variable is consulted in the environment of -the \fIxscreensaver\fP process, not the \fIxscreensaver-command\fP process. -.SH "SEE ALSO" -.BR X (1), -.BR xscreensaver (1) -.SH BUGS -Some diagnostics are reported on the stderr of the \fIxscreensaver\fP -process, not this process, so the caller of \fIxscreensaver-command\fP -may not see the error messages. -.SH COPYRIGHT -Copyright \(co 1992, 1993, 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 , 13-aug-92. diff --git a/local/man/man.1/xscreensaver.1 b/local/man/man.1/xscreensaver.1 deleted file mode 100644 index 8cef0182..00000000 --- a/local/man/man.1/xscreensaver.1 +++ /dev/null @@ -1,691 +0,0 @@ -..de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. -.TH XScreenSaver 1 "31-May-97" "X Version 11" -.SH NAME -xscreensaver - graphics hack and screen locker, launched when the user is idle -.SH SYNOPSIS -.B xscreensaver -[\-display \fIhost:display.screen\fP] [\-timeout \fIint\fP] [\-cycle \fIint\fP] [\-nice \fIint\fP] [\-lock] [\-no\-lock] [\-lock\-timeout \fIint\fP] [\-demo] [\-visual \fIvisual\fP] [\-install] [\-no\-install] [\-verbose] [\-silent] [\-xidle\-extension] [\-no\-xidle\-extension] [\-sgi\-extension] [\-no\-sgi\-extension] [\-mit\-extension] [\-no\-mit\-extension] [\-xrm \fIresources\fP] -.SH DESCRIPTION -The \fIxscreensaver\fP program waits until the keyboard and mouse have been -idle for a period, and then runs a graphics demo chosen at random. It -turns off as soon as there is any mouse or keyboard activity. - -This program can lock your terminal in order to prevent others from using it, -though its default mode of operation is merely to display pretty pictures on -your screen when it is not in use. - -The benefit that this program has over the combination of the -.BR xlock (1) -and -.BR xautolock (1) -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 OPTIONS -.I xscreensaver -accepts the following command line options: -.TP 8 -.B \-timeout \fIminutes\fP -The screensaver will activate after the keyboard and mouse have been idle -for this many minutes. Default 10. -.TP 8 -.B \-cycle \fIminutes\fP -After the screensaver has been running for this many minutes, the currently -running graphics hack sub-process will be killed (with \fBSIGTERM\fP), and a -new one started. If this is 0, then the graphics hack will not be changed: -only one demo will run until the screensaver is deactivated by user activity. -Default 10. -.TP 8 -.B \-nice \fIinteger\fP -The sub-processes created by \fIxscreensaver\fP will be ``niced'' to this -level, so that they are given lower priority than other processes on the -system, and don't increase the load unnecessarily. The default is 20. - -(Higher numbers mean lower priority; see -.BR nice (1) -for details.) -.TP 8 -.B \-lock -Enable locking: before the screensaver will turn off, it requires you to -type the password of the person who launched the screensaver, or the root -password. (Note: this doesn't work if the screensaver is launched -by -.BR xdm (1) -because it can't know the user-id of the logged-in user.) -.TP 8 -.B \-no\-lock -Disable locking. This is the default. -.TP 8 -.B \-lock\-timeout \fIminutes\fP -This is how long after the screensaver activates that locking is enabled. -For example, if this is 5, and \fI\-timeout\fP is 10, then after 10 minutes, -the screen would blank. If there was user activity at 12 minutes, no password -would be required. But, if there was user activity at 15 minutes or later -(\fI\-lock\-timeout\fP minutes after activation) then a password would be -required. The default is 0, meaning that if locking is enabled, then -a password will be required as soon as the screensaver activates. -.TP 8 -.B \-demo -Enter the interactive demo mode immediately after startup. Normally -demo mode is invoked via the -.BR xscreensaver\-command (1) -program, but this is a shortcut for new users. See below for a description -of how demo-mode works. -.TP 8 -.B \-visual \fIvisual\fP -Specify which X visual to use by default. Legal values are: -.RS 8 -.TP 8 -.B default -Use the screen's default visual (the visual of the root window.) -This is the default. -.TP 8 -.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. -.TP 8 -.B mono -Use a monochrome visual, if there is one. -.TP 8 -.B gray -Use a grayscale or staticgray visual, if there is one and it has more than -one plane (that is, it's not monochrome.) -.TP 8 -.B color -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. -.TP 8 -.I number -where \fInumber\fP (decimal or hex) is interpreted as a visual id number, -as reported by the -.BR xdpyinfo (1) -program; in this way you can have finer control over exactly which visual -gets used, for example, to select a shallower one than would otherwise -have been chosen. -.RE -.RS 8 -.PP -Note that this option specifies only the \fIdefault\fP visual that will -be used: the visual used may be overridden on a program-by-program basis. -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.) -.TP 8 -.B \-no\-install -Use the default colormap. -.TP 8 -.B \-verbose -Print diagnostics. -.TP 8 -.B \-silent - -.TP 8 -.B \-xidle\-extension -Use the \fBXIDLE\fP server extension to decide whether the user is idle. -This is the default if \fIxscreensaver\fP has been compiled with support -for this extension. On X11R4 or X11R5 systems, the XIdle method is faster -and more reliable than what will be done otherwise, so use it if you can. -.TP 8 -.B \-no\-xidle\-extension -Don't use the \fBXIDLE\fP server extension. -.TP 8 -.B \-sgi\-extension -Use the SGI \fBSCREEN_SAVER\fP server extension to decide whether the user -is idle. This is the default if \fIxscreensaver\fP has been compiled with -support for this extension (which is the default on SGI systems.). If it -is available, the \fBSCREEN_SAVER\fP method is faster and more reliable than -what will be done otherwise, so use it if you can. -.TP 8 -.B \-no\-sgi\-extension -Don't use the SGI \fBSCREEN_SAVER\fP server extension. -.TP 8 -.B \-mit\-extension -Use the \fBMIT\-SCREEN\-SAVER\fP server extension to decide whether the user -is idle. This is the default if \fIxscreensaver\fP has been compiled with -support for this extension. However, this extension is flaky, so it's use -is not really recommended. (It also makes the \fIfade\fP option not work -properly.) -.TP 8 -.B \-no\-mit\-extension -Don't use the \fBMIT\-SCREEN\-SAVER\fP server extension. -.SH X RESOURCES -\fIxscreensaver\fP understands the following resources: -.PP -.TP 8 -.B timeout \fR(class \fBTime\fP) -Same as the \fI\-timeout\fP command-line option. Default 10 minutes. -.TP 8 -.B cycle \fR(class \fBTime\fP) -Same as the \fI\-cycle\fP command-line option. Default 10 minutes. -.TP 8 -.B nice \fR(class \fBNice\fP) -Same as the \fI\-nice\fP command-line option. Default 10. -.TP 8 -.B lock \fR(class \fBBoolean\fP) -Same as the \fI\-lock\fP command-line option. -.TP 8 -.B lockTimeout \fR(class \fBTime\fP) -Same as the \fI\-lock\-timeout\fP command-line option. -.TP 8 -.B passwdTimeout \fR(class \fBTime\fP) -If the screen is locked, then this is how many seconds the password dialog box -should be left on the screen before giving up (default 30.) This should not -be too large: the X server is grabbed for the duration that the password -dialog box is up (for security purposes) and leaving the server grabbed for -too long can cause problems. -.TP 8 -.B verbose \fR(class \fBBoolean\fP) -Same as the \fI\-verbose\fP command-line option. -.TP 8 -.B xidle \fR(class \fBBoolean\fP) -Same as the \fI\-xidle\fP command-line option. -.TP 8 -.B fade \fR(class \fBBoolean\fP) -If this is true, then when the screensaver activates, the current contents -of the screen will fade to black instead of simply winking out. This only -works on displays with writable colormaps, that is, if the screen's default -visual is a PseudoColor visual. Default true. A fade will also be done when -switching graphics hacks (when the \fIcycle\fP timer expires.) -.TP 8 -.B unfade \fR(class \fBBoolean\fP) -If this is true, then when the screensaver deactivates, the original contents -of the screen will fade in from black instead of appearing immediately. This -only works on displays with writable colormaps, and if \fIfade\fP is true -as well. Default false. -.TP 8 -.B fadeSeconds \fR(class \fBTime\fP) -If \fIfade\fP is true, this is how long the fade will be in -seconds (default 3.) -.TP 8 -.B fadeTicks \fR(class \fBInteger\fP) -If \fIfade\fP is true, this is how many times a second the colormap will -be changed to effect a fade. Higher numbers yield smoother fades, but -may make the fades take longer than the specified \fIfadeSeconds\fP if -your server isn't fast enough to keep up. Default 20. -.TP 8 -.B visualID \fR(class \fBVisualID\fP) -Same as the \fI\-visual\fP command-line option. Default \fBdefault\fP. -.TP 8 -.B installColormap \fR(class \fBBoolean\fP) -Same as the \fI\-install\fP command-line option. Default true. -.TP 8 -.B captureStderr \fR(class \fBBoolean\fP) -Whether \fIxscreensaver\fP should redirect its standard-error stream to the -window itself. Since its nature is to take over the screen, you would not -normally see error messages generated by the screensaver or the programs it -runs; this resource will cause the output of all relevant programs to be -drawn on the screensaver window itself instead of written to the controlling -terminal of the screensaver driver process. Default true. -.TP 8 -.B captureStdout \fR(class \fBBoolean\fP) -Like \fBcaptureStderr\fP but for the standard-output stream. Default true. -.TP 8 -.B font \fR(class \fBFont\fP) -The font used for the stdout/stderr text, if \fBcaptureStdout\fP or -\fBcaptureStderr\fP are true. Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP -(a 14 point fixed-width font.) -.TP 8 -.B textForeground \fR(class \fBForeground\fP) -The foreground color used for the stdout/stderr text, if \fBcaptureStdout\fP -or \fBcaptureStderr\fP are true. Default: Yellow. -.TP 8 -.B textBackground \fR(class \fBBackground\fP) -The background color used for the stdout/stderr text, if \fBcaptureStdout\fP -or \fBcaptureStderr\fP are true. Default: Black. -.TP 8 -.B programs \fR(class \fBPrograms\fP) -The graphics hacks which \fIxscreensaver\fP runs when the user is idle. -The value of this resource is a string, one \fIsh\fP-syntax command per line. -Each line must contain exactly one command -- no semicolons, no ampersands. - -When the screensaver starts up, one of these is selected at random, and -run. After the \fIcycle\fP period expires, it is killed, and another -is selected and run. - -If the value of this resource is empty, then no programs will be run; the -screen will simply be made black. - -If the display has multiple screens, then a different program will be run -for each screen. - -Note that you must escape the newlines; here is an example of how you -might set this in your \fI.Xdefaults\fP file: - -.EX -xscreensaver.programs: \\ - qix -root \\n\\ - ico -r -faces -sleep 1 -obj ico \\n\\ - xdaliclock -builtin2 -root \\n\\ - xv -root -rmode 5 image.gif -quit \\n -.EE -.RS 8 -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'' -windows, as used by virtual window managers such as \fItvtwm\fP. (Generally, -this is accomplished by just including the \fI"vroot.h"\fP header file in -the program's source.) - -If there are some programs that you want to run only when using a color -display, and others that you want to run only when using a monochrome -display, you can specify that like this: - -.EX - mono: mono-program -root \\n\\ - color: color-program -root \\n\\ -.EE -.RE -.RS 8 -More generally, you can specify the kind of visual that should be used for -the window on which the program will be drawing. For example, if one -program works best if it has a colormap, but another works best if it has -a 24-bit visual, both can be accomidated: - -.EX - PseudoColor: cmap-program -root \\n\\ - TrueColor: 24bit-program -root \\n\\ -.EE -.RE -.RS 8 -(This sort of thing used to be accomplished with the \fIcolorPrograms\fP -and \fImonoPrograms\fP resources, but those resources have now been removed; -a warning will be issued if they are used.) - -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 -arrange for appropriate hacks to be run on each. For example, if one screen -is color and the other is monochrome, hacks that look good in mono can be -run on one, and hacks that only look good in color will show up on the other. -.RE -.PP -.PP -Normally you won't need to change the following resources: -.TP 8 -.B bourneShell \fR(class \fBBourneShell\fP) -The pathname of the shell that \fIxscreensaver\fP uses to start subprocesses. -This must be whatever your local variant of \fB/bin/sh\fP is -- in particular, -it must not be \fBcsh\fP. -.TP 8 -.B windowCreationTimeout \fR(class \fBTime\fP) -When server extensions are not in use, this controls the delay between when -windows are created and when \fIxscreensaver\fP selects events on them. -Default 30 seconds. -.TP 8 -.B pointerPollTime \fR(class \fBTime\fP) -When server extensions are not in use, this controls how -frequently \fIxscreensaver\fP checks to see if the mouse position or buttons -have changed. Default 5 seconds. -.TP 8 -.B initialDelay \fR(class \fBTime\fP) -When server extensions are not in use, \fIxscreensaver\fP will wait this many -seconds before selecting events on existing windows, under the assumption that -\fIxscreensaver\fP is started during your login procedure, and the window -state may be in flux. Default 30 seconds. -.TP 8 -.B overlayStderr \fR(class \fBBoolean\fP) -If \fBcaptureStderr\fP or \fBcaptureStdout\fP are True, and your server -supports ``overlay'' visuals, then the text will be written into one of -the higher layers instead of into the same layer as the running screenhack. -Set this to False to disable that (though you shouldn't need to.) -.SH "HOW IT WORKS" -When it is time to activate the screensaver, a full-screen black window is -created on each screen of the display. The window or windows is given the -appropriate properties so that, to any subsequently-created programs, it -will appear to be a ``virtual root'' window. Because of this, any program -which draws on the root window (and which understands virtual roots) can be -used as a screensaver. - -When the user becomes active again, the screensaver windows are unmapped and -the running subprocesses are killed by sending them \fBSIGTERM\fP. This is -also how the subprocesses are killed when the screensaver decides that it's -time to run a different demo: the old one is killed and a new one is launched. - -Before launching a subprocess, \fIxscreensaver\fP stores an appropriate value -for \fB$DISPLAY\fP in the environment that the child will recieve. (This is -so that if you start \fIxscreensaver\fP with a \fI-display\fP argument, the -programs which \fIxscreensaver\fP launches will draw on the same display; -and so that the child will end up drawing on the appropriate screen of a -multi-headed display.) - -When the screensaver turns off, or is killed, care is taken to restore -the ``real'' virtual root window if there is one. Because of this, it is -important that you not kill the screensaver process with \fIkill -9\fP if -you are running a virtual-root window manager. If you kill it with \-9, -you may need to restart your window manager to repair the damage. This -isn't an issue if you aren't running a virtual-root window manager. - -For all the gory details, see the commentary at the top of xscreensaver.c. - -You can control a running screensaver process by using the -.BR xscreensaver\-command (1) -program (which see.) -.SH USING XDM(1) -You can run \fIxscreensaver\fP from your xdm session, so that the -screensaver will run even when nobody is logged in on the console. -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. - -(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 -in the \fIxdm-config\fP file. See the man page for -.BR xdm (1) -for more details.) - -Users may want to add \fB"xscreensaver-command -restart"\fP to their -startup scripts, so that the screensaver will be reinitialized with -their private resource settings when they log in. - -It is safe to run this program as root (as \fIxdm\fP is likely to do.) If -run as root, \fIxscreensaver\fP changes its effective user and group ids to -something safe (like \fI"nobody"\fP) before connecting to the X server -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: - -.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 -.BR xscreensaver\-command (1) -except that when executed from this button, the screensaver will -automatically return to demo mode after restarting. -.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.) -.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. -.TP 8 -Machine Load -Although this program ``nices'' the subprocesses that it starts, -graphics-intensive subprograms can still overload the machine by causing -the X server process itself (which is not ``niced'') to suck a lot of -cycles. Care should be taken to slow down programs intended for use as -screensavers by inserting strategic calls to -.BR sleep (3) -or -.BR usleep (3) -(or making liberal use of any \fI\-delay\fP options which the programs -may provide.) - -Also, an active screensaver will cause your X server to be pretty much -permanently swapped in; but the same is true of any program that draws -periodically, like -.BR xclock (1) -or -.BR xload (1). -.TP 8 -Latency and Responsiveness -If the subprocess is drawing too quickly and the connection to the X -server is a slow one (such as an X terminal running over a phone line) then -the screensaver might not turn off right away when the user becomes active -again (the -.BR ico (1) -demo has this problem if being run in full-speed mode). This can be -alleviated by inserting strategic calls to -.BR XSync (3) -in code intended for use as a screensaver. This prevents too much graphics -activity from being buffered up. -.TP 8 -Locking and XDM -Locking doesn't work if the screensaver is launched by \fIxdm\fP. -The reason for this is that when it is launched by \fIxdm\fP, the -screensaver process is owned by some standard user id (such as \fIroot\fP -or \fIdaemon\fP) instead of the user who is logged in on the console: -because the screensaver was started \fIbefore\fP anyone was logged in. -In order for the screensaver to prompt for the password of the person -who had logged in from \fIxdm\fP, it would need to know who that user was, -and there is no reliable and safe way to figure that out. (And even if -there was, there would be some other security issues here as well.) - -So if you want to use it as a locker, you must start it with your user id. -If it has already been started by \fIxdm\fP, you can kill it with -\fBxscreensaver-command -exit\fP, and then start it again as you. -.TP 8 -Passwords -If you get an error message like ``couldn't get password of \fIuser\fP'' -then this probably means that you're on a system in which the -.BR getpwent (3) -library routine can only be effectively used by root. If this is the case, -then \fIxscreensaver\fP must be installed as setuid to root. Care has -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. -.TP 8 -TWM and Colormaps -The \fBinstallColormap\fP option doesn't work very well with the -.BR twm (1) -window manager and its descendants. - -There is a race condition between the screensaver and this window manager, -which can result in the screensaver's colormap not getting installed -properly, meaning the graphics hacks will appear in essentially random -colors. (If the screen goes white instead of black, this is probably why.) - -The -.BR mwm (1) -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 -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 -not do it if the screensaver comes on of its own volition, or is activated -from another console. Any thoughts on this problem are welcome... -.TP 8 -XView Clients -Apparently there are some problems with XView programs getting confused -and thinking that the screensaver window is the real root window even when -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. -.TP 8 -MIT Extension and Fading -When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with -the \fBfade\fP option, you may notice an unattractive flicker just before -the fade begins. This is because the server maps a black window just before -it tells the \fIxscreensaver\fP process to activate. The \fIxscreensaver\fP -process immediately unmaps that window, but this results in a flicker. I -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. -.TP 8 -Red Hot Lava -There need to be a lot more graphics hacks. In particular, there should be -a simulation of a Lavalite (tm). -.SH ENVIRONMENT -.PP -.TP 8 -.B DISPLAY -to get the default host and display number, and to inform the sub-programs -of the screen on which to draw. -.TP 8 -.B XENVIRONMENT -to get the name of a resource file that overrides the global resources -stored in the RESOURCE_MANAGER property. -.SH UPGRADES -The latest version can always be found at -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 attraction (1), -.BR greynetic (1), -.BR helix (1), -.BR hopalong (1), -.BR noseguy (1), -.BR pyro (1), -.BR xroger (1), -.BR qix (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 sierpinski (1), -.BR hopalong (1), -.BR braid (1), -.BR bouboule (1), -.BR galaxy (1), -.BR flag (1), -.BR forest (1), -.BR sphere (1), -.BR lisa (1), -.BR xdaliclock (1), -.BR xbouncebits (1), -.BR ico (1), -.BR xswarm (1), -.BR xwave (1), -.BR xv (1), -.BR xtacy (1), -.BR bongo (1), -.BR xfishtank (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 -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 . Written in late 1991; first posted -to comp.sources.x on 13-Aug-1992. - -Please let me know if you find any bugs or make any improvements. - -Thanks to David Wojtowicz for implementing \fIlockTimeout\fP. - -Thanks to Martin Kraemer for adding support for shadow passwords and -locking-disabled diagnostics. - -Thanks to the many people who have contributed graphics demos to the package. - -Thanks to Patrick Moreau for the VMS port. - -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. diff --git a/makevms.com b/makevms.com new file mode 100644 index 00000000..213cc0ca --- /dev/null +++ b/makevms.com @@ -0,0 +1,57 @@ +$! Build Xscreensaver under OpenVMS V 6.x system with DEC C 5.x compiler +$! +$ copy /log CONFIG.H-VMS CONFIG.H +$! +$! Architecture type test (VAX < 1024 <= Alpha AXP) +$! +$ if f$getsyi("HW_MODEL").ge.1024 +$ then +$! +$! Alpha AXP +$! build Utils library +$! +$ set def [.UTILS] +$ @COMPILE_AXP +$ set def [-] +$! +$! build graphics hacks +$! +$ set def [.HACKS] +$ @COMPILE_AXP +$ @LINK_AXP +$ set def [-] +$! +$! Build Xscreensaver & Xscreensaver-command +$! +$ set def [.DRIVER] +$ @COMPILE_AXP +$ @LINK_AXP +$ set def [-] +$ else +$! +$! Good old VAX +$! build Utils library +$! +$ set def [.UTILS] +$ @COMPILE_DECC +$ set def [-] +$! +$! build graphics hacks +$! +$ set def [.HACKS] +$ @COMPILE_DECC +$ @LINK_DECC +$ set def [-] +$! +$! Build Xscreensaver & Xscreensaver-command +$! +$ set def [.DRIVER] +$ @COMPILE_DECC +$ @LINK_DECC +$ set def [-] +$ endif +$! +$! DCL symbols definition +$! +$ @SETUP +$ exit diff --git a/screenblank.txt b/screenblank.txt new file mode 100644 index 00000000..17621585 --- /dev/null +++ b/screenblank.txt @@ -0,0 +1,46 @@ +From mrapple@quack.kfu.com Mon Apr 26 18:31:07 1993 +Newsgroups: alt.hackers +From: mrapple@quack.kfu.com (Nick Sayer) +Subject: screenblank and xautolock living in harmony +Organization: The Duck Pond public unix: +1 408 249 9630, log in as 'guest'. +Date: 23 Apr 1993 19:26:57 UTC + + +I have a Sun and use xinit to start X. This presented a problem. +If I use xautolock or xscreensaver to save the screen, then after +a period of inactivity screenblank would turn the video off despite +'xset s off'. If I didn't run screenblank, then who would take care of +the display when X wasn't running? + +The hack that saved the day was to include this in .xinitrc: + +( + +while true ; do +sleep 360 +touch /dev/console +done + +) & +killblank=$! + +[start up all the clients, etc, etc. Wait for the window manager +to die, then ] + +kill $killblank + +The result is that screenblank is kept safely out of the way when X +is running and left to do its job otherwise. + +Yes, I know using XDM would solve this problem. + +No, I'm probably not the first to think of this. + +You're welcome. + +-- +Nick Sayer | "Dear Sexy Nickers. I don't half fancy +N6QQQ @ N0ARY.#NOCAL.CA.USA.NOAM | you. Meet me at the lift at 5:30 and ++1 408 249 9630, log in as 'guest' | we'll get it together." +PGP 2.2 public key via finger | -- Mr. Lucas + diff --git a/setup.com b/setup.com new file mode 100644 index 00000000..6fe518f3 --- /dev/null +++ b/setup.com @@ -0,0 +1,58 @@ +$! Xscreensaver - definition of various DCL symbols +$ 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 +$ 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 +$ set def [-.DRIVER] +$ mydir = mydisk+f$directory() +$ xscreensaver :== $'mydir'xscreensaver +$ xscreen*command :== $'mydir'xscreensaver-command +$ set def [-] +$ exit diff --git a/utils/Makefile.in b/utils/Makefile.in new file mode 100644 index 00000000..9198bd87 --- /dev/null +++ b/utils/Makefile.in @@ -0,0 +1,150 @@ +# utils/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# the `../configure' script generates `utils/Makefile' from this file. + +@SET_MAKE@ +.SUFFIXES: +.SUFFIXES: .c .o + +srcdir = @srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ + +CC = @CC@ +CFLAGS = @CFLAGS@ +DEFS = @DEFS@ + +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +SHELL = /bin/sh + +X_CFLAGS = @X_CFLAGS@ + +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 +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 +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 +EXTRAS = README Makefile.in ad2c +VMSFILES = compile_axp.com compile_decc.com vms-gtod.c vms-gtod.h \ + vms-strdup.c + +TARFILES = $(EXTRAS) $(VMSFILES) $(SRCS) $(HDRS) + + +all: $(OBJS) + +install: install-program install-man +uninstall: uninstall-program uninstall-man + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install + +install-program: +install-man: +uninstall-program: +uninstall-man: + +clean: + -rm -f *.o a.out core + +distclean: clean + -rm -f Makefile *~ "#"* + +# Adds all current dependencies to Makefile +depend: + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SRCS) + +# Adds some dependencies to Makefile.in -- not totally accurate, but pretty +# 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: + @echo updating dependencies in `pwd`/Makefile.in... ; \ + $(DEPEND) -w 0 -f - \ + -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ + $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ + $(SRCS) | \ + ( \ + awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +TAGS: tags +tags: + find $(srcdir) -name '*.[chly]' -print | xargs etags -a + +echo_tarfiles: + @echo $(TARFILES) + + +# How we build object files in this directory. +.c.o: + $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< + + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +alpha.o: $(srcdir)/utils.h +alpha.o: $(srcdir)/../config.h +alpha.o: $(srcdir)/alpha.h +alpha.o: $(srcdir)/hsv.h +alpha.o: $(srcdir)/yarandom.h +alpha.o: $(srcdir)/resources.h +colors.o: $(srcdir)/utils.h +colors.o: $(srcdir)/../config.h +colors.o: $(srcdir)/hsv.h +colors.o: $(srcdir)/yarandom.h +colors.o: $(srcdir)/visual.h +colors.o: $(srcdir)/colors.h +fade.o: $(srcdir)/utils.h +fade.o: $(srcdir)/../config.h +fade.o: $(srcdir)/visual.h +fade.o: $(srcdir)/usleep.h +fade.o: $(srcdir)/fade.h +grabscreen.o: $(srcdir)/utils.h +grabscreen.o: $(srcdir)/../config.h +grabscreen.o: $(srcdir)/usleep.h +grabscreen.o: $(srcdir)/colors.h +grabscreen.o: $(srcdir)/grabscreen.h +grabscreen.o: $(srcdir)/vroot.h +grabscreen.o: $(srcdir)/visual.h +hsv.o: $(srcdir)/utils.h +hsv.o: $(srcdir)/../config.h +hsv.o: $(srcdir)/hsv.h +overlay.o: $(srcdir)/utils.h +overlay.o: $(srcdir)/../config.h +overlay.o: $(srcdir)/visual.h +resources.o: $(srcdir)/utils.h +resources.o: $(srcdir)/../config.h +resources.o: $(srcdir)/resources.h +spline.o: $(srcdir)/utils.h +spline.o: $(srcdir)/../config.h +spline.o: $(srcdir)/spline.h +usleep.o: $(srcdir)/../config.h +visual.o: $(srcdir)/utils.h +visual.o: $(srcdir)/../config.h +visual.o: $(srcdir)/resources.h +visual.o: $(srcdir)/visual.h +xmu.o: $(srcdir)/../config.h +xroger.o: $(srcdir)/utils.h +xroger.o: $(srcdir)/../config.h +yarandom.o: $(srcdir)/../config.h +yarandom.o: $(srcdir)/yarandom.h + diff --git a/utils/README b/utils/README new file mode 100644 index 00000000..2f5bc119 --- /dev/null +++ b/utils/README @@ -0,0 +1,6 @@ + +This directory contains various utilities that are used both by the +screensaver driver and by the demo programs; for example, a portable +implementation of usleep(), and code for manipulating color maps. + +If you have compilation problems, check the parameters in ../config.h. diff --git a/utils/ad2c b/utils/ad2c new file mode 100755 index 00000000..1435e554 --- /dev/null +++ b/utils/ad2c @@ -0,0 +1,38 @@ +#!/bin/sh +# +# ad2c : Convert app-defaults file to C strings decls. +# +# George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990. +# 19 Mar 1991 : gf +# Made it self-contained. +# 6 Jan 1992 : mycroft@gnu.ai.mit.edu (Charles Hannum) +# Removed use of "-n" and ":read" label since Gnu and +# IBM sed print pattern space on "n" command. Still works +# with Sun sed, of course. +# 7 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier) +# Escape quotes after escaping backslashes. +# + +sed ' +/^!/d +/^$/d +s/\\/\\\\/g +s/\\$//g +s/"/\\"/g +s/^/"/ +: test +/\\$/b slash +s/$/",/ +p +d +: slash +n +/^!/d +/^$/d +s/"/\\"/g +s/\\\\/\\/g +s/\\n/\\\\n/g +s/\\t/\\\\t/g +s/\\f/\\\\f/g +s/\\b/\\\\b/g +b test' "$@" diff --git a/utils/alpha.c b/utils/alpha.c new file mode 100644 index 00000000..0f55ca01 --- /dev/null +++ b/utils/alpha.c @@ -0,0 +1,177 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997 + * 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. + */ + +/* Beauty is only skin deep, unless you've got an alpha channel. */ + + +#include "utils.h" +#include "alpha.h" +#include "hsv.h" +#include "yarandom.h" +#include "resources.h" + +#ifndef countof +# define countof(x) (sizeof(*(x))/sizeof((x))) +#endif + + +/* I don't believe this fucking language doesn't have builtin exponentiation. + I further can't believe that the fucking ^ character means fucking XOR!! */ +static int +i_exp (int i, int j) +{ + int k = 1; + while (j--) k *= i; + return k; +} + + +static void +merge_colors (int argc, XColor **argv, XColor *into_color, int mask, + Bool additive_p) +{ + int j; + *into_color = *argv [0]; + into_color->pixel |= mask; + + for (j = 1; j < argc; j++) + { +# define SHORT_INC(x,y) (x = ((((x)+(y)) > 0xFFFF) ? 0xFFFF : ((x)+(y)))) +# define SHORT_DEC(x,y) (x = ((((x)-(y)) < 0) ? 0 : ((x)-(y)))) + if (additive_p) + { + SHORT_INC (into_color->red, argv[j]->red); + SHORT_INC (into_color->green, argv[j]->green); + SHORT_INC (into_color->blue, argv[j]->blue); + } + else + { + SHORT_DEC (into_color->red, argv[j]->red); + SHORT_DEC (into_color->green, argv[j]->green); + SHORT_DEC (into_color->blue, argv[j]->blue); + } +# undef SHORT_INC +# undef SHORT_DEC + } +} + +static void +permute_colors (XColor *pcolors, XColor *colors, + int count, + unsigned long *plane_masks, + Bool additive_p) +{ + int out = 0; + int max = i_exp (2, count); + if (count > 31) abort (); + for (out = 1; out < max; out++) + { + XColor *argv [32]; + int this_mask = 0; + int argc = 0; + int bit; + for (bit = 0; bit < 32; bit++) + if (out & (1< 1 && + !XAllocColorCells (dpy, cmap, False, plane_masks, nplanes, + base_pixel_ret, 1)) + nplanes--; + + return nplanes; +} + + +void +initialize_transparency_colormap (Display *dpy, Colormap cmap, + int nplanes, + unsigned long base_pixel, + unsigned long *plane_masks, + XColor *colors, + Bool additive_p) +{ + int i; + int total_colors = i_exp (2, nplanes); + XColor *all_colors = (XColor *) calloc (total_colors, sizeof (XColor)); + + for (i = 0; i < nplanes; i++) + colors[i].pixel = base_pixel | plane_masks [i]; + permute_colors (colors, all_colors, nplanes, plane_masks, additive_p); + + /* clone the default background of the window into our "base" pixel */ + all_colors [total_colors - 1].pixel = + get_pixel_resource ("background", "Background", dpy, cmap); + XQueryColor (dpy, cmap, &all_colors [total_colors - 1]); + all_colors [total_colors - 1].pixel = base_pixel; + + for (i = 0; i < total_colors; i++) + all_colors[i].flags = DoRed|DoGreen|DoBlue; + XStoreColors (dpy, cmap, all_colors, total_colors); + XFree ((XPointer) all_colors); +} + + +Bool +allocate_alpha_colors (Display *dpy, Colormap cmap, + int *nplanesP, Bool additive_p, + unsigned long **plane_masks, + unsigned long *base_pixelP) +{ + XColor *colors; + int nplanes = *nplanesP; + int i; + + if (nplanes > 31) nplanes = 31; + *plane_masks = (unsigned long *) malloc(sizeof(unsigned long) * nplanes); + + nplanes = allocate_color_planes (dpy, cmap, nplanes, *plane_masks, + base_pixelP); + *nplanesP = nplanes; + + if (nplanes <= 1) + { + free(*plane_masks); + *plane_masks = 0; + return False; + } + + colors = (XColor *) calloc (nplanes, sizeof (XColor)); + for (i = 0; i < nplanes; i++) + { + /* pick the base colors. If we are in subtractive mode, pick higher + intensities. */ + hsv_to_rgb (random () % 360, + frand (1.0), + frand (0.5) + (additive_p ? 0.2 : 0.5), + &colors[i].red, + &colors[i].green, + &colors[i].blue); + } + initialize_transparency_colormap (dpy, cmap, nplanes, + *base_pixelP, *plane_masks, colors, + additive_p); + XFree ((XPointer) colors); + return True; +} diff --git a/utils/alpha.h b/utils/alpha.h new file mode 100644 index 00000000..e16b3edb --- /dev/null +++ b/utils/alpha.h @@ -0,0 +1,32 @@ +/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997 + * 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. + */ + +#ifndef __XSCREENSAVER_ALPHA_H__ +#define __XSCREENSAVER_ALPHA_H__ + +extern int allocate_color_planes (Display *dpy, Colormap cmap, + int nplanes, unsigned long *plane_masks, + unsigned long *base_pixel_ret); + +extern void initialize_transparency_colormap (Display *dpy, Colormap cmap, + int nplanes, + unsigned long base_pixel, + unsigned long *plane_masks, + XColor *colors, + Bool additive_p); + +extern Bool allocate_alpha_colors (Display *dpy, Colormap cmap, + int *nplanesP, Bool additive_p, + unsigned long **plane_masks, + unsigned long *base_pixelP); + +#endif /* __XSCREENSAVER_ALPHA_H__ */ diff --git a/utils/colors.c b/utils/colors.c new file mode 100644 index 00000000..93366b64 --- /dev/null +++ b/utils/colors.c @@ -0,0 +1,681 @@ +/* xscreensaver, Copyright (c) 1997 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. + */ + +/* This file contains some utility routines for randomly picking the colors + to hack the screen with. + */ + +#include "utils.h" +#include "hsv.h" +#include "yarandom.h" +#include "visual.h" +#include "colors.h" + +extern char *progname; + +void +free_colors(Display *dpy, Colormap cmap, XColor *colors, int ncolors) +{ + int i; + unsigned long *pixels = (unsigned long *) malloc(sizeof(*pixels) * ncolors); + for (i = 0; i < ncolors; i++) + pixels[i] = colors[i].pixel; + XFreeColors (dpy, cmap, pixels, ncolors, 0L); + free(pixels); +} + + +void +allocate_writable_colors (Display *dpy, Colormap cmap, + unsigned long *pixels, int *ncolorsP) +{ + int desired = *ncolorsP; + int got = 0; + int requested = desired; + unsigned long *new_pixels = pixels; + + *ncolorsP = 0; + while (got < desired + && requested > 0) + { + if (desired - got > requested) + requested = desired - got; + + if (XAllocColorCells (dpy, cmap, False, 0, 0, new_pixels, requested)) + { + /* Got all the pixels we asked for. */ + new_pixels += requested; + got += requested; + } + else + { + /* We didn't get all/any of the pixels we asked for. This time, ask + for half as many. (If we do get all that we ask for, we ask for + the same number again next time, so we only do O(log(n)) server + roundtrips.) + */ + requested = requested / 2; + } + } + *ncolorsP += got; +} + + + +void +make_color_ramp (Display *dpy, Colormap cmap, + int h1, double s1, double v1, /* 0-360, 0-1.0, 0-1.0 */ + int h2, double s2, double v2, /* 0-360, 0-1.0, 0-1.0 */ + XColor *colors, int *ncolorsP, + Bool closed_p, + Bool allocate_p, + Bool writable_p) +{ + int i; + int ncolors = *ncolorsP; + double dh, ds, dv; /* deltas */ + + AGAIN: + + memset (colors, 0, (*ncolorsP) * sizeof(*colors)); + + if (closed_p) + ncolors = (ncolors / 2) + 1; + + /* Note: unlike other routines in this module, this function assumes that + if h1 and h2 are more than 180 degrees apart, then the desired direction + is always from h1 to h2 (rather than the shorter path.) make_uniform + depends on this. + */ + dh = ((double)h2 - (double)h1) / ncolors; + ds = (s2 - s1) / ncolors; + dv = (v2 - v1) / ncolors; + + for (i = 0; i < ncolors; i++) + { + colors[i].flags = DoRed|DoGreen|DoBlue; + hsv_to_rgb ((int) (h1 + (i*dh)), (s1 + (i*ds)), (v1 + (i*dv)), + &colors[i].red, &colors[i].green, &colors[i].blue); + } + + if (closed_p) + for (i = ncolors; i < *ncolorsP; i++) + colors[i] = colors[(*ncolorsP)-i]; + + if (!allocate_p) + return; + + if (writable_p) + { + unsigned long *pixels = (unsigned long *) + malloc(sizeof(*pixels) * ((*ncolorsP) + 1)); + + /* allocate_writable_colors() won't do here, because we need exactly this + number of cells, or the color sequence we've chosen won't fit. */ + if (! XAllocColorCells(dpy, cmap, False, 0, 0, pixels, *ncolorsP)) + { + free(pixels); + goto FAIL; + } + + for (i = 0; i < *ncolorsP; i++) + colors[i].pixel = pixels[i]; + free (pixels); + + XStoreColors (dpy, cmap, colors, *ncolorsP); + } + else + { + for (i = 0; i < *ncolorsP; i++) + { + XColor color; + color = colors[i]; + if (XAllocColor (dpy, cmap, &color)) + { + colors[i].pixel = color.pixel; + } + else + { + free_colors (dpy, cmap, colors, i); + goto FAIL; + } + } + } + + return; + + FAIL: + /* we weren't able to allocate all the colors we wanted; + decrease the requested number and try again. + */ + ncolors = (ncolors > 170 ? ncolors - 20 : + ncolors > 100 ? ncolors - 10 : + ncolors > 75 ? ncolors - 5 : + ncolors > 25 ? ncolors - 3 : + ncolors > 10 ? ncolors - 2 : + ncolors > 2 ? ncolors - 1 : + 0); + *ncolorsP = ncolors; + if (ncolors > 0) + goto AGAIN; +} + + +#define MAXPOINTS 50 /* yeah, so I'm lazy */ + + +static void +make_color_path (Display *dpy, Colormap cmap, + int npoints, int *h, double *s, double *v, + XColor *colors, int *ncolorsP, + Bool allocate_p, + Bool writable_p) +{ + int i, j, k; + int total_ncolors = *ncolorsP; + + int ncolors[MAXPOINTS]; /* number of pixels per edge */ + double dh[MAXPOINTS]; /* distance between pixels, per edge (0 - 360.0) */ + double ds[MAXPOINTS]; /* distance between pixels, per edge (0 - 1.0) */ + double dv[MAXPOINTS]; /* distance between pixels, per edge (0 - 1.0) */ + + if (npoints == 0) + { + *ncolorsP = 0; + return; + } + else if (npoints == 2) /* using make_color_ramp() will be faster */ + { + make_color_ramp (dpy, cmap, + h[0], s[0], v[0], h[1], s[1], v[1], + colors, ncolorsP, + True, /* closed_p */ + allocate_p, writable_p); + return; + } + else if (npoints >= MAXPOINTS) + { + npoints = MAXPOINTS-1; + } + + AGAIN: + + { + double DH[MAXPOINTS]; /* Distance between H values in the shortest + direction around the circle, that is, the + distance between 10 and 350 is 20. + (Range is 0 - 360.0.) + */ + double edge[MAXPOINTS]; /* lengths of edges in unit HSV space. */ + double ratio[MAXPOINTS]; /* proportions of the edges (total 1.0) */ + double circum = 0; + double one_point_oh = 0; /* (debug) */ + + for (i = 0; i < npoints; i++) + { + int j = (i+1) % npoints; + double d = ((double) (h[i] - h[j])) / 360; + if (d < 0) d = -d; + if (d > 0.5) d = 0.5 - (d - 0.5); + DH[i] = d; + } + + for (i = 0; i < npoints; i++) + { + int j = (i+1) % npoints; + edge[i] = sqrt((DH[i] * DH[j]) + + ((s[j] - s[i]) * (s[j] - s[i])) + + ((v[j] - v[i]) * (v[j] - v[i]))); + circum += edge[i]; + } + +#ifdef DEBUG + fprintf(stderr, "\ncolors:"); + for (i=0; i < npoints; i++) + fprintf(stderr, " (%d, %.3f, %.3f)", h[i], s[i], v[i]); + fprintf(stderr, "\nlengths:"); + for (i=0; i < npoints; i++) + fprintf(stderr, " %.3f", edge[i]); +#endif /* DEBUG */ + + if (circum < 0.0001) + goto FAIL; + + for (i = 0; i < npoints; i++) + { + ratio[i] = edge[i] / circum; + one_point_oh += ratio[i]; + } + +#ifdef DEBUG + fprintf(stderr, "\nratios:"); + for (i=0; i < npoints; i++) + fprintf(stderr, " %.3f", ratio[i]); +#endif /* DEBUG */ + + if (one_point_oh < 0.99999 || one_point_oh > 1.00001) + abort(); + + /* space the colors evenly along the circumference -- that means that the + number of pixels on a edge is proportional to the length of that edge + (relative to the lengths of the other edges.) + */ + for (i = 0; i < npoints; i++) + ncolors[i] = total_ncolors * ratio[i]; + + +#ifdef DEBUG + fprintf(stderr, "\npixels:"); + for (i=0; i < npoints; i++) + fprintf(stderr, " %d", ncolors[i]); + fprintf(stderr, " (%d)\n", total_ncolors); +#endif /* DEBUG */ + + for (i = 0; i < npoints; i++) + { + int j = (i+1) % npoints; + + if (ncolors[i] > 0) + { + dh[i] = 360 * (DH[i] / ncolors[i]); + ds[i] = (s[j] - s[i]) / ncolors[i]; + dv[i] = (v[j] - v[i]) / ncolors[i]; + } + } + } + + memset (colors, 0, (*ncolorsP) * sizeof(*colors)); + + k = 0; + for (i = 0; i < npoints; i++) + { + int distance, direction; + distance = h[(i+1) % npoints] - h[i]; + direction = (distance >= 0 ? -1 : 1); + + if (distance > 180) + distance = 180 - (distance - 180); + else if (distance < -180) + distance = -(180 - ((-distance) - 180)); + else + direction = -direction; + +#ifdef DEBUG + fprintf (stderr, "point %d: %3d %.2f %.2f\n", + i, h[i], s[i], v[i]); + fprintf(stderr, " h[i]=%d dh[i]=%.2f ncolors[i]=%d\n", + h[i], dh[i], ncolors[i]); +#endif /* DEBUG */ + for (j = 0; j < ncolors[i]; j++, k++) + { + double hh = (h[i] + (j * dh[i] * direction)); + if (hh < 0) hh += 360; + else if (hh > 360) hh -= 0; + colors[k].flags = DoRed|DoGreen|DoBlue; + hsv_to_rgb ((int) + hh, + (s[i] + (j * ds[i])), + (v[i] + (j * dv[i])), + &colors[k].red, &colors[k].green, &colors[k].blue); +#ifdef DEBUG + fprintf (stderr, "point %d+%d: %.2f %.2f %.2f %04X %04X %04X\n", + i, j, + hh, + (s[i] + (j * ds[i])), + (v[i] + (j * dv[i])), + colors[k].red, colors[k].green, colors[k].blue); +#endif /* DEBUG */ + } + } + + /* Floating-point round-off can make us decide to use fewer colors. */ + if (k < *ncolorsP) + { + *ncolorsP = k; + if (k <= 0) + return; + } + + if (!allocate_p) + return; + + if (writable_p) + { + unsigned long *pixels = (unsigned long *) + malloc(sizeof(*pixels) * ((*ncolorsP) + 1)); + + /* allocate_writable_colors() won't do here, because we need exactly this + number of cells, or the color sequence we've chosen won't fit. */ + if (! XAllocColorCells(dpy, cmap, False, 0, 0, pixels, *ncolorsP)) + { + free(pixels); + goto FAIL; + } + + for (i = 0; i < *ncolorsP; i++) + colors[i].pixel = pixels[i]; + free (pixels); + + XStoreColors (dpy, cmap, colors, *ncolorsP); + } + else + { + for (i = 0; i < *ncolorsP; i++) + { + XColor color; + color = colors[i]; + if (XAllocColor (dpy, cmap, &color)) + { + colors[i].pixel = color.pixel; + } + else + { + free_colors (dpy, cmap, colors, i); + goto FAIL; + } + } + } + + return; + + FAIL: + /* we weren't able to allocate all the colors we wanted; + decrease the requested number and try again. + */ + total_ncolors = (total_ncolors > 170 ? total_ncolors - 20 : + total_ncolors > 100 ? total_ncolors - 10 : + total_ncolors > 75 ? total_ncolors - 5 : + total_ncolors > 25 ? total_ncolors - 3 : + total_ncolors > 10 ? total_ncolors - 2 : + total_ncolors > 2 ? total_ncolors - 1 : + 0); + *ncolorsP = total_ncolors; + if (total_ncolors > 0) + goto AGAIN; +} + + +void +make_color_loop (Display *dpy, Colormap cmap, + int h0, double s0, double v0, /* 0-360, 0-1.0, 0-1.0 */ + int h1, double s1, double v1, /* 0-360, 0-1.0, 0-1.0 */ + int h2, double s2, double v2, /* 0-360, 0-1.0, 0-1.0 */ + XColor *colors, int *ncolorsP, + Bool allocate_p, + Bool writable_p) +{ + int h[3]; + double s[3], v[3]; + h[0] = h0; h[1] = h1; h[2] = h2; + s[0] = s0; s[1] = s1; s[2] = s2; + v[0] = v0; v[1] = v1; v[2] = v2; + make_color_path(dpy, cmap, + 3, h, s, v, + colors, ncolorsP, + allocate_p, writable_p); +} + + +static void +complain (int wanted_colors, int got_colors, + Bool wanted_writable, Bool got_writable) +{ + if (wanted_writable && !got_writable) + fprintf(stderr, + "%s: wanted %d writable colors; got %d read-only colors.\n", + progname, wanted_colors, got_colors); + + else if (wanted_colors > (got_colors + 10)) + /* don't bother complaining if we're within ten pixels. */ + fprintf(stderr, "%s: wanted %d%s colors; got %d.\n", + progname, wanted_colors, (got_writable ? " writable" : ""), + got_colors); +} + + +void +make_smooth_colormap (Display *dpy, Visual *visual, Colormap cmap, + XColor *colors, int *ncolorsP, + Bool allocate_p, + Bool *writable_pP, + Bool verbose_p) +{ + int npoints; + int ncolors = *ncolorsP; + Bool wanted_writable = (allocate_p && writable_pP && *writable_pP); + int i; + int h[MAXPOINTS]; + double s[MAXPOINTS]; + double v[MAXPOINTS]; + double total_s = 0; + double total_v = 0; + Screen *screen = DefaultScreenOfDisplay(dpy); /* #### WRONG! */ + + if (*ncolorsP <= 0) return; + + { + int n = random() % 20; + if (n <= 5) npoints = 2; /* 30% of the time */ + else if (n <= 15) npoints = 3; /* 50% of the time */ + else if (n <= 18) npoints = 4; /* 15% of the time */ + else npoints = 5; /* 5% of the time */ + } + + REPICK_ALL_COLORS: + for (i = 0; i < npoints; i++) + { + REPICK_THIS_COLOR: + h[i] = random() % 360; + s[i] = frand(1.0); + v[i] = frand(0.8) + 0.2; + + /* Make sure that no two adjascent colors are *too* close together. + If they are, try again. + */ + if (i > 0) + { + int j = (i+1 == npoints) ? 0 : (i-1); + double hi = ((double) h[i]) / 360; + double hj = ((double) h[j]) / 360; + double dh = hj - hi; + double distance; + 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])) + + ((v[j] - v[i]) * (v[j] - v[i]))); + if (distance < 0.2) + goto REPICK_THIS_COLOR; + } + total_s += s[i]; + total_v += v[i]; + } + + /* If the average saturation or intensity are too low, repick the colors, + so that we don't end up with a black-and-white or too-dark map. + */ + if (total_s / npoints < 0.2) + goto REPICK_ALL_COLORS; + if (total_v / npoints < 0.3) + goto REPICK_ALL_COLORS; + + /* If this visual doesn't support writable cells, don't bother trying. + */ + if (wanted_writable && !has_writable_cells(screen, visual)) + *writable_pP = False; + + RETRY_NON_WRITABLE: + make_color_path (dpy, cmap, npoints, h, s, v, colors, &ncolors, + allocate_p, (writable_pP && *writable_pP)); + + /* If we tried for writable cells and got none, try for non-writable. */ + if (allocate_p && *ncolorsP == 0 && *writable_pP) + { + *writable_pP = False; + goto RETRY_NON_WRITABLE; + } + + if (verbose_p) + complain(*ncolorsP, ncolors, wanted_writable, + wanted_writable && *writable_pP); + + *ncolorsP = ncolors; +} + + +void +make_uniform_colormap (Display *dpy, Visual *visual, Colormap cmap, + XColor *colors, int *ncolorsP, + Bool allocate_p, + Bool *writable_pP, + Bool verbose_p) +{ + int ncolors = *ncolorsP; + Bool wanted_writable = (allocate_p && writable_pP && *writable_pP); + Screen *screen = DefaultScreenOfDisplay(dpy); /* #### WRONG! */ + + double S = ((double) (random() % 34) + 66) / 100.0; /* range 66%-100% */ + double V = ((double) (random() % 34) + 66) / 100.0; /* range 66%-100% */ + + if (*ncolorsP <= 0) return; + + /* If this visual doesn't support writable cells, don't bother trying. */ + if (wanted_writable && !has_writable_cells(screen, visual)) + *writable_pP = False; + + RETRY_NON_WRITABLE: + make_color_ramp(dpy, cmap, + 0, S, V, + 359, S, V, + colors, &ncolors, + False, True, wanted_writable); + + /* If we tried for writable cells and got none, try for non-writable. */ + if (allocate_p && *ncolorsP == 0 && writable_pP && *writable_pP) + { + ncolors = *ncolorsP; + *writable_pP = False; + goto RETRY_NON_WRITABLE; + } + + if (verbose_p) + complain(*ncolorsP, ncolors, wanted_writable, + wanted_writable && *writable_pP); + + *ncolorsP = ncolors; +} + + +void +make_random_colormap (Display *dpy, Visual *visual, Colormap cmap, + XColor *colors, int *ncolorsP, + Bool bright_p, + Bool allocate_p, + Bool *writable_pP, + Bool verbose_p) +{ + Bool wanted_writable = (allocate_p && writable_pP && *writable_pP); + int ncolors = *ncolorsP; + int i; + Screen *screen = DefaultScreenOfDisplay(dpy); /* #### WRONG! */ + + if (*ncolorsP <= 0) return; + + /* If this visual doesn't support writable cells, don't bother trying. */ + if (wanted_writable && !has_writable_cells(screen, visual)) + *writable_pP = False; + + for (i = 0; i < ncolors; i++) + { + colors[i].flags = DoRed|DoGreen|DoBlue; + if (bright_p) + { + int H = random() % 360; /* range 0-360 */ + double S = ((double) (random()%70) + 30)/100.0; /* range 30%-100% */ + double V = ((double) (random()%34) + 66)/100.0; /* range 66%-100% */ + hsv_to_rgb (H, S, V, + &colors[i].red, &colors[i].green, &colors[i].blue); + } + else + { + colors[i].red = random() % 0xFFFF; + colors[i].green = random() % 0xFFFF; + colors[i].blue = random() % 0xFFFF; + } + } + + if (!allocate_p) + return; + + RETRY_NON_WRITABLE: + if (writable_pP && *writable_pP) + { + unsigned long *pixels = (unsigned long *) + malloc(sizeof(*pixels) * (ncolors + 1)); + + allocate_writable_colors (dpy, cmap, pixels, &ncolors); + if (ncolors > 0) + for (i = 0; i < ncolors; i++) + colors[i].pixel = pixels[i]; + free (pixels); + if (ncolors > 0) + XStoreColors (dpy, cmap, colors, ncolors); + } + else + { + for (i = 0; i < ncolors; i++) + { + XColor color; + color = colors[i]; + if (!XAllocColor (dpy, cmap, &color)) + break; + colors[i].pixel = color.pixel; + } + ncolors = i; + } + + /* If we tried for writable cells and got none, try for non-writable. */ + if (allocate_p && ncolors == 0 && writable_pP && *writable_pP) + { + ncolors = *ncolorsP; + *writable_pP = False; + goto RETRY_NON_WRITABLE; + } + + if (verbose_p) + complain(*ncolorsP, ncolors, wanted_writable, + wanted_writable && *writable_pP); + + *ncolorsP = ncolors; +} + + +void +rotate_colors (Display *dpy, Colormap cmap, + XColor *colors, int ncolors, int distance) +{ + int i; + XColor *colors2 = (XColor *) malloc(sizeof(*colors2) * ncolors); + if (ncolors < 2) return; + distance = distance % ncolors; + for (i = 0; i < ncolors; i++) + { + int j = i - distance; + if (j >= ncolors) j -= ncolors; + if (j < 0) j += ncolors; + colors2[i] = colors[j]; + colors2[i].pixel = colors[i].pixel; + } + XStoreColors (dpy, cmap, colors2, ncolors); + XFlush(dpy); + memcpy(colors, colors2, sizeof(*colors) * ncolors); + free(colors2); +} diff --git a/utils/colors.h b/utils/colors.h new file mode 100644 index 00000000..174c6bfd --- /dev/null +++ b/utils/colors.h @@ -0,0 +1,140 @@ +/* xscreensaver, Copyright (c) 1992, 1997 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. + */ + +#ifndef __COLORS_H__ +#define __COLORS_H__ + +/* Like XFreeColors, but works on `XColor *' instead of `unsigned long *' + */ +extern void free_colors (Display *, Colormap, XColor *, int ncolors); + + +/* Allocates writable, non-contiguous color cells. The number requested is + passed in *ncolorsP, and the number actually allocated is returned there. + (Unlike XAllocColorCells(), this will allocate as many as it can, instead + of failing if they can't all be allocated.) + */ +extern void allocate_writable_colors (Display *dpy, Colormap cmap, + unsigned long *pixels, int *ncolorsP); + + +/* Generates a sequence of colors evenly spaced between the given pair + of HSV coordinates. + + If closed_p is true, the colors will go from the first point to the + second then back to the first. + + If allocate_p is true, the colors will be allocated from the map; + if enough colors can't be allocated, we will try for less, and the + result will be returned to ncolorsP. + + If writable_p is true, writable color cells will be allocated; + otherwise, read-only cells will be allocated. + */ +extern void make_color_ramp (Display *dpy, Colormap cmap, + int h1, double s1, double v1, + int h2, double s2, double v2, + XColor *colors, int *ncolorsP, + Bool closed_p, + Bool allocate_p, + Bool writable_p); + +/* Generates a sequence of colors evenly spaced around the triangle + indicated by the thee HSV coordinates. + + If allocate_p is true, the colors will be allocated from the map; + if enough colors can't be allocated, we will try for less, and the + result will be returned to ncolorsP. + + If writable_p is true, writable color cells will be allocated; + otherwise, read-only cells will be allocated. + */ +extern void make_color_loop (Display *, Colormap, + int h1, double s1, double v1, + int h2, double s2, double v2, + int h3, double s3, double v3, + XColor *colors, int *ncolorsP, + Bool allocate_p, + Bool writable_p); + + +/* Allocates a hopefully-interesting colormap, which will be a closed loop + without any sudden transitions. + + If allocate_p is true, the colors will be allocated from the map; + if enough colors can't be allocated, we will try for less, and the + result will be returned to ncolorsP. An error message will be + printed on stderr (if verbose_p). + + If *writable_pP is true, writable color cells will be allocated; + otherwise, read-only cells will be allocated. If no writable cells + cannot be allocated, we will try to allocate unwritable cells + instead, and print a message on stderr to that effect (if verbose_p). + */ +extern void make_smooth_colormap (Display *dpy, Visual *visual, + Colormap cmap, + XColor *colors, int *ncolorsP, + Bool allocate_p, + Bool *writable_pP, + Bool verbose_p); + +/* Allocates a uniform colormap which touches each hue of the spectrum, + evenly spaced. The saturation and intensity are chosen randomly, but + will be high enough to be visible. + + If allocate_p is true, the colors will be allocated from the map; + if enough colors can't be allocated, we will try for less, and the + result will be returned to ncolorsP. An error message will be + printed on stderr (if verbose_p). + + If *writable_pP is true, writable color cells will be allocated; + otherwise, read-only cells will be allocated. If no writable cells + cannot be allocated, we will try to allocate unwritable cells + instead, and print a message on stderr to that effect (if verbose_p). + */ +extern void make_uniform_colormap (Display *dpy, Visual *visual, + Colormap cmap, + XColor *colors, int *ncolorsP, + Bool allocate_p, + Bool *writable_pP, + Bool verbose_p); + +/* Allocates a random colormap (the colors are unrelated to one another.) + If `bright_p' is false, the colors will be completely random; if it is + true, all of the colors will be bright enough to see on a black background. + + If allocate_p is true, the colors will be allocated from the map; + if enough colors can't be allocated, we will try for less, and the + result will be returned to ncolorsP. An error message will be + printed on stderr (if verbose_p). + + If *writable_pP is true, writable color cells will be allocated; + otherwise, read-only cells will be allocated. If no writable cells + cannot be allocated, we will try to allocate unwritable cells + instead, and print a message on stderr to that effect (if verbose_p). + */ +extern void make_random_colormap (Display *dpy, Visual *visual, + Colormap cmap, + XColor *colors, int *ncolorsP, + Bool bright_p, + Bool allocate_p, + Bool *writable_pP, + Bool verbose_p); + + +/* Assuming that the array of colors indicates the current state of a set + of writable color cells, this rotates the contents of the array by + `distance' steps, moving the colors of cell N to cell (N - distance). + */ +extern void rotate_colors (Display *, Colormap, + XColor *, int ncolors, int distance); + +#endif /* __COLORS_H__ */ diff --git a/utils/compile_axp.com b/utils/compile_axp.com new file mode 100644 index 00000000..ca2f6807 --- /dev/null +++ b/utils/compile_axp.com @@ -0,0 +1,17 @@ +$ 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 +$ lib/cre utils.olb_axp +$ lib utils.olb_axp *.obj +$! delete/noconf *.obj; diff --git a/utils/compile_decc.com b/utils/compile_decc.com new file mode 100644 index 00000000..5e4fe9f6 --- /dev/null +++ b/utils/compile_decc.com @@ -0,0 +1,17 @@ +$ 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 +$ lib/cre utils.olb_decc +$ lib utils.olb_decc *.obj +$! delete/noconf *.obj; diff --git a/utils/fade.c b/utils/fade.c new file mode 100644 index 00000000..e174dfbf --- /dev/null +++ b/utils/fade.c @@ -0,0 +1,309 @@ +/* xscreensaver, Copyright (c) 1992-1997 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. + */ + +#include "utils.h" + +#include /* for gettimeofday() */ + +#ifdef VMS +# include "vms-gtod.h" +#endif /* VMS */ + +#include "visual.h" +#include "usleep.h" +#include "fade.h" + + +Colormap +copy_colormap (Screen *screen, Visual *visual, + Colormap cmap, Colormap into_cmap) +{ + int i; + Display *dpy = DisplayOfScreen (screen); + Window window = RootWindowOfScreen (screen); + int ncolors = CellsOfScreen (screen); + XColor *colors = 0; + + /* If this is a colormap on a mono visual, or one with insanely many + color cells, bug out. */ + if (ncolors <= 2 || ncolors > 4096) + return 0; + /* If this is a non-writable visual, bug out. */ + if (!has_writable_cells (screen, visual)) + return 0; + + if (! into_cmap) + into_cmap = XCreateColormap (dpy, window, visual, AllocAll); + if (! cmap) + cmap = DefaultColormapOfScreen (screen); + + colors = (XColor *) calloc(sizeof(XColor), ncolors); + for (i = 0; i < ncolors; i++) + colors [i].pixel = i; + XQueryColors (dpy, cmap, colors, ncolors); + XStoreColors (dpy, into_cmap, colors, ncolors); + free (colors); + return into_cmap; +} + + +void +blacken_colormap (Screen *screen, Colormap cmap) +{ + Display *dpy = DisplayOfScreen (screen); + int ncolors = CellsOfScreen (screen); + XColor *colors; + int i; + if (ncolors > 4096) + return; + colors = (XColor *) calloc(sizeof(XColor), ncolors); + for (i = 0; i < ncolors; i++) + colors[i].pixel = i; + XStoreColors (dpy, cmap, colors, ncolors); + free (colors); +} + + +/* 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. */ + +void +fade_screens (Display *dpy, Colormap *cmaps, + int seconds, int ticks, + Bool out_p) +{ + int i, j, k; + int steps = seconds * ticks; + long usecs_per_step = (long)(seconds * 1000000) / (long)steps; + XEvent dummy_event; + int cmaps_per_screen = 5; + int nscreens = ScreenCount(dpy); + int ncmaps = nscreens * cmaps_per_screen; + static Colormap *fade_cmaps = 0; + Bool installed = False; + int total_ncolors; + XColor *orig_colors, *current_colors, *screen_colors, *orig_screen_colors; + struct timeval then, now; +#ifdef GETTIMEOFDAY_TWO_ARGS + struct timezone tzp; +#endif + + total_ncolors = 0; + for (i = 0; i < nscreens; i++) + total_ncolors += CellsOfScreen (ScreenOfDisplay(dpy, i)); + + orig_colors = (XColor *) calloc(sizeof(XColor), total_ncolors); + current_colors = (XColor *) calloc(sizeof(XColor), total_ncolors); + + /* Get the contents of the colormap we are fading from or to. */ + screen_colors = orig_colors; + for (i = 0; i < nscreens; i++) + { + int ncolors = CellsOfScreen (ScreenOfDisplay (dpy, i)); + Colormap cmap = (cmaps ? cmaps[i] : 0); + if (!cmap) cmap = DefaultColormap(dpy, i); + + for (j = 0; j < ncolors; j++) + screen_colors[j].pixel = j; + XQueryColors (dpy, cmap, screen_colors, ncolors); + + screen_colors += ncolors; + } + + memcpy (current_colors, orig_colors, total_ncolors * sizeof (XColor)); + + + /* Make the writable colormaps (we keep these around and reuse them.) */ + if (!fade_cmaps) + { + fade_cmaps = (Colormap *) calloc(sizeof(Colormap), ncmaps); + for (i = 0; i < nscreens; i++) + { + Visual *v = DefaultVisual(dpy, i); + Screen *s = ScreenOfDisplay(dpy, i); + if (has_writable_cells (s, v)) + for (j = 0; j < cmaps_per_screen; j++) + fade_cmaps[(i * cmaps_per_screen) + j] = + XCreateColormap (dpy, RootWindowOfScreen (s), v, AllocAll); + } + } + +#ifdef GETTIMEOFDAY_TWO_ARGS + gettimeofday(&then, &tzp); +#else + gettimeofday(&then); +#endif + + /* Iterate by steps of the animation... */ + for (i = (out_p ? steps : 0); + (out_p ? i > 0 : i < steps); + (out_p ? i-- : i++)) + { + + /* For each screen, compute the current value of each color... + */ + orig_screen_colors = orig_colors; + screen_colors = current_colors; + for (j = 0; j < nscreens; j++) + { + int ncolors = CellsOfScreen (ScreenOfDisplay (dpy, j)); + for (k = 0; k < ncolors; k++) + { + /* This doesn't take into account the relative luminance of the + RGB components (0.299, 0.587, and 0.114 at gamma 2.2) but + the difference is imperceptible for this application... */ + screen_colors[k].red = orig_screen_colors[k].red * i / steps; + screen_colors[k].green = orig_screen_colors[k].green * i / steps; + screen_colors[k].blue = orig_screen_colors[k].blue * i / steps; + } + screen_colors += ncolors; + orig_screen_colors += ncolors; + } + + /* Put the colors into the maps... + */ + screen_colors = current_colors; + for (j = 0; j < nscreens; j++) + { + int ncolors = CellsOfScreen (ScreenOfDisplay (dpy, j)); + for (k = 0; k < cmaps_per_screen; k++) + { + Colormap c = fade_cmaps[j * cmaps_per_screen + k]; + if (c) + XStoreColors (dpy, c, screen_colors, ncolors); + } + screen_colors += ncolors; + } + + /* Put the maps on the screens... + (only need to do this the first time through the loop.) + */ + if (!installed) + { + for (j = 0; j < ncmaps; j++) + if (fade_cmaps[j]) + XInstallColormap (dpy, fade_cmaps[j]); + installed = True; + } + + XSync (dpy, False); + + /* 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. */ + { + 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); + } + } + + DONE: + + 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 (!out_p) + { + for (i = 0; i < nscreens; i++) + { + Colormap cmap = (cmaps ? cmaps[i] : 0); + if (!cmap) cmap = DefaultColormap(dpy, i); + XInstallColormap (dpy, cmap); + } + + /* 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]) + { + XFreeColormap(dpy, fade_cmaps[i]); + fade_cmaps[i] = 0; + } + free(fade_cmaps); + fade_cmaps = 0; + } +} + + +#if 0 +#include "screenhack.h" + +char *progclass = "foo"; +char *defaults [] = { + 0 +}; + +XrmOptionDescRec options [] = {0}; +int options_size = 0; + +void +screenhack (dpy, w) + Display *dpy; + Window w; +{ + int seconds = 3; + int ticks = 20; + int delay = 1; + + while (1) + { + XSync (dpy, False); + + fprintf(stderr,"out..."); fflush(stderr); + fade_screens (dpy, 0, seconds, ticks, True); + fprintf(stderr, "done.\n"); fflush(stderr); + + if (delay) sleep (delay); + + fprintf(stderr,"in..."); fflush(stderr); + fade_screens (dpy, 0, seconds, ticks, False); + fprintf(stderr, "done.\n"); fflush(stderr); + + if (delay) sleep (delay); + } +} + +#endif diff --git a/utils/fade.h b/utils/fade.h new file mode 100644 index 00000000..4c2a32f4 --- /dev/null +++ b/utils/fade.h @@ -0,0 +1,19 @@ +/* xscreensaver, Copyright (c) 1992-1997 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. + */ + +#ifndef __FADE_H__ +#define __FADE_H__ + +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); +#endif /* __FADE_H__ */ diff --git a/utils/grabscreen.c b/utils/grabscreen.c new file mode 100644 index 00000000..1dba4328 --- /dev/null +++ b/utils/grabscreen.c @@ -0,0 +1,610 @@ +/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1997 + * 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. + */ + +/* This file contains code for grabbing an image of the screen to hack its + bits. This is a little tricky, since doing this involves the need to tell + the difference between drawing on the actual root window, and on the fake + root window used by the screensaver, since at this level the illusion + breaks down... + */ + +#include "utils.h" + +#include +#include + +#ifdef HAVE_XMU +# ifndef VMS +# include +# else /* VMS */ +# include +# endif /* VMS */ +#endif + +#include "usleep.h" +#include "colors.h" +#include "grabscreen.h" + +#include "vroot.h" +#undef RootWindowOfScreen +#undef RootWindow +#undef DefaultRootWindow + + +#ifdef HAVE_READ_DISPLAY_EXTENSION +# include "visual.h" +# include + static Bool read_display (Screen *, Window, Pixmap, Bool); +#endif /* HAVE_READ_DISPLAY_EXTENSION */ + + +static void copy_default_colormap_contents (Screen *, Colormap, Visual *); + + +static Bool +MapNotify_event_p (Display *dpy, XEvent *event, XPointer window) +{ + return (event->xany.type == MapNotify && + event->xvisibility.window == (Window) window); +} + +#ifdef DEBUG +extern char *progname; +#endif /* DEBUG */ + + +static void +raise_window(Display *dpy, Window window, Bool dont_wait) +{ +#ifdef DEBUG + fprintf(stderr, "%s: raising window 0x%08lX (%s)\n", + progname, (unsigned long) window, + (dont_wait ? "not waiting" : "waiting")); +#endif /* DEBUG */ + + if (! dont_wait) + { + XWindowAttributes xgwa; + XSizeHints hints; + long supplied = 0; + memset(&hints, 0, sizeof(hints)); + XGetWMNormalHints(dpy, window, &hints, &supplied); + XGetWindowAttributes (dpy, window, &xgwa); + hints.x = xgwa.x; + hints.y = xgwa.y; + hints.width = xgwa.width; + hints.height = xgwa.height; + hints.flags |= (PPosition|USPosition|PSize|USSize); + XSetWMNormalHints(dpy, window, &hints); + } + + XMapRaised(dpy, window); + + if (! dont_wait) + { + XEvent event; + XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window); + XSync (dpy, True); + } +} + + +static Bool +xscreensaver_window_p (Display *dpy, Window window) +{ + Atom type; + int format; + unsigned long nitems, bytesafter; + char *version; + if (XGetWindowProperty (dpy, window, + XInternAtom (dpy, "_SCREENSAVER_VERSION", False), + 0, 1, False, XA_STRING, + &type, &format, &nitems, &bytesafter, + (unsigned char **) &version) + == Success + && type != None) + return True; + return False; +} + + + +static XErrorHandler old_ehandler = 0; +static int +BadWindow_ehandler (Display *dpy, XErrorEvent *error) +{ + if (error->error_code == BadWindow || error->error_code == BadDrawable) + return 0; + else if (!old_ehandler) + abort(); + else + return (*old_ehandler) (dpy, error); +} + + +/* 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 + topmost N windows will be shown in the right colors.) + */ +static void +install_screen_colormaps (Screen *screen) +{ + int i; + Display *dpy = DisplayOfScreen (screen); + Window vroot, real_root; + Window parent, *kids = 0; + unsigned int nkids = 0; + + XSync (dpy, False); + old_ehandler = XSetErrorHandler (BadWindow_ehandler); + + vroot = VirtualRootWindowOfScreen (screen); + if (XQueryTree (dpy, vroot, &real_root, &parent, &kids, &nkids)) + for (i = 0; i < nkids; i++) + { + XWindowAttributes xgwa; + Window client; +#ifdef HAVE_XMU + /* #### need to put XmuClientWindow() in xmu.c, sigh... */ + if (! (client = XmuClientWindow (dpy, kids[i]))) +#endif + client = kids[i]; + xgwa.colormap = 0; + XGetWindowAttributes (dpy, client, &xgwa); + if (xgwa.colormap && xgwa.map_state == IsViewable) + XInstallColormap (dpy, xgwa.colormap); + } + XInstallColormap (dpy, DefaultColormapOfScreen (screen)); + XSync (dpy, False); + XSetErrorHandler (old_ehandler); + XSync (dpy, False); + + if (kids) + XFree ((char *) kids); +} + + +void +grab_screen_image (Screen *screen, Window window) +{ + Display *dpy = DisplayOfScreen (screen); + XWindowAttributes xgwa; + Window real_root = XRootWindowOfScreen (screen); /* not vroot */ + Bool root_p = (window == real_root); + Bool saver_p = xscreensaver_window_p (dpy, window); + Bool grab_mouse_p = False; + int unmap_time = 0; + + if (saver_p) + /* I think this is redundant, but just to be safe... */ + root_p = False; + + if (saver_p) + /* The only time grabbing the mouse is important is if this program + is being run while the saver is locking the screen. */ + grab_mouse_p = True; + + if (!root_p) + { + if (saver_p) + unmap_time = 2500000; /* 2 1/2 seconds */ + else + unmap_time = 660000; /* 2/3rd second */ + } + +#ifdef DEBUG + fprintf(stderr, + "\n%s: window 0x%08lX root: %d saver: %d grab: %d wait: %.1f\n", + progname, (unsigned long) window, + root_p, saver_p, grab_mouse_p, ((double)unmap_time)/1000000.0); + { + XWindowAttributes xgwa2; + XGetWindowAttributes (dpy, window, &xgwa2); + fprintf(stderr, "%s: ", progname); + describe_visual(stderr, screen, xgwa2.visual); + } +#endif /* DEBUG */ + + if (!root_p) + XSetWindowBackgroundPixmap (dpy, window, None); + + if (grab_mouse_p) + { + /* prevent random viewer of the screen saver (locker) from messing + with windows. We don't check whether it succeeded, because what + are our options, really... */ + XGrabPointer (dpy, real_root, True, ButtonPressMask|ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, None, CurrentTime); + XGrabKeyboard (dpy, real_root, True, GrabModeSync, GrabModeAsync, + CurrentTime); + } + + if (unmap_time > 0) + { + XUnmapWindow (dpy, window); + install_screen_colormaps (screen); + XSync (dpy, True); + usleep(unmap_time); /* wait for everyone to swap in and handle exposes */ + } + + XGetWindowAttributes (dpy, window, &xgwa); + + if (!root_p) + { +#ifdef HAVE_READ_DISPLAY_EXTENSION + if (! read_display(screen, window, 0, saver_p)) +#endif /* HAVE_READ_DISPLAY_EXTENSION */ + { +#if defined(HAVE_READ_DISPLAY_EXTENSION) && defined(DEBUG) + fprintf(stderr, "%s: read_display() failed\n", progname); +#endif /* DEBUG */ + copy_default_colormap_contents (screen, xgwa.colormap, xgwa.visual); + raise_window(dpy, window, saver_p); + } + } + else /* root_p */ + { + Pixmap pixmap; + XWindowAttributes xgwa; + XGetWindowAttributes(dpy, window, &xgwa); + pixmap = XCreatePixmap(dpy, window, xgwa.width, xgwa.height, xgwa.depth); + +#ifdef HAVE_READ_DISPLAY_EXTENSION + if (! read_display(screen, window, pixmap, True)) +#endif + { + Window real_root = XRootWindowOfScreen (xgwa.screen); /* not vroot */ + XGCValues gcv; + GC gc; + +#if defined(HAVE_READ_DISPLAY_EXTENSION) && defined(DEBUG) + fprintf(stderr, "%s: read_display() failed\n", progname); +#endif /* DEBUG */ + + copy_default_colormap_contents (screen, xgwa.colormap, xgwa.visual); + + gcv.function = GXcopy; + gcv.subwindow_mode = IncludeInferiors; + gc = XCreateGC (dpy, window, GCFunction | GCSubwindowMode, &gcv); + XCopyArea (dpy, real_root, pixmap, gc, + xgwa.x, xgwa.y, xgwa.width, xgwa.height, 0, 0); + XFreeGC (dpy, gc); + } + XSetWindowBackgroundPixmap (dpy, window, pixmap); + XFreePixmap (dpy, pixmap); + } + + if (grab_mouse_p) + { + XUngrabPointer (dpy, CurrentTime); + XUngrabKeyboard (dpy, CurrentTime); + } + + XSync (dpy, True); +} + + +/* 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 + started with -install, we need to copy the contents of the default colormap + into the screensaver's colormap. + */ +static void +copy_default_colormap_contents (Screen *screen, + Colormap to_cmap, + Visual *to_visual) +{ + Display *dpy = DisplayOfScreen (screen); + Visual *from_visual = DefaultVisualOfScreen (screen); + Colormap from_cmap = XDefaultColormapOfScreen (screen); + + XColor *old_colors, *new_colors; + unsigned long *pixels; + XVisualInfo vi_in, *vi_out; + int out_count; + int from_cells, to_cells, max_cells, got_cells; + int i; + + if (from_cmap == to_cmap) + return; + + vi_in.screen = XScreenNumberOfScreen (screen); + vi_in.visualid = XVisualIDFromVisual (from_visual); + vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask, + &vi_in, &out_count); + if (! vi_out) abort (); + from_cells = vi_out [0].colormap_size; + XFree ((char *) vi_out); + + vi_in.screen = XScreenNumberOfScreen (screen); + vi_in.visualid = XVisualIDFromVisual (to_visual); + vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask, + &vi_in, &out_count); + if (! vi_out) abort (); + to_cells = vi_out [0].colormap_size; + XFree ((char *) vi_out); + + max_cells = (from_cells > to_cells ? to_cells : from_cells); + + old_colors = (XColor *) calloc (sizeof (XColor), max_cells); + new_colors = (XColor *) calloc (sizeof (XColor), max_cells); + pixels = (unsigned long *) calloc (sizeof (unsigned long), max_cells); + for (i = 0; i < max_cells; i++) + old_colors[i].pixel = i; + XQueryColors (dpy, from_cmap, old_colors, max_cells); + + got_cells = max_cells; + allocate_writable_colors (dpy, to_cmap, pixels, &got_cells); + XStoreColors (dpy, to_cmap, old_colors, got_cells); + +#ifdef DEBUG + fprintf(stderr, "%s: installing copy of default colormap\n", progname); +#endif /* DEBUG */ + + free (old_colors); + free (new_colors); + free (pixels); +} + + + +/* The SGI ReadDisplay extension. + This extension lets you get back a 24-bit image of the screen, taking into + account the colors with which all windows are *currently* displayed, even + if those windows have different visuals. Without this extension, presence + of windows with different visuals or colormaps will result in technicolor + when one tries to grab the screen image. + */ + +#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) +{ + Display *dpy = DisplayOfScreen (screen); + XWindowAttributes xgwa; + int rd_event_base = 0; + int rd_error_base = 0; + unsigned long hints = 0; + XImage *image = 0; + XGCValues gcv; + int class; + GC gc; + Bool install_p = False; + + /* Check to see if the server supports the extension, and bug out if not. + */ + if (! XReadDisplayQueryExtension (dpy, &rd_event_base, &rd_error_base)) + return False; + + /* If this isn't a visual we know how to handle, bug out. We handle: + = TrueColor in depths 8, 12, 16, and 32; + = PseudoColor and DirectColor in depths 8 and 12. + */ + XGetWindowAttributes(dpy, window, &xgwa); + class = visual_class (screen, xgwa.visual); + if (class == TrueColor) + { + if (xgwa.depth != 8 && xgwa.depth != 12 && xgwa.depth != 16 && + xgwa.depth != 24 && xgwa.depth != 32) + return False; + } + else if (class == PseudoColor || class == DirectColor) + { + if (xgwa.depth != 8 && xgwa.depth != 12) + return False; + else + /* Install a colormap that makes this visual behave like + a TrueColor visual of the same depth. */ + install_p = True; + } + + + /* Try and read the screen. + */ + hints = (XRD_TRANSPARENT | XRD_READ_POINTER); + image = XReadDisplay (dpy, window, xgwa.x, xgwa.y, xgwa.width, xgwa.height, + hints, &hints); + if (!image) + return False; + if (!image->data) + { + XDestroyImage(image); + return False; + } + + /* Uh, this can't be right, can it? But it's necessary. X sucks. + 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. + */ + if (xgwa.depth == 24 && image->depth == 32) + image->depth = 24; + + /* If the visual of the window/pixmap into which we're going to draw is + less deep than the screen itself, then we need to convert the grabbed bits + to match the depth by clipping off the less significant bit-planes of each + color component. + */ + if (image->depth > xgwa.depth) + { + int x, y; + /* We use the same image->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 *image2 = XCreateImage (dpy, xgwa.visual, xgwa.depth, + ZPixmap, 0, image->data, + xgwa.width, xgwa.height, + 8, 0); + if (!image2) + return False; + +#ifdef DEBUG + fprintf(stderr, "%s: converting from depth %d to depth %d\n", + progname, image->depth, xgwa.depth); +#endif /* DEBUG */ + + for (y = 0; y < image->height; y++) + for (x = 0; x < image->width; x++) + { + /* #### really these shift values should be determined from the + mask values -- but that's a pain in the ass, and anyway, + this is an SGI-specific extension so hardcoding assumptions + about the SGI server's behavior isn't *too* heinous... */ + unsigned long pixel = XGetPixel(image, x, y); + unsigned int r = (pixel & image->red_mask); + unsigned int g = (pixel & image->green_mask) >> 8; + unsigned int b = (pixel & image->blue_mask) >> 16; + + if (xgwa.depth == 8) + pixel = ((r >> 5) | ((g >> 5) << 3) | ((b >> 6) << 6)); + else if (xgwa.depth == 12) + pixel = ((r >> 4) | ((g >> 4) << 4) | ((b >> 4) << 8)); + else if (xgwa.depth == 16) + pixel = ((r >> 3) | ((g >> 3) << 5) | ((b >> 3) << 10)); + else + abort(); + + XPutPixel(image2, x, y, pixel); + } + image->data = 0; + XDestroyImage(image); + image = image2; + } + + + /* Now actually put the bits into the window or pixmap -- note the design + bogosity of this extension, where we've been forced to take 24 bit data + from the server to the client, and then push it back from the client to + the server, *without alteration*. We should have just been able to tell + the server, "put a screen image in this drawable", instead of having to + go through the intermediate step of converting it to an Image. Geez. + (Assuming that the window is of screen depth; we happen to handle less + deep windows, but that's beside the point.) + */ + gcv.function = GXcopy; + gc = XCreateGC (dpy, window, GCFunction, &gcv); + + if (into_pixmap) + { + gcv.function = GXcopy; + gc = XCreateGC (dpy, into_pixmap, GCFunction, &gcv); + XPutImage (dpy, into_pixmap, gc, image, 0, 0, 0, 0, + xgwa.width, xgwa.height); + } + else + { + gcv.function = GXcopy; + gc = XCreateGC (dpy, window, GCFunction, &gcv); + + /* Ok, now we'll be needing that window on the screen... */ + raise_window(dpy, window, dont_wait); + + /* Plop down the bits... */ + XPutImage (dpy, window, gc, image, 0, 0, 0, 0, xgwa.width, xgwa.height); + } + XFreeGC (dpy, gc); + + if (image->data) + { + free(image->data); + image->data = 0; + } + XDestroyImage(image); + + if (install_p) + make_cubic_colormap (screen, window, xgwa.visual); + + return True; +} + +static void +make_cubic_colormap (Screen *screen, Window window, Visual *visual) +{ + Display *dpy = DisplayOfScreen (screen); + Colormap cmap = XCreateColormap(dpy, window, visual, AllocAll); + int nr, ng, nb, cells; + int r, g, b; + int depth; + XColor colors[4097]; + int i; + + depth = visual_depth(screen, visual); + switch (depth) + { + case 8: nr = 3; ng = 3; nb = 2; cells = 256; break; + case 12: nr = 4; ng = 4; nb = 4; cells = 4096; break; + default: abort(); break; + } + + memset(colors, 0, sizeof(colors)); + for (i = 0; i < cells; i++) + { + colors[i].flags = DoRed|DoGreen|DoBlue; + colors[i].red = colors[i].green = colors[i].blue = 0; + } + + for (r = 0; r < (1 << nr); r++) + for (g = 0; g < (1 << ng); g++) + for (b = 0; b < (1 << nb); b++) + { + i = (r | (g << nr) | (b << (nr + ng))); + colors[i].pixel = i; + if (depth == 8) + { + colors[i].red = ((r << 13) | (r << 10) | (r << 7) | + (r << 4) | (r << 1)); + colors[i].green = ((g << 13) | (g << 10) | (g << 7) | + (g << 4) | (g << 1)); + colors[i].blue = ((b << 14) | (b << 12) | (b << 10) | + (b << 8) | (b << 6) | (b << 4) | + (b << 2) | b); + } + else + { + colors[i].red = (r << 12) | (r << 8) | (r << 4) | r; + colors[i].green = (g << 12) | (g << 8) | (g << 4) | g; + colors[i].blue = (b << 12) | (b << 8) | (b << 4) | b; + } + } + +#ifdef DEBUG + fprintf(stderr, "%s: installing cubic colormap\n", progname); +#endif /* DEBUG */ + + XStoreColors (dpy, cmap, colors, cells); + XSetWindowColormap (dpy, window, cmap); + + /* Gag, install the colormap. + This is definitely right in the `if xscreensaver_window_p' case, since + it will never get installed otherwise. But, if we don't do it + unconditionally, then the new colormap won't get installed until the + window (re-)gains focus. It's generally very antisocial to install + the colormap of a non-OverrideRedirect window (that task belongs to + the WM) and if we were being kosher, we would only install this cmap + if the old cmap was already installed (or perhaps, if the window had + focus.) But, since this extension only exists on SGIs, and since SGIs + can handle four colormaps at once, let's go ahead and install it all + the time, so that even if the window pops up and has never had focus, + it will still display in the proper colors. + */ + XInstallColormap (dpy, cmap); +} + + +#endif /* HAVE_READ_DISPLAY_EXTENSION */ diff --git a/utils/grabscreen.h b/utils/grabscreen.h new file mode 100644 index 00000000..20a5ce40 --- /dev/null +++ b/utils/grabscreen.h @@ -0,0 +1,22 @@ +/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1997 + * 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. + */ + +#ifndef __GRABSCREEN_H__ +#define __GRABSCREEN_H__ + +/* This will write a snapshot of the screen image into the given window. + Beware that the colormap of the window may also be changed (to match + the bits that were drawn.) + */ +extern void grab_screen_image (Screen *, Window); + +#endif /* __GRABSCREEN_H__ */ diff --git a/utils/hsv.c b/utils/hsv.c new file mode 100644 index 00000000..027657c8 --- /dev/null +++ b/utils/hsv.c @@ -0,0 +1,81 @@ +/* xscreensaver, Copyright (c) 1992, 1997 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. + */ + +/* This file contains some utility routines for randomly picking the colors + to hack the screen with. + */ + +#include "utils.h" +#include "hsv.h" + +void +hsv_to_rgb (int h, double s, double v, + unsigned short *r, unsigned short *g, unsigned short *b) +{ + double H, S, V, R, G, B; + double p1, p2, p3; + double f; + int i; + + if (s < 0) s = 0; + if (v < 0) v = 0; + if (s > 1) s = 1; + if (v > 1) v = 1; + + S = s; V = v; + H = (h % 360) / 60.0; + i = H; + f = H - i; + p1 = V * (1 - S); + p2 = V * (1 - (S * f)); + p3 = V * (1 - (S * (1 - f))); + if (i == 0) { R = V; G = p3; B = p1; } + else if (i == 1) { R = p2; G = V; B = p1; } + else if (i == 2) { R = p1; G = V; B = p3; } + else if (i == 3) { R = p1; G = p2; B = V; } + else if (i == 4) { R = p3; G = p1; B = V; } + else { R = V; G = p1; B = p2; } + *r = R * 65535; + *g = G * 65535; + *b = B * 65535; +} + +void +rgb_to_hsv (unsigned short r, unsigned short g, unsigned short b, + int *h, double *s, double *v) +{ + double R, G, B, H, S, V; + double cmax, cmin; + double cmm; + int imax; + R = ((double) r) / 65535.0; + G = ((double) g) / 65535.0; + B = ((double) b) / 65535.0; + cmax = R; cmin = G; imax = 1; + if ( cmax < G ) { cmax = G; cmin = R; imax = 2; } + if ( cmax < B ) { cmax = B; imax = 3; } + if ( cmin > B ) { cmin = B; } + cmm = cmax - cmin; + V = cmax; + if (cmm == 0) + S = H = 0; + else + { + S = cmm / cmax; + if (imax == 1) H = (G - B) / cmm; + else if (imax == 2) H = 2.0 + (B - R) / cmm; + else /*if (imax == 3)*/ H = 4.0 + (R - G) / cmm; + if (H < 0) H += 6.0; + } + *h = (H * 60.0); + *s = S; + *v = V; +} diff --git a/utils/hsv.h b/utils/hsv.h new file mode 100644 index 00000000..6d9578a1 --- /dev/null +++ b/utils/hsv.h @@ -0,0 +1,27 @@ +/* xscreensaver, Copyright (c) 1992, 1997 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. + */ + +#ifndef __HSV_H__ +#define __HSV_H__ + +/* Converts between RGB and HSV color spaces. + R, G, and B are in the range 0 - 65535; + H is in the range 0 - 360; + S and V are in the range 0.0 - 1.0. + */ +extern void hsv_to_rgb (int h, double s, double v, + unsigned short *r, + unsigned short *g, + unsigned short *b); +extern void rgb_to_hsv (unsigned short r, unsigned short g, unsigned short b, + int *h, double *s, double *v); + +#endif /* __HSV_H__ */ diff --git a/utils/overlay.c b/utils/overlay.c new file mode 100644 index 00000000..0d82419b --- /dev/null +++ b/utils/overlay.c @@ -0,0 +1,126 @@ +/* xscreensaver, Copyright (c) 1997 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. + */ + +/* If the server's root window contains a SERVER_OVERLAY_VISUALS property, + then that identifies the visuals which correspond to the video hardware's + overlay planes. Windows created in these kinds of visuals have the + property that one particular pixel value is transparent. + + On my Indy, there are two transparent visuals, one of which is at layer 1, + and one of which is at layer 2. This is apparently the ordering in which + they are overlayed (1 being topmost.) The other difference between them + is that the topmost one only has 2 planes, while the next one has 8. + + Rumor has it that SGI, HP, DEC, and IBM all use the same mechanism. + + This code selects the topmost one, regardless of depth. Maybe that's not + the right thing. Well, in XScreenSaver, we only need to allocate two + colors from it (it's only used to display the stderr output, so that the + text can overlay the graphics without being obliterated by it.) + */ + + +#include "utils.h" + +#include +#include + +#include "visual.h" + + +struct overlay_data +{ + CARD32 visual_id; + CARD32 transparency; /* 0: none; 1: pixel; 2: mask (?) */ + CARD32 value; /* the transparent pixel */ + CARD32 layer; /* -1: underlay; 0: normal; 1: popup; 2: overlay */ +}; + +static int +get_overlay_prop (Screen *screen, struct overlay_data **data_ret) +{ + int result; + Atom actual_type; + int actual_format; + unsigned long nitems, bytes_after; + struct overlay_data *data = 0; + Display *dpy = DisplayOfScreen(screen); + Window window = RootWindowOfScreen(screen); + Atom XA_SERVER_OVERLAY_VISUALS = + XInternAtom (dpy, "SERVER_OVERLAY_VISUALS", False); + + *data_ret = 0; + result = XGetWindowProperty (dpy, window, XA_SERVER_OVERLAY_VISUALS, + 0, (65536 / sizeof (long)), False, + XA_SERVER_OVERLAY_VISUALS, + &actual_type, &actual_format, + &nitems, &bytes_after, + (unsigned char **) &data); + if (result != Success || + actual_type != XA_SERVER_OVERLAY_VISUALS || + actual_format != 32 || + nitems < 1) + { + if (data) XFree(data); + return 0; + } + else + { + *data_ret = data; + return nitems / (sizeof(*data) / sizeof(CARD32)); + } +} + + +Visual * +get_overlay_visual (Screen *screen, unsigned long *transparent_pixel_ret) +{ + struct overlay_data *data = 0; + int n_visuals = get_overlay_prop (screen, &data); + Visual *visual = 0; + int depth = 0; + unsigned long pixel = 0; + unsigned int layer = 0; + int i; + + if (data) + for (i = 0; i < n_visuals; i++) + + /* Only accept ones that have a transparent pixel. */ + if (data[i].transparency == 1) + { + XVisualInfo vi_in, *vi_out; + int out_count; + vi_in.visualid = data[i].visual_id; + vi_out = XGetVisualInfo (DisplayOfScreen(screen), VisualIDMask, + &vi_in, &out_count); + if (vi_out) + { + /* Prefer the one at the topmost layer; after that, prefer + the one with the greatest depth (most colors.) */ + if (layer < data[i].layer || + (layer == data[i].layer && + depth < vi_out[0].depth)) + { + visual = vi_out[0].visual; + depth = vi_out[0].depth; + layer = data[i].layer; + pixel = data[i].value; + } + XFree(vi_out); + } + } + + if (data) XFree(data); + if (visual && transparent_pixel_ret) + *transparent_pixel_ret = pixel; + return visual; +} diff --git a/utils/resources.c b/utils/resources.c new file mode 100644 index 00000000..82748231 --- /dev/null +++ b/utils/resources.c @@ -0,0 +1,211 @@ +/* xscreensaver, Copyright (c) 1992, 1997 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. + */ + +#include "utils.h" +#include "resources.h" +#include + + +/* Resource functions. Assumes: */ + +extern char *progname; +extern char *progclass; +extern XrmDatabase db; + +static unsigned int get_time_resource (char *res_name, char *res_class, + Bool sec_p); + +#ifndef isupper +# define isupper(c) ((c) >= 'A' && (c) <= 'Z') +#endif +#ifndef _tolower +# define _tolower(c) ((c) - 'A' + 'a') +#endif + +char * +get_string_resource (char *res_name, char *res_class) +{ + XrmValue value; + char *type; + char full_name [1024], full_class [1024]; + strcpy (full_name, progname); + strcat (full_name, "."); + strcat (full_name, res_name); + strcpy (full_class, progclass); + strcat (full_class, "."); + strcat (full_class, res_class); + if (XrmGetResource (db, full_name, full_class, &type, &value)) + { + char *str = (char *) malloc (value.size + 1); + strncpy (str, (char *) value.addr, value.size); + str [value.size] = 0; + return str; + } + return 0; +} + +Bool +get_boolean_resource (char *res_name, char *res_class) +{ + char *tmp, buf [100]; + char *s = get_string_resource (res_name, res_class); + char *os = s; + if (! s) return 0; + for (tmp = buf; *s; s++) + *tmp++ = isupper (*s) ? _tolower (*s) : *s; + *tmp = 0; + free (os); + + while (*buf && + (buf[strlen(buf)-1] == ' ' || + buf[strlen(buf)-1] == '\t')) + buf[strlen(buf)-1] = 0; + + if (!strcmp (buf, "on") || !strcmp (buf, "true") || !strcmp (buf, "yes")) + return 1; + if (!strcmp (buf,"off") || !strcmp (buf, "false") || !strcmp (buf,"no")) + return 0; + fprintf (stderr, "%s: %s must be boolean, not %s.\n", + progname, res_class, buf); + return 0; +} + +int +get_integer_resource (char *res_name, char *res_class) +{ + int val; + char c, *s = get_string_resource (res_name, res_class); + if (!s) return 0; + if (1 == sscanf (s, " %d %c", &val, &c)) + { + free (s); + return val; + } + fprintf (stderr, "%s: %s must be an integer, not %s.\n", + progname, res_name, s); + free (s); + return 0; +} + +double +get_float_resource (char *res_name, char *res_class) +{ + double val; + char c, *s = get_string_resource (res_name, res_class); + if (! s) return 0.0; + if (1 == sscanf (s, " %lf %c", &val, &c)) + { + free (s); + return val; + } + fprintf (stderr, "%s: %s must be a float, not %s.\n", + progname, res_name, s); + free (s); + return 0.0; +} + + +unsigned int +get_pixel_resource (char *res_name, char *res_class, + Display *dpy, Colormap cmap) +{ + XColor color; + char *s = get_string_resource (res_name, res_class); + char *s2; + if (!s) goto DEFAULT; + + for (s2 = s + strlen(s) - 1; s2 > s; s2--) + if (*s2 == ' ' || *s2 == '\t') + *s2 = 0; + + if (! XParseColor (dpy, cmap, s, &color)) + { + fprintf (stderr, "%s: can't parse color %s\n", progname, s); + goto DEFAULT; + } + if (! XAllocColor (dpy, cmap, &color)) + { + fprintf (stderr, "%s: couldn't allocate color %s\n", progname, s); + goto DEFAULT; + } + free (s); + return color.pixel; + DEFAULT: + if (s) free (s); + return (strcmp (res_class, "Background") + ? WhitePixel (dpy, DefaultScreen (dpy)) + : BlackPixel (dpy, DefaultScreen (dpy))); +} + + +int +parse_time (char *string, Bool seconds_default_p, Bool silent_p) +{ + unsigned int h, m, s; + char c; + if (3 == sscanf (string, " %u : %2u : %2u %c", &h, &m, &s, &c)) + ; + else if (2 == sscanf (string, " : %2u : %2u %c", &m, &s, &c) || + 2 == sscanf (string, " %u : %2u %c", &m, &s, &c)) + h = 0; + else if (1 == sscanf (string, " : %2u %c", &s, &c)) + h = m = 0; + else if (1 == sscanf (string, " %u %c", + (seconds_default_p ? &s : &m), &c)) + { + h = 0; + if (seconds_default_p) m = 0; + else s = 0; + } + else + { + if (! silent_p) + fprintf (stderr, "%s: invalid time interval specification \"%s\".\n", + progname, string); + return -1; + } + if (s >= 60 && (h != 0 || m != 0)) + { + if (! silent_p) + fprintf (stderr, "%s: seconds > 59 in \"%s\".\n", progname, string); + return -1; + } + if (m >= 60 && h > 0) + { + if (! silent_p) + fprintf (stderr, "%s: minutes > 59 in \"%s\".\n", progname, string); + return -1; + } + return ((h * 60 * 60) + (m * 60) + s); +} + +static unsigned int +get_time_resource (char *res_name, char *res_class, Bool sec_p) +{ + int val; + char *s = get_string_resource (res_name, res_class); + if (!s) return 0; + val = parse_time (s, sec_p, False); + free (s); + return (val < 0 ? 0 : val); +} + +unsigned int +get_seconds_resource (char *res_name, char *res_class) +{ + return get_time_resource (res_name, res_class, True); +} + +unsigned int +get_minutes_resource (char *res_name, char *res_class) +{ + return get_time_resource (res_name, res_class, False); +} diff --git a/utils/resources.h b/utils/resources.h new file mode 100644 index 00000000..6179565e --- /dev/null +++ b/utils/resources.h @@ -0,0 +1,24 @@ +/* xscreensaver, Copyright (c) 1992, 1997 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. + */ + +#ifndef __XSCREENSAVER_RESOURCES_H__ +#define __XSCREENSAVER_RESOURCES_H__ + +extern char *get_string_resource (char*,char*); +extern Bool get_boolean_resource (char*,char*); +extern int get_integer_resource (char*,char*); +extern double get_float_resource (char*,char*); +extern unsigned int get_pixel_resource (char*,char*,Display*,Colormap); +extern unsigned int get_minutes_resource (char*,char*); +extern unsigned int get_seconds_resource (char*,char*); +extern int parse_time (char *string, Bool seconds_default_p, Bool silent_p); + +#endif /* __XSCREENSAVER_RESOURCES_H__ */ diff --git a/utils/spline.c b/utils/spline.c new file mode 100644 index 00000000..84de1cb4 --- /dev/null +++ b/utils/spline.c @@ -0,0 +1,321 @@ +/* + * Copyright (c) 1987, 1988, 1989 Stanford University + * + * 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, and that the name of Stanford not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Stanford makes no representations about + * the suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. + * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* This code came with the InterViews distribution, and was translated + from C++ to C by Matthieu Devin some time in 1992. + */ + +#include "utils.h" +#include "spline.h" + +#define SMOOTHNESS 1.0 + +static void no_more_memory (void); +static void grow_spline_points (spline* s); +static void mid_point (double x0, double y0, double x1, double y1, + double *mx, double *my); +static int can_approx_with_line (double x0, double y0, double x2, + double y2, double x3, double y3); +static void add_line (spline* s, double x0, double y0, double x1, double y1); +static void add_bezier_arc (spline* s, + double x0, double y0, double x1, double y1, + double x2, double y2, double x3, double y3); +static void third_point (double x0, double y0, double x1, double y1, + double *tx, double *ty); +static void calc_section (spline* s, double cminus1x, double cminus1y, + double cx, double cy, double cplus1x, double cplus1y, + double cplus2x, double cplus2y); + +static void +no_more_memory (void) +{ + fprintf (stderr, "No more memory\n"); + exit (1); +} + +spline* +make_spline (u_int size) +{ + spline* s = (spline*)calloc (1, sizeof (spline)); + if (!s) + no_more_memory (); + s->n_controls = size; + s->control_x = (double*)calloc (s->n_controls, sizeof (double)); + s->control_y = (double*)calloc (s->n_controls, sizeof (double)); + + s->n_points = 0; + s->allocated_points = s->n_controls; + s->points = (XPoint*)calloc (s->allocated_points, sizeof (XPoint)); + + if (!s->control_x || !s->control_y || !s->points) + no_more_memory (); + + return s; +} + +static void +grow_spline_points (spline *s) +{ + s->allocated_points *= 2; + s->points = + (XPoint*)realloc (s->points, s->allocated_points * sizeof (XPoint)); + + if (!s->points) + no_more_memory (); +} + +static void +mid_point (double x0, double y0, + double x1, double y1, + double *mx, double *my) +{ + *mx = (x0 + x1) / 2.0; + *my = (y0 + y1) / 2.0; +} + +static void +third_point (double x0, double y0, + double x1, double y1, + double *tx, double *ty) +{ + *tx = (2 * x0 + x1) / 3.0; + *ty = (2 * y0 + y1) / 3.0; +} + +static int +can_approx_with_line (double x0, double y0, + double x2, double y2, + double x3, double y3) +{ + double triangle_area, side_squared, dx, dy; + + triangle_area = x0 * y2 - x2 * y0 + x2 * y3 - x3 * y2 + x3 * y0 - x0 * y3; + /* actually 4 times the area. */ + triangle_area *= triangle_area; + dx = x3 - x0; + dy = y3 - y0; + side_squared = dx * dx + dy * dy; + return triangle_area <= SMOOTHNESS * side_squared; +} + +static void +add_line (spline *s, + double x0, double y0, + double x1, double y1) +{ + if (s->n_points >= s->allocated_points) + grow_spline_points (s); + + if (s->n_points == 0) + { + s->points [s->n_points].x = x0; + s->points [s->n_points].y = y0; + s->n_points += 1; + } + s->points [s->n_points].x = x1; + s->points [s->n_points].y = y1; + s->n_points += 1; +} + +static void +add_bezier_arc (spline *s, + double x0, double y0, + double x1, double y1, + double x2, double y2, + double x3, double y3) +{ + double midx01, midx12, midx23, midlsegx, midrsegx, cx, + midy01, midy12, midy23, midlsegy, midrsegy, cy; + + mid_point (x0, y0, x1, y1, &midx01, &midy01); + mid_point (x1, y1, x2, y2, &midx12, &midy12); + mid_point (x2, y2, x3, y3, &midx23, &midy23); + mid_point (midx01, midy01, midx12, midy12, &midlsegx, &midlsegy); + mid_point (midx12, midy12, midx23, midy23, &midrsegx, &midrsegy); + mid_point (midlsegx, midlsegy, midrsegx, midrsegy, &cx, &cy); + + if (can_approx_with_line (x0, y0, midlsegx, midlsegy, cx, cy)) + add_line (s, x0, y0, cx, cy); + else if ((midx01 != x1) || (midy01 != y1) || (midlsegx != x2) + || (midlsegy != y2) || (cx != x3) || (cy != y3)) + add_bezier_arc (s, x0, y0, midx01, midy01, midlsegx, midlsegy, cx, cy); + + if (can_approx_with_line (cx, cy, midx23, midy23, x3, y3)) + add_line (s, cx, cy, x3, y3); + else if ((cx != x0) || (cy != y0) || (midrsegx != x1) || (midrsegy != y1) + || (midx23 != x2) || (midy23 != y2)) + add_bezier_arc (s, cx, cy, midrsegx, midrsegy, midx23, midy23, x3, y3); +} + +static void +calc_section (spline *s, + double cminus1x, double cminus1y, + double cx, double cy, + double cplus1x, double cplus1y, + double cplus2x, double cplus2y) +{ + double p0x, p1x, p2x, p3x, tempx, + p0y, p1y, p2y, p3y, tempy; + + third_point (cx, cy, cplus1x, cplus1y, &p1x, &p1y); + third_point (cplus1x, cplus1y, cx, cy, &p2x, &p2y); + third_point (cx, cy, cminus1x, cminus1y, &tempx, &tempy); + mid_point (tempx, tempy, p1x, p1y, &p0x, &p0y); + third_point (cplus1x, cplus1y, cplus2x, cplus2y, &tempx, &tempy); + mid_point (tempx, tempy, p2x, p2y, &p3x, &p3y); + add_bezier_arc (s, p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y); +} + +void +compute_spline (spline *s) +{ + int i; + s->n_points = 0; + + if (s->n_controls < 3) + return; + + calc_section (s, s->control_x [0], s->control_y [0], s->control_x [0], + s->control_y [0], s->control_x [0], s->control_y [0], + s->control_x [1], s->control_y [1]); + calc_section (s, s->control_x [0], s->control_y [0], s->control_x [0], + s->control_y [0], s->control_x [1], s->control_y [1], + s->control_x [2], s->control_y [2]); + + for (i = 1; i < s->n_controls - 2; i++) + calc_section (s, s->control_x [i - 1], s->control_y [i - 1], + s->control_x [i], s->control_y [i], + s->control_x [i + 1], s->control_y [i + 1], + s->control_x [i + 2], s->control_y [i + 2]); + + calc_section (s, s->control_x [i - 1], s->control_y [i - 1], + s->control_x [i], s->control_y [i], + s->control_x [i + 1], s->control_y [i + 1], + s->control_x [i + 1], s->control_y [i + 1]); + calc_section (s, s->control_x [i], s->control_y [i], + s->control_x [i + 1], s->control_y [i + 1], + s->control_x [i + 1], s->control_y [i + 1], + s->control_x [i + 1], s->control_y [i + 1]); +} + +void +compute_closed_spline (spline *s) +{ + int i; + s->n_points = 0; + + if (s->n_controls < 3) + return; + + calc_section (s, + s->control_x [s->n_controls - 1], + s->control_y [s->n_controls - 1], + s->control_x [0], s->control_y [0], + s->control_x [1], s->control_y [1], + s->control_x [2], s->control_y [2]); + + for (i = 1; i < s->n_controls - 2; i++) + calc_section (s, s->control_x [i - 1], s->control_y [i - 1], + s->control_x [i], s->control_y [i], + s->control_x [i + 1], s->control_y [i + 1], + s->control_x [i + 2], s->control_y [i + 2]); + + calc_section (s, s->control_x [i - 1], s->control_y [i - 1], + s->control_x [i], s->control_y [i], + s->control_x [i + 1], s->control_y [i + 1], + s->control_x [0], s->control_y [0]); + calc_section (s, s->control_x [i], s->control_y [i], + s->control_x [i + 1], s->control_y [i + 1], + s->control_x [0], s->control_y [0], + s->control_x [1], s->control_y [1]); +} + +void +just_fill_spline (spline *s) +{ + int i; + + while (s->allocated_points < s->n_controls + 1) + grow_spline_points (s); + + for (i = 0; i < s->n_controls; i++) + { + s->points [i].x = s->control_x [i]; + s->points [i].y = s->control_y [i]; + } + s->points [s->n_controls].x = s->control_x [0]; + s->points [s->n_controls].y = s->control_y [0]; + s->n_points = s->n_controls + 1; +} + +void +append_spline_points (spline *s1, spline *s2) +{ + int i; + while (s1->allocated_points < s1->n_points + s2->n_points) + grow_spline_points (s1); + for (i = s1->n_points; i < s1->n_points + s2->n_points; i++) + { + s1->points [i].x = s2->points [i - s1->n_points].x; + s1->points [i].y = s2->points [i - s1->n_points].y; + } + s1->n_points = s1->n_points + s2->n_points; +} + +void +spline_bounding_box (spline *s, XRectangle *rectangle_out) +{ + int min_x; + int max_x; + int min_y; + int max_y; + int i; + + if (s->n_points == 0) + { + rectangle_out->x = 0; + rectangle_out->y = 0; + rectangle_out->width = 0; + rectangle_out->height = 0; + } + + min_x = s->points [0].x; + max_x = min_x; + min_y = s->points [0].y; + max_y = min_y; + + for (i = 1; i < s->n_points; i++) + { + if (s->points [i].x < min_x) + min_x = s->points [i].x; + if (s->points [i].x > max_x) + max_x = s->points [i].x; + if (s->points [i].y < min_y) + min_y = s->points [i].y; + if (s->points [i].y > max_y) + max_y = s->points [i].y; + } + rectangle_out->x = min_x; + rectangle_out->y = min_y; + rectangle_out->width = max_x - min_x; + rectangle_out->height = max_y - min_y; +} diff --git a/utils/spline.h b/utils/spline.h new file mode 100644 index 00000000..998c049d --- /dev/null +++ b/utils/spline.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 1987, 1988, 1989 Stanford University + * + * 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, and that the name of Stanford not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Stanford makes no representations about + * the suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. + * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* This code came with the InterViews distribution, and was translated + from C++ to C by Matthieu Devin some time in 1992. + */ + +#ifndef _SPLINE_H_ +#define _SPLINE_H_ + +#ifdef VMS +# ifndef __DECC + typedef unsigned int u_int; +# else +# if __DECC_VER < 50200000 + typedef unsigned int u_int; +# endif +# endif +#endif + +typedef struct _spline +{ + /* input */ + u_int n_controls; + double* control_x; + double* control_y; + + /* output */ + u_int n_points; + XPoint* points; + u_int allocated_points; +} spline; + +spline* make_spline (u_int size); +void compute_spline (spline* s); +void compute_closed_spline (spline* s); +void just_fill_spline (spline* s); +void append_spline_points (spline* s1, spline* s2); +void spline_bounding_box (spline* s, XRectangle* rectangle_out); + +#endif /* _SPLINE_H_ */ diff --git a/utils/usleep.c b/utils/usleep.c new file mode 100644 index 00000000..04a17aa7 --- /dev/null +++ b/utils/usleep.c @@ -0,0 +1,58 @@ +/* xscreensaver, Copyright (c) 1992, 1996, 1997 + * 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#else /* !HAVE_CONFIG_H */ +# ifndef NO_SELECT +# define HAVE_SELECT +# endif +#endif /* !HAVE_CONFIG_H */ + +#ifdef __STDC__ +# include +#endif + +#if defined(VMS) +# include +# include +# include +#elif defined(HAVE_SELECT) +# include /* for struct timeval */ +#endif + + +#ifdef __SCREENHACK_USLEEP_H__ +ERROR, do not include that here +#endif + +void +screenhack_usleep (unsigned long usecs) +{ +# if defined(VMS) + float seconds = ((float) usecs)/1000000.0; + unsigned long int statvms = lib$wait(&seconds); + +#elif defined(HAVE_SELECT) + /* usleep() doesn't exist everywhere, and select() is faster anyway. */ + struct timeval tv; + tv.tv_sec = usecs / 1000000L; + tv.tv_usec = usecs % 1000000L; + (void) select (0, 0, 0, 0, &tv); + +#else /* !VMS && !HAVE_SELECT */ + /* If you don't have select() or usleep(), I guess you lose... + Maybe you have napms() instead? Let me know. */ + usleep (usecs); + +#endif /* !VMS && !HAVE_SELECT */ +} diff --git a/utils/usleep.h b/utils/usleep.h new file mode 100644 index 00000000..6d58293d --- /dev/null +++ b/utils/usleep.h @@ -0,0 +1,20 @@ +/* xscreensaver, Copyright (c) 1992, 1996 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. + */ + +#ifndef __SCREENHACK_USLEEP_H__ +#define __SCREENHACK_USLEEP_H__ + +extern void screenhack_usleep (unsigned long usecs); + +#undef usleep +#define usleep(usecs) screenhack_usleep(usecs) + +#endif /* __SCREENHACK_USLEEP_H__ */ diff --git a/utils/utils.h b/utils/utils.h new file mode 100644 index 00000000..2dbe47d9 --- /dev/null +++ b/utils/utils.h @@ -0,0 +1,22 @@ +/* xscreensaver, Copyright (c) 1997 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include + +#include +#include diff --git a/utils/version.h b/utils/version.h new file mode 100644 index 00000000..598c744a --- /dev/null +++ b/utils/version.h @@ -0,0 +1,2 @@ +static const char screensaver_id[] = + "@(#)xscreensaver 2.07, by Jamie Zawinski (jwz@netscape.com)"; diff --git a/utils/visual.c b/utils/visual.c new file mode 100644 index 00000000..42ce36e8 --- /dev/null +++ b/utils/visual.c @@ -0,0 +1,432 @@ +/* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 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. + */ + +/* This file contains some code for intelligently picking the best visual + (where "best" is biased in the direction of either: high color counts; + or: having writable color cells...) + */ + +#include "utils.h" +#include "resources.h" /* for get_string_resource() */ +#include "visual.h" + +#include + +extern char *progname; + + +#ifndef isupper +# define isupper(c) ((c) >= 'A' && (c) <= 'Z') +#endif +#ifndef _tolower +# define _tolower(c) ((c) - 'A' + 'a') +#endif + + +static Visual *pick_best_visual (Screen *, Bool, Bool); +static Visual *pick_mono_visual (Screen *); +static Visual *pick_best_visual_of_class (Screen *, int); +static Visual *id_to_visual (Screen *, int); +static Visual *id_to_visual (Screen *screen, int id); + + +#define DEFAULT_VISUAL -1 +#define BEST_VISUAL -2 +#define MONO_VISUAL -3 +#define GRAY_VISUAL -4 +#define COLOR_VISUAL -5 +#define SPECIFIC_VISUAL -6 + +Visual * +get_visual (Screen *screen, const char *string, Bool prefer_writable_cells, + Bool verbose_p) +{ + char *v = (string ? strdup(string) : 0); + char c, *tmp; + int vclass; + unsigned long id; + Visual *result = 0; + + if (v) + for (tmp = v; *tmp; tmp++) + if (isupper (*tmp)) *tmp = _tolower (*tmp); + + if (!v) vclass = BEST_VISUAL; + else if (!strcmp (v, "default")) vclass = DEFAULT_VISUAL; + else if (!strcmp (v, "best")) vclass = BEST_VISUAL; + else if (!strcmp (v, "mono")) vclass = MONO_VISUAL; + else if (!strcmp (v, "monochrome")) vclass = MONO_VISUAL; + else if (!strcmp (v, "gray")) vclass = GRAY_VISUAL; + else if (!strcmp (v, "grey")) vclass = GRAY_VISUAL; + else if (!strcmp (v, "color")) vclass = COLOR_VISUAL; + else if (!strcmp (v, "staticgray")) vclass = StaticGray; + else if (!strcmp (v, "staticcolor")) vclass = StaticColor; + else if (!strcmp (v, "truecolor")) vclass = TrueColor; + else if (!strcmp (v, "grayscale")) vclass = GrayScale; + else if (!strcmp (v, "greyscale")) vclass = GrayScale; + else if (!strcmp (v, "pseudocolor")) vclass = PseudoColor; + else if (!strcmp (v, "directcolor")) vclass = DirectColor; + else if (1 == sscanf (v, " %ld %c", &id, &c)) vclass = SPECIFIC_VISUAL; + else if (1 == sscanf (v, " 0x%lx %c", &id, &c)) vclass = SPECIFIC_VISUAL; + else + { + fprintf (stderr, "%s: unrecognized visual \"%s\".\n", progname, v); + vclass = DEFAULT_VISUAL; + } + + if (vclass == DEFAULT_VISUAL) + result = DefaultVisualOfScreen (screen); + else if (vclass == BEST_VISUAL) + result = pick_best_visual (screen, prefer_writable_cells, False); + else if (vclass == MONO_VISUAL) + { + result = pick_mono_visual (screen); + if (!result && verbose_p) + fprintf (stderr, "%s: no monochrome visuals.\n", progname); + } + else if (vclass == GRAY_VISUAL) + { + if (prefer_writable_cells) + result = pick_best_visual_of_class (screen, GrayScale); + if (!result) + result = pick_best_visual_of_class (screen, StaticGray); + if (!result) + result = pick_best_visual_of_class (screen, GrayScale); + if (!result && verbose_p) + fprintf (stderr, "%s: no GrayScale or StaticGray visuals.\n", + progname); + } + else if (vclass == COLOR_VISUAL) + { + int class; + /* First see if the default visual will do. */ + result = DefaultVisualOfScreen (screen); + class = visual_class(screen, result); + if (class != TrueColor && + class != PseudoColor && + class != DirectColor && + class != StaticColor) + result = 0; + if (result && visual_depth(screen, result) <= 1) + result = 0; + + /* Else, find the best non-default color visual */ + if (!result) + result = pick_best_visual (screen, prefer_writable_cells, True); + + if (!result && verbose_p) + fprintf (stderr, "%s: no color visuals.\n", progname); + } + else if (vclass == SPECIFIC_VISUAL) + { + result = id_to_visual (screen, id); + if (!result && verbose_p) + fprintf (stderr, "%s: no visual with id 0x%x.\n", progname, + (unsigned int) id); + } + else + { + Visual *visual = pick_best_visual_of_class (screen, vclass); + if (visual) + result = visual; + else if (verbose_p) + fprintf (stderr, "%s: no visual of class %s.\n", progname, v); + } + + if (v) free (v); + return result; +} + +Visual * +get_visual_resource (Screen *screen, char *name, char *class, + Bool prefer_writable_cells) +{ + char *string = get_string_resource (name, class); + Visual *v = get_visual (screen, string, prefer_writable_cells, True); + if (string) + free(string); + if (v) + return v; + else + return DefaultVisualOfScreen (screen); +} + + +static Visual * +pick_best_visual (Screen *screen, Bool prefer_writable_cells, Bool color_only) +{ + Visual *visual; + + if (!prefer_writable_cells) + { + /* If we don't prefer writable cells, then the "best" visual is the one + on which we can allocate the largest range and number of colors. + + Therefore, a TrueColor visual which is at least 16 bits deep is best. + (The assumption here being that a TrueColor of less than 16 bits is + really just a PseudoColor visual with a pre-allocated color cube.) + + The next best thing is a PseudoColor visual of any type. After that + come the non-colormappable visuals, and non-color visuals. + */ + if ((visual = pick_best_visual_of_class (screen, TrueColor)) && + visual_depth (screen, visual) >= 16) + return visual; + } + +#define TRY_CLASS(CLASS) \ + if ((visual = pick_best_visual_of_class (screen, CLASS)) && \ + (!color_only || visual_depth(screen, visual) > 1)) \ + return visual + TRY_CLASS(PseudoColor); + TRY_CLASS(TrueColor); + TRY_CLASS(DirectColor); + TRY_CLASS(StaticColor); + if (!color_only) + { + TRY_CLASS(GrayScale); + TRY_CLASS(StaticGray); + } +#undef TRY_CLASS + + visual = DefaultVisualOfScreen (screen); + if (!color_only || visual_depth(screen, visual) > 1) + return visual; + else + return 0; +} + +static Visual * +pick_mono_visual (Screen *screen) +{ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + int out_count; + + vi_in.depth = 1; + vi_in.screen = screen_number (screen); + vi_out = XGetVisualInfo (dpy, (VisualDepthMask | VisualScreenMask), + &vi_in, &out_count); + if (vi_out) + { + Visual *v = (out_count > 0 ? vi_out [0].visual : 0); + if (v && vi_out[0].depth != 1) + v = 0; + XFree ((char *) vi_out); + return v; + } + else + return 0; +} + + +static Visual * +pick_best_visual_of_class (Screen *screen, int visual_class) +{ + /* The best visual of a class is the one which on which we can allocate + the largest range and number of colors, which means the one with the + greatest depth and number of cells. + + (But actually, for XDaliClock, all visuals of the same class are + probably equivalent - either we have writable cells or we don't.) + */ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + int out_count; + + vi_in.class = visual_class; + vi_in.screen = screen_number (screen); + vi_out = XGetVisualInfo (dpy, (VisualClassMask | VisualScreenMask), + &vi_in, &out_count); + if (vi_out) + { + /* choose the 'best' one, if multiple */ + int i, best; + Visual *visual; + for (i = 0, best = 0; i < out_count; i++) + /* It's better if it's deeper, or if it's the same depth with + more cells (does that ever happen? Well, it could...) */ + if ((vi_out [i].depth > vi_out [best].depth) || + ((vi_out [i].depth == vi_out [best].depth) && + (vi_out [i].colormap_size > vi_out [best].colormap_size))) + best = i; + visual = (best < out_count ? vi_out [best].visual : 0); + XFree ((char *) vi_out); + return visual; + } + else + return 0; +} + +static Visual * +id_to_visual (Screen *screen, int id) +{ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + int out_count; + vi_in.screen = screen_number (screen); + vi_in.visualid = id; + vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask), + &vi_in, &out_count); + if (vi_out) + { + Visual *v = vi_out[0].visual; + XFree ((char *) vi_out); + return v; + } + return 0; +} + +int +visual_depth (Screen *screen, Visual *visual) +{ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + int out_count, d; + vi_in.screen = screen_number (screen); + vi_in.visualid = XVisualIDFromVisual (visual); + vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask, + &vi_in, &out_count); + if (! vi_out) abort (); + d = vi_out [0].depth; + XFree ((char *) vi_out); + return d; +} + + +int +visual_class (Screen *screen, Visual *visual) +{ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + int out_count, c; + vi_in.screen = screen_number (screen); + vi_in.visualid = XVisualIDFromVisual (visual); + vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask, + &vi_in, &out_count); + if (! vi_out) abort (); + c = vi_out [0].class; + XFree ((char *) vi_out); + return c; +} + +Bool +has_writable_cells (Screen *screen, Visual *visual) +{ + switch (visual_class (screen, visual)) + { + case GrayScale: /* Mappable grays. */ + case PseudoColor: /* Mappable colors. */ + return True; + case StaticGray: /* Fixed grays. */ + case TrueColor: /* Fixed colors. */ + case StaticColor: /* (What's the difference again?) */ + case DirectColor: /* DirectColor visuals are like TrueColor, but have + three colormaps - one for each component of RGB. + Screw it. */ + return False; + default: + abort(); + } +} + +void +describe_visual (FILE *f, Screen *screen, Visual *visual) +{ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + int out_count; + vi_in.screen = screen_number (screen); + vi_in.visualid = XVisualIDFromVisual (visual); + vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask), + &vi_in, &out_count); + if (! vi_out) abort (); + fprintf (f, "0x%02x (%s depth: %2d, cmap: %3d)\n", + (unsigned int) vi_out->visualid, + (vi_out->class == StaticGray ? "StaticGray, " : + vi_out->class == StaticColor ? "StaticColor," : + vi_out->class == TrueColor ? "TrueColor, " : + vi_out->class == GrayScale ? "GrayScale, " : + vi_out->class == PseudoColor ? "PseudoColor," : + vi_out->class == DirectColor ? "DirectColor," : + "UNKNOWN: "), + vi_out->depth, vi_out->colormap_size /*, vi_out->bits_per_rgb*/); + XFree ((char *) vi_out); +} + +int +screen_number (Screen *screen) +{ + Display *dpy = DisplayOfScreen (screen); + int i; + for (i = 0; i < ScreenCount (dpy); i++) + if (ScreenOfDisplay (dpy, i) == screen) + return i; + abort (); +} + +int +visual_cells (Screen *screen, Visual *visual) +{ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + int out_count, c; + vi_in.screen = screen_number (screen); + vi_in.visualid = XVisualIDFromVisual (visual); + vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask, + &vi_in, &out_count); + if (! vi_out) abort (); + c = vi_out [0].colormap_size; + XFree ((char *) vi_out); + return c; +} + +Visual * +find_similar_visual(Screen *screen, Visual *old_visual) +{ + Display *dpy = DisplayOfScreen (screen); + XVisualInfo vi_in, *vi_out; + Visual *result = 0; + int out_count; + + vi_in.screen = screen_number (screen); + vi_in.class = visual_class (screen, old_visual); + vi_in.depth = visual_depth (screen, old_visual); + + /* Look for a visual of the same class and depth. + */ + vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualClassMask | + VisualDepthMask), + &vi_in, &out_count); + if (vi_out && out_count > 0) + result = vi_out[0].visual; + if (vi_out) XFree (vi_out); + vi_out = 0; + + /* Failing that, look for a visual of the same class. + */ + if (!result) + { + vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualClassMask), + &vi_in, &out_count); + if (vi_out && out_count > 0) + result = vi_out[0].visual; + if (vi_out) XFree (vi_out); + vi_out = 0; + } + + /* Failing that, return the default visual. */ + if (!result) + result = DefaultVisualOfScreen (screen); + + return result; +} diff --git a/utils/visual.h b/utils/visual.h new file mode 100644 index 00000000..1d033db3 --- /dev/null +++ b/utils/visual.h @@ -0,0 +1,26 @@ +/* xscreensaver, Copyright (c) 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. + */ + +#ifndef __VISUAL_H__ +#define __VISUAL_H__ + +extern Visual *get_visual (Screen *, const char *name, Bool, Bool); +extern Visual *get_visual_resource (Screen *, char *, char *, Bool); +extern int visual_depth (Screen *, Visual *); +extern int visual_class (Screen *, Visual *); +extern int visual_cells (Screen *, Visual *); +extern int screen_number (Screen *); +extern Visual *find_similar_visual (Screen *, Visual *old); +extern void describe_visual (FILE *f, Screen *, Visual *); +extern Visual *get_overlay_visual (Screen *, unsigned long *pixel_return); +extern Bool has_writable_cells (Screen *screen, Visual *visual); + +#endif /* __VISUAL_H__ */ diff --git a/utils/vms-gtod.c b/utils/vms-gtod.c new file mode 100644 index 00000000..7b1df5ab --- /dev/null +++ b/utils/vms-gtod.c @@ -0,0 +1,31 @@ +/* + * UNIX-style Time Functions, by pmoreau@cena.dgac.fr + * (picked up from XVMSUTILS unix emulation routines for VMS by + * Trevor Taylor, Patrick Mahans and Martin P.J. Zinser) + * + * 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. + */ +#include +#include +#include +#include "vms-gtod.h" + +/* + * gettimeofday(2) - Returns the current time + */ + +int gettimeofday(tv) +struct timeval *tv; +{ + timeb_t tmp_time; + ftime(&tmp_time); + tv->tv_sec = tmp_time.time; + tv->tv_usec = tmp_time.millitm * 1000; + return (0); +} diff --git a/utils/vms-gtod.h b/utils/vms-gtod.h new file mode 100644 index 00000000..ffd65868 --- /dev/null +++ b/utils/vms-gtod.h @@ -0,0 +1,85 @@ +/* @(#)time.h 2.9 87/01/17 SMI; from UCB 7.1 6/4/86 */ + +/* + Definitions of various structures used on UNIX for + time-related syscalls. +*/ + +/* + * Copyright (c) 1982, 1986 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef _VMS_GTOD_ +#define _VMS_GTOD_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Structure returned by gettimeofday(2) system call, + * and used in other calls. + */ +#ifndef __DECC +struct timeval +{ + long tv_sec; /* seconds */ + long tv_usec; /* and microseconds */ +}; +#else +#if __DECC_VER < 50200000 +struct timeval +{ + long tv_sec; /* seconds */ + long tv_usec; /* and microseconds */ +}; +#endif /* __DECC_VER */ +#endif /* __DECC */ + +/* + * Operations on timevals. + * + * NB: timercmp does not work for >= or <=. + */ +#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) +#define timercmp(tvp, uvp, cmp) \ + ((tvp)->tv_sec cmp (uvp)->tv_sec || \ + (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) +#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 + +/* + * Names of the interval timers, and structure + * defining a timer setting. + */ +#define ITIMER_REAL 0 +#define ITIMER_VIRTUAL 1 +#define ITIMER_PROF 2 + +#ifndef __DECC +struct itimerval +{ + struct timeval it_interval; /* timer interval */ + struct timeval it_value; /* current value */ +}; +#else +#if __DECC_VER < 50200000 +struct itimerval +{ + struct timeval it_interval; /* timer interval */ + struct timeval it_value; /* current value */ +}; +#endif /* __DECC_VER */ +#endif /* __DECC */ + +#ifndef KERNEL +#include +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*!_VMS_GTOD_*/ + diff --git a/utils/vms-strdup.c b/utils/vms-strdup.c new file mode 100644 index 00000000..1afc257d --- /dev/null +++ b/utils/vms-strdup.c @@ -0,0 +1,25 @@ +/* + * strdup.c + * + * Simple version of strdup for machines without it (ie DEC Ultrix 4.2) + * Apparently VMS only got strdup in 1995 (v5.2...) + * + * By David Chatterton + * 29 July 1993 + * + * You can do anything you like to this... :) + * I've stolen it from xpilot and added it to the xvmstuils MPJZ ;-) + */ + +#if (__VMS_VER < 70000000) +#include +#include + +char* strdup (const char* s1) +{ + char* s2; + if (s2 = (char*)malloc(strlen(s1)+1)) + strcpy(s2,s1); + return s2; +} +#endif diff --git a/utils/vroot.h b/utils/vroot.h new file mode 100644 index 00000000..ba3e5d29 --- /dev/null +++ b/utils/vroot.h @@ -0,0 +1,126 @@ +/*****************************************************************************/ +/** Copyright 1991 by Andreas Stolcke **/ +/** Copyright 1990 by Solbourne Computer Inc. **/ +/** Longmont, Colorado **/ +/** **/ +/** All Rights Reserved **/ +/** **/ +/** 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 permis- **/ +/** sion notice appear in supporting documentation, and that the **/ +/** name of Solbourne not be used in advertising **/ +/** in publicity pertaining to distribution of the software without **/ +/** specific, written prior permission. **/ +/** **/ +/** ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES **/ +/** WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF **/ +/** MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ANDREAS STOLCKE **/ +/** OR SOLBOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL **/ +/** DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/ +/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/ +/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/ +/** OR PERFORMANCE OF THIS SOFTWARE. **/ +/*****************************************************************************/ +/* + * vroot.h -- Virtual Root Window handling header file + * + * This header file redefines the X11 macros RootWindow and DefaultRootWindow, + * making them look for a virtual root window as provided by certain `virtual' + * window managers like swm and tvtwm. If none is found, the ordinary root + * window is returned, thus retaining backward compatibility with standard + * window managers. + * The function implementing the virtual root lookup remembers the result of + * its last invocation to avoid overhead in the case of repeated calls + * on the same display and screen arguments. + * The lookup code itself is taken from Tom LaStrange's ssetroot program. + * + * Most simple root window changing X programs can be converted to using + * virtual roots by just including + * + * #include + * + * after all the X11 header files. It has been tested on such popular + * X clients as xphoon, xfroot, xloadimage, and xaqua. + * It also works with the core clients xprop, xwininfo, xwd, and editres + * (and is necessary to get those clients working under tvtwm). + * It does NOT work with xsetroot; get the xsetroot replacement included in + * the tvtwm distribution instead. + * + * Andreas Stolcke , 9/7/90 + * - replaced all NULL's with properly cast 0's, 5/6/91 + * - free children list (suggested by Mark Martin ), 5/16/91 + * - include X11/Xlib.h and support RootWindowOfScreen, too 9/17/91 + */ + +#ifndef _VROOT_H_ +#define _VROOT_H_ + +#if !defined(lint) && !defined(SABER) +static const char vroot_rcsid[] = "#Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp stolcke #"; +#endif + +#include +#include +#include + +static Window +#ifdef __STDC__ /* ANSIfication added by jwz, to avoid superfluous warnings. */ +VirtualRootWindowOfScreen(Screen *screen) +#else /* !__STDC__ */ +VirtualRootWindowOfScreen(screen) Screen *screen; +#endif /* !__STDC__ */ +{ + static Screen *save_screen = (Screen *)0; + static Window root = (Window)0; + + if (screen != save_screen) { + Display *dpy = DisplayOfScreen(screen); + Atom __SWM_VROOT = None; + int i; + Window rootReturn, parentReturn, *children; + unsigned int numChildren; + + root = RootWindowOfScreen(screen); + + /* go look for a virtual root */ + __SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False); + if (XQueryTree(dpy, root, &rootReturn, &parentReturn, + &children, &numChildren)) { + for (i = 0; i < numChildren; i++) { + Atom actual_type; + int actual_format; + unsigned long nitems, bytesafter; + Window *newRoot = (Window *)0; + + if (XGetWindowProperty(dpy, children[i], + __SWM_VROOT, 0, 1, False, XA_WINDOW, + &actual_type, &actual_format, + &nitems, &bytesafter, + (unsigned char **) &newRoot) == Success + && newRoot) { + root = *newRoot; + break; + } + } + if (children) + XFree((char *)children); + } + + save_screen = screen; + } + + return root; +} + +#undef RootWindowOfScreen +#define RootWindowOfScreen(s) VirtualRootWindowOfScreen(s) + +#undef RootWindow +#define RootWindow(dpy,screen) VirtualRootWindowOfScreen(ScreenOfDisplay(dpy,screen)) + +#undef DefaultRootWindow +#define DefaultRootWindow(dpy) VirtualRootWindowOfScreen(DefaultScreenOfDisplay(dpy)) + +#endif /* _VROOT_H_ */ diff --git a/utils/xmu.c b/utils/xmu.c new file mode 100644 index 00000000..9773cd23 --- /dev/null +++ b/utils/xmu.c @@ -0,0 +1,168 @@ +/* This file contains compatibility routines for systems without Xmu. + * You would be better served by installing Xmu on your machine or + * yelling at your vendor to ship it. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef HAVE_XMU +/* + * Copyright 1989 Massachusetts Institute of Technology + * + * 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, and that the name of M.I.T. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "xmu.h" + +#ifndef NEED_EVENTS +# define NEED_EVENTS /* to make Xproto.h define xEvent */ +#endif +#ifndef VMS +# include /* for xEvent (used by Xlibint.h) */ +# include /* for _XExtension */ +#else /* VMS */ +# include +#endif /* VMS */ +#include /* for XtSpecificationRelease */ + +/* + * XmuPrintDefaultErrorMessage - print a nice error that looks like the usual + * message. Returns 1 if the caller should consider exitting else 0. + */ +int XmuPrintDefaultErrorMessage (Display *dpy, XErrorEvent *event, FILE *fp) +{ + char buffer[BUFSIZ]; + char mesg[BUFSIZ]; + char number[32]; + char *mtype = "XlibMessage"; + _XExtension *ext = (_XExtension *)NULL; + XGetErrorText(dpy, event->error_code, buffer, BUFSIZ); + XGetErrorDatabaseText(dpy, mtype, "XError", "X Error", mesg, BUFSIZ); + (void) fprintf(fp, "%s: %s\n ", mesg, buffer); + XGetErrorDatabaseText(dpy, mtype, "MajorCode", "Request Major code %d", + mesg, BUFSIZ); + (void) fprintf(fp, mesg, event->request_code); + if (event->request_code < 128) { + sprintf(number, "%d", event->request_code); + XGetErrorDatabaseText(dpy, "XRequest", number, "", buffer, BUFSIZ); + } else { + /* XXX this is non-portable */ + for (ext = dpy->ext_procs; + ext && (ext->codes.major_opcode != event->request_code); + ext = ext->next) + ; + if (ext) + strcpy(buffer, ext->name); + else + buffer[0] = '\0'; + } + (void) fprintf(fp, " (%s)", buffer); + fputs("\n ", fp); +#if (XtSpecificationRelease >= 5) + if (event->request_code >= 128) { + XGetErrorDatabaseText(dpy, mtype, "MinorCode", "Request Minor code %d", + mesg, BUFSIZ); + (void) fprintf(fp, mesg, event->minor_code); + if (ext) { + sprintf(mesg, "%s.%d", ext->name, event->minor_code); + XGetErrorDatabaseText(dpy, "XRequest", mesg, "", buffer, BUFSIZ); + (void) fprintf(fp, " (%s)", buffer); + } + fputs("\n ", fp); + } + if (event->error_code >= 128) { + /* let extensions try to print the values */ + /* XXX this is non-portable code */ + for (ext = dpy->ext_procs; ext; ext = ext->next) { + if (ext->error_values) + (*ext->error_values)(dpy, event, fp); + } + /* the rest is a fallback, providing a simple default */ + /* kludge, try to find the extension that caused it */ + buffer[0] = '\0'; + for (ext = dpy->ext_procs; ext; ext = ext->next) { + if (ext->error_string) + (*ext->error_string)(dpy, event->error_code, &ext->codes, + buffer, BUFSIZ); + if (buffer[0]) + break; + } + if (buffer[0]) + sprintf(buffer, "%s.%d", ext->name, + event->error_code - ext->codes.first_error); + else + strcpy(buffer, "Value"); + XGetErrorDatabaseText(dpy, mtype, buffer, "", mesg, BUFSIZ); + if (*mesg) { + (void) fprintf(fp, mesg, event->resourceid); + fputs("\n ", fp); + } + } else if ((event->error_code == BadWindow) || + (event->error_code == BadPixmap) || + (event->error_code == BadCursor) || + (event->error_code == BadFont) || + (event->error_code == BadDrawable) || + (event->error_code == BadColor) || + (event->error_code == BadGC) || + (event->error_code == BadIDChoice) || + (event->error_code == BadValue) || + (event->error_code == BadAtom)) { + if (event->error_code == BadValue) + XGetErrorDatabaseText(dpy, mtype, "Value", "Value 0x%x", + mesg, BUFSIZ); + else if (event->error_code == BadAtom) + XGetErrorDatabaseText(dpy, mtype, "AtomID", "AtomID 0x%x", + mesg, BUFSIZ); + else + XGetErrorDatabaseText(dpy, mtype, "ResourceID", "ResourceID 0x%x", + mesg, BUFSIZ); + (void) fprintf(fp, mesg, event->resourceid); + fputs("\n ", fp); + } +#elif (XtSpecificationRelease == 4) + XGetErrorDatabaseText(dpy, mtype, "MinorCode", "Request Minor code %d", + mesg, BUFSIZ); + (void) fprintf(fp, mesg, event->minor_code); + fputs("\n ", fp); + if (ext) { + sprintf(mesg, "%s.%d", ext->name, event->minor_code); + XGetErrorDatabaseText(dpy, "XRequest", mesg, "", buffer, BUFSIZ); + (void) fprintf(fp, " (%s)", buffer); + } + XGetErrorDatabaseText(dpy, mtype, "ResourceID", "ResourceID 0x%x", + mesg, BUFSIZ); + (void) fprintf(fp, mesg, event->resourceid); + fputs("\n ", fp); +#else +ERROR! Unsupported release of X11 +#endif + XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", + mesg, BUFSIZ); + (void) fprintf(fp, mesg, event->serial); + fputs("\n ", fp); + XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%d", + mesg, BUFSIZ); + (void) fprintf(fp, mesg, NextRequest(dpy)-1); + fputs("\n", fp); + if (event->error_code == BadImplementation) return 0; + return 1; +} + +#endif /* !HAVE_XMU */ diff --git a/utils/xmu.h b/utils/xmu.h new file mode 100644 index 00000000..48084f74 --- /dev/null +++ b/utils/xmu.h @@ -0,0 +1,14 @@ +/* This file contains compatibility routines for systems without Xmu. + * You would be better served by installing Xmu on your machine or + * yelling at your vendor to ship it. + */ + +#ifndef __XMU_H__ +#define __XMU_H__ + +#include +#include + +int XmuPrintDefaultErrorMessage (Display *dpy, XErrorEvent *event, FILE *fp); + +#endif /* __XMU_H__ */ diff --git a/utils/xroger.c b/utils/xroger.c new file mode 100644 index 00000000..ec1b465e --- /dev/null +++ b/utils/xroger.c @@ -0,0 +1,96 @@ +/* xscreensaver, Copyright (c) 1991-1993 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. + */ + +#include "utils.h" + +static void +crossbones (Display *dpy, Window window, GC draw_gc, + int x, int y, int w, int h) +{ + double xscale = w / 440.0; + double yscale = h / 216.0; + XPoint points [6]; + points [0].x = x + xscale * 20; + points [0].y = y + yscale * 10; + points [1].x = x + xscale * 120; + points [1].y = y + yscale * 10; + points [2].x = x + xscale * 243; + points [2].y = y + yscale * 93; + points [3].x = x + xscale * 57; + points [3].y = y + yscale * 210; + points [4].x = x + xscale * 20; + points [4].y = y + yscale * 210; + points [5].x = x + xscale * 175; + points [5].y = y + yscale * 113; + XFillPolygon (dpy, window, draw_gc, points, 6, Complex, CoordModeOrigin); + points [0].x = x + xscale * 197; + points [0].y = y + yscale * 127; + points [1].x = x + xscale * 384; + points [1].y = y + yscale * 10; + points [2].x = x + xscale * 420; + points [2].y = y + yscale * 10; + points [3].x = x + xscale * 265; + points [3].y = y + yscale * 108; + points [4].x = x + xscale * 420; + points [4].y = y + yscale * 210; + points [5].x = x + xscale * 320; + points [5].y = y + yscale * 210; + XFillPolygon (dpy, window, draw_gc, points, 6, Complex, CoordModeOrigin); +} + + +void +skull (Display *dpy, Window window, GC draw_gc, GC erase_gc, + int x, int y, int w, int h) +{ + XPoint points [3]; + crossbones (dpy, window, draw_gc, x, y+h/2, w, h/2); + x += w/100; + y += h/15; + XFillArc (dpy, window, draw_gc, (int) (x + (w * 0.3)), y, w/2, h/2, + -40*64, 260*64); + XFillRectangle (dpy, window, draw_gc, (int) (x + (w * 0.35)), y + h/5, + (int) (w * 0.4), h/5); + XFillRectangle (dpy, window, draw_gc, (int) (x + (w * 0.375)), + (int) (y + (h * 0.425)), w / 20, h / 20); + XFillRectangle (dpy, window, draw_gc, (int) (x + (w * 0.495)), + (int) (y + (h * 0.425)), w / 20, h / 20); + XFillRectangle (dpy, window, draw_gc, (int) (x + (w * 0.555)), + (int) (y + (h * 0.425)), w / 20, h / 20); + XFillRectangle (dpy, window, draw_gc, (int) (x + (w * 0.675)), + (int) (y + (h * 0.425)), w / 20, h / 20); + points [0].x = x + (w * 0.435); + points [0].y = y + (h * 0.425); + points [1].x = x + (w * 0.485); + points [1].y = points [0].y; + points [2].x = (points [0].x + points [1].x) / 2; + points [2].y = points [0].y + h/10; + XFillPolygon (dpy, window, draw_gc, points, 3, Complex, CoordModeOrigin); + points [0].x = x + (w * 0.615); + points [1].x = x + (w * 0.665); + points [2].x = (points [0].x + points [1].x) / 2; + XFillPolygon (dpy, window, draw_gc, points, 3, Complex, CoordModeOrigin); + points [0].x = x + (w * 0.52); + points [0].y = y + (h * 0.35); + points [1].x = points [0].x - (w * 0.05); + points [1].y = points [0].y; + points [2].x = points [0].x; + points [2].y = points [0].y - (w * 0.10); + XFillPolygon (dpy, window, erase_gc, points, 3, Complex, CoordModeOrigin); + points [0].x = x + (w * 0.57); + points [1].x = x + (w * 0.62); + points [2].x = points [0].x; + XFillPolygon (dpy, window, erase_gc, points, 3, Complex, CoordModeOrigin); + XFillArc (dpy, window, erase_gc, x + ((int) (w * 0.375)), y + h/7, + w/10, h/10, 0, 360*64); + XFillArc (dpy, window, erase_gc, x + ((int) (w * 0.615)), y + h/7, + w/10, h/10, 0, 360*64); +} diff --git a/utils/yarandom.c b/utils/yarandom.c new file mode 100644 index 00000000..63958e24 --- /dev/null +++ b/utils/yarandom.c @@ -0,0 +1,114 @@ +/* yarandom.c -- Yet Another Random Number Generator. + + The unportable mess that is rand(), random(), drand48() and friends led me + to ask Phil Karlton what the Right Thing to Do was. + He responded with this. It is non-cryptographically secure, reasonably + random (more so than anything that is in any C library), and very fast. + + I don't understand how it works at all, but he says "look at Knuth, + Vol. 2 (original edition), page 26, Algorithm A. In this case n=55, + k=20 and m=2^32." + + So there you have it. + + --------------------------- + Note: xlockmore 4.03a10 uses this very simple RNG: + + if ((seed = seed % 44488 * 48271 - seed / 44488 * 3399) < 0) + seed += 2147483647; + return seed-1; + + of which it says + + ``Dr. Park's algorithm published in the Oct. '88 ACM "Random Number + Generators: Good Ones Are Hard To Find" His version available at + ftp://cs.wm.edu/pub/rngs.tar Present form by many authors.'' + + Karlton says: ``the usual problem with that kind of RNG turns out to + be unexepected short cycles for some word lengths.'' + + Karlton's RNG is faster, since it does three adds and two stores, while the + xlockmore RNG does two multiplies, two divides, three adds, and one store. + + Compiler optimizations make a big difference here: + gcc -O: difference is 1.2x. + gcc -O2: difference is 1.4x. + gcc -O3: difference is 1.5x. + SGI cc -O: difference is 2.4x. + SGI cc -O2: difference is 2.4x. + SGI cc -O3: difference is 5.1x. + Irix 6.2; Indy r5k; SGI cc version 6; gcc version 2.7.2.1. + */ + + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef HAVE_UNISTD_H +# include /* for getpid() */ +#endif +#include /* for gettimeofday() */ + +#include "yarandom.h" + + +/* The following 'random' numbers are taken from CRC, 18th Edition, page 622. + Each array element was taken from the corresponding line in the table, + except that a[0] was from line 100. 8s and 9s in the table were simply + skipped. The high order digit was taken mod 4. + */ +#define VectorSize 55 +static unsigned int a[VectorSize] = { + 035340171546, 010401501101, 022364657325, 024130436022, 002167303062, /* 5 */ + 037570375137, 037210607110, 016272055420, 023011770546, 017143426366, /* 10 */ + 014753657433, 021657231332, 023553406142, 004236526362, 010365611275, /* 14 */ + 007117336710, 011051276551, 002362132524, 001011540233, 012162531646, /* 20 */ + 007056762337, 006631245521, 014164542224, 032633236305, 023342700176, /* 25 */ + 002433062234, 015257225043, 026762051606, 000742573230, 005366042132, /* 30 */ + 012126416411, 000520471171, 000725646277, 020116577576, 025765742604, /* 35 */ + 007633473735, 015674255275, 017555634041, 006503154145, 021576344247, /* 40 */ + 014577627653, 002707523333, 034146376720, 030060227734, 013765414060, /* 45 */ + 036072251540, 007255221037, 024364674123, 006200353166, 010126373326, /* 50 */ + 015664104320, 016401041535, 016215305520, 033115351014, 017411670323 /* 55 */ +}; + +static int i1, i2; + +unsigned int +ya_random (void) +{ + register int ret = a[i1] + a[i2]; + a[i1] = ret; + if (++i1 >= VectorSize) i1 = 0; + if (++i2 >= VectorSize) i2 = 0; + return ret; +} + +void +ya_rand_init(unsigned int seed) +{ + int i; + if (seed == 0) + { + struct timeval tp; +#ifdef GETTIMEOFDAY_TWO_ARGS + struct timezone tzp; + gettimeofday(&tp, &tzp); +#else + gettimeofday(&tp); +#endif + /* ignore overflow */ + seed = (999*tp.tv_sec) + (1001*tp.tv_usec) + (1003 * getpid()); + } + + a[0] += seed; + for (i = 1; i < VectorSize; i++) + { + seed = a[i-1]*1001 + seed*999; + a[i] += seed; + } + + i1 = a[0] % VectorSize; + i2 = (i1 + 024) % VectorSize; +} diff --git a/utils/yarandom.h b/utils/yarandom.h new file mode 100644 index 00000000..6563be7e --- /dev/null +++ b/utils/yarandom.h @@ -0,0 +1,52 @@ +/* xscreensaver, Copyright (c) 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. + */ + +#ifndef __YARANDOM_H__ +#define __YARANDOM_H__ + +#undef random +#undef rand +#undef drand48 +#undef srandom +#undef srand +#undef srand48 +#undef frand + +#ifdef VMS +# include "vms-gtod.h" +#endif + +#define random() ya_random() +#define srandom(i) ya_rand_init(0) + +extern unsigned int ya_random (void); +extern void ya_rand_init (unsigned int); + + +#if defined (__GNUC__) && (__GNUC__ >= 2) + /* Implement frand using GCC's statement-expression extension. */ + +# define frand(f) \ + ({ double tmp = (((double) random()) / \ + (((double) ((unsigned int)~0)) / ((double) (f)))); \ + tmp < 0 ? (-tmp) : tmp; }) + +#else /* not GCC2 - implement frand using a global variable.*/ + +static double _frand_tmp_; +# define frand(f) \ + (_frand_tmp_ = (((double) random()) / \ + (((double) ((unsigned int)~0)) / ((double) (f)))), \ + _frand_tmp_ < 0 ? (-_frand_tmp_) : _frand_tmp_) + +#endif /* not GCC2 */ + +#endif /* __YARANDOM_H__ */